1 // SPDX-License-Identifier: GPL-2.0+
3 * Synopsys DesignWare 8250 driver.
5 * Copyright 2011 Picochip, Jamie Iles.
6 * Copyright 2013 Intel Corporation
8 * The Synopsys DesignWare 8250 has an extra feature whereby it detects if the
9 * LCR is written whilst busy. If it is, then a busy detect interrupt is
10 * raised, the LCR needs to be rewritten and the uart status register read.
12 #include <linux/acpi.h>
13 #include <linux/clk.h>
14 #include <linux/delay.h>
15 #include <linux/device.h>
17 #include <linux/mod_devicetable.h>
18 #include <linux/module.h>
19 #include <linux/notifier.h>
21 #include <linux/platform_device.h>
22 #include <linux/pm_runtime.h>
23 #include <linux/property.h>
24 #include <linux/reset.h>
25 #include <linux/slab.h>
26 #include <linux/workqueue.h>
28 #include <asm/byteorder.h>
30 #include <linux/serial_8250.h>
31 #include <linux/serial_reg.h>
33 #include "8250_dwlib.h"
35 /* Offsets for the DesignWare specific registers */
36 #define DW_UART_USR 0x1f /* UART Status Register */
37 #define DW_UART_DMASA 0xa8 /* DMA Software Ack */
39 #define OCTEON_UART_USR 0x27 /* UART Status Register */
41 #define RZN1_UART_TDMACR 0x10c /* DMA Control Register Transmit Mode */
42 #define RZN1_UART_RDMACR 0x110 /* DMA Control Register Receive Mode */
44 /* DesignWare specific register fields */
45 #define DW_UART_MCR_SIRE BIT(6)
47 /* Renesas specific register fields */
48 #define RZN1_UART_xDMACR_DMA_EN BIT(0)
49 #define RZN1_UART_xDMACR_1_WORD_BURST (0 << 1)
50 #define RZN1_UART_xDMACR_4_WORD_BURST (1 << 1)
51 #define RZN1_UART_xDMACR_8_WORD_BURST (2 << 1)
52 #define RZN1_UART_xDMACR_BLK_SZ(x) ((x) << 3)
55 #define DW_UART_QUIRK_OCTEON BIT(0)
56 #define DW_UART_QUIRK_ARMADA_38X BIT(1)
57 #define DW_UART_QUIRK_SKIP_SET_RATE BIT(2)
58 #define DW_UART_QUIRK_IS_DMA_FC BIT(3)
60 static inline struct dw8250_data *clk_to_dw8250_data(struct notifier_block *nb)
62 return container_of(nb, struct dw8250_data, clk_notifier);
65 static inline struct dw8250_data *work_to_dw8250_data(struct work_struct *work)
67 return container_of(work, struct dw8250_data, clk_work);
70 static inline int dw8250_modify_msr(struct uart_port *p, int offset, int value)
72 struct dw8250_data *d = to_dw8250_data(p->private_data);
74 /* Override any modem control signals if needed */
75 if (offset == UART_MSR) {
76 value |= d->msr_mask_on;
77 value &= ~d->msr_mask_off;
83 static void dw8250_force_idle(struct uart_port *p)
85 struct uart_8250_port *up = up_to_u8250p(p);
88 serial8250_clear_and_reinit_fifos(up);
91 * With PSLVERR_RESP_EN parameter set to 1, the device generates an
92 * error response when an attempt to read an empty RBR with FIFO
95 if (up->fcr & UART_FCR_ENABLE_FIFO) {
96 lsr = p->serial_in(p, UART_LSR);
97 if (!(lsr & UART_LSR_DR))
101 (void)p->serial_in(p, UART_RX);
104 static void dw8250_check_lcr(struct uart_port *p, int value)
106 void __iomem *offset = p->membase + (UART_LCR << p->regshift);
109 /* Make sure LCR write wasn't ignored */
111 unsigned int lcr = p->serial_in(p, UART_LCR);
113 if ((value & ~UART_LCR_SPAR) == (lcr & ~UART_LCR_SPAR))
116 dw8250_force_idle(p);
119 if (p->type == PORT_OCTEON)
120 __raw_writeq(value & 0xff, offset);
123 if (p->iotype == UPIO_MEM32)
124 writel(value, offset);
125 else if (p->iotype == UPIO_MEM32BE)
126 iowrite32be(value, offset);
128 writeb(value, offset);
131 * FIXME: this deadlocks if port->lock is already held
132 * dev_err(p->dev, "Couldn't set LCR to %d\n", value);
136 /* Returns once the transmitter is empty or we run out of retries */
137 static void dw8250_tx_wait_empty(struct uart_port *p)
139 struct uart_8250_port *up = up_to_u8250p(p);
140 unsigned int tries = 20000;
141 unsigned int delay_threshold = tries - 1000;
145 lsr = readb (p->membase + (UART_LSR << p->regshift));
146 up->lsr_saved_flags |= lsr & up->lsr_save_mask;
148 if (lsr & UART_LSR_TEMT)
151 /* The device is first given a chance to empty without delay,
152 * to avoid slowdowns at high bitrates. If after 1000 tries
153 * the buffer has still not emptied, allow more time for low-
155 if (tries < delay_threshold)
160 static void dw8250_serial_out(struct uart_port *p, int offset, int value)
162 struct dw8250_data *d = to_dw8250_data(p->private_data);
164 writeb(value, p->membase + (offset << p->regshift));
166 if (offset == UART_LCR && !d->uart_16550_compatible)
167 dw8250_check_lcr(p, value);
170 static void dw8250_serial_out38x(struct uart_port *p, int offset, int value)
172 /* Allow the TX to drain before we reconfigure */
173 if (offset == UART_LCR)
174 dw8250_tx_wait_empty(p);
176 dw8250_serial_out(p, offset, value);
179 static unsigned int dw8250_serial_in(struct uart_port *p, int offset)
181 unsigned int value = readb(p->membase + (offset << p->regshift));
183 return dw8250_modify_msr(p, offset, value);
187 static unsigned int dw8250_serial_inq(struct uart_port *p, int offset)
191 value = (u8)__raw_readq(p->membase + (offset << p->regshift));
193 return dw8250_modify_msr(p, offset, value);
196 static void dw8250_serial_outq(struct uart_port *p, int offset, int value)
198 struct dw8250_data *d = to_dw8250_data(p->private_data);
201 __raw_writeq(value, p->membase + (offset << p->regshift));
202 /* Read back to ensure register write ordering. */
203 __raw_readq(p->membase + (UART_LCR << p->regshift));
205 if (offset == UART_LCR && !d->uart_16550_compatible)
206 dw8250_check_lcr(p, value);
208 #endif /* CONFIG_64BIT */
210 static void dw8250_serial_out32(struct uart_port *p, int offset, int value)
212 struct dw8250_data *d = to_dw8250_data(p->private_data);
214 writel(value, p->membase + (offset << p->regshift));
216 if (offset == UART_LCR && !d->uart_16550_compatible)
217 dw8250_check_lcr(p, value);
220 static unsigned int dw8250_serial_in32(struct uart_port *p, int offset)
222 unsigned int value = readl(p->membase + (offset << p->regshift));
224 return dw8250_modify_msr(p, offset, value);
227 static void dw8250_serial_out32be(struct uart_port *p, int offset, int value)
229 struct dw8250_data *d = to_dw8250_data(p->private_data);
231 iowrite32be(value, p->membase + (offset << p->regshift));
233 if (offset == UART_LCR && !d->uart_16550_compatible)
234 dw8250_check_lcr(p, value);
237 static unsigned int dw8250_serial_in32be(struct uart_port *p, int offset)
239 unsigned int value = ioread32be(p->membase + (offset << p->regshift));
241 return dw8250_modify_msr(p, offset, value);
245 static int dw8250_handle_irq(struct uart_port *p)
247 struct uart_8250_port *up = up_to_u8250p(p);
248 struct dw8250_data *d = to_dw8250_data(p->private_data);
249 unsigned int iir = p->serial_in(p, UART_IIR);
250 bool rx_timeout = (iir & 0x3f) == UART_IIR_RX_TIMEOUT;
251 unsigned int quirks = d->pdata->quirks;
256 * There are ways to get Designware-based UARTs into a state where
257 * they are asserting UART_IIR_RX_TIMEOUT but there is no actual
258 * data available. If we see such a case then we'll do a bogus
259 * read. If we don't do this then the "RX TIMEOUT" interrupt will
262 * This problem has only been observed so far when not in DMA mode
263 * so we limit the workaround only to non-DMA mode.
265 if (!up->dma && rx_timeout) {
266 uart_port_lock_irqsave(p, &flags);
267 status = serial_lsr_in(up);
269 if (!(status & (UART_LSR_DR | UART_LSR_BI)))
270 (void) p->serial_in(p, UART_RX);
272 uart_port_unlock_irqrestore(p, flags);
275 /* Manually stop the Rx DMA transfer when acting as flow controller */
276 if (quirks & DW_UART_QUIRK_IS_DMA_FC && up->dma && up->dma->rx_running && rx_timeout) {
277 uart_port_lock_irqsave(p, &flags);
278 status = serial_lsr_in(up);
279 uart_port_unlock_irqrestore(p, flags);
281 if (status & (UART_LSR_DR | UART_LSR_BI)) {
282 dw8250_writel_ext(p, RZN1_UART_RDMACR, 0);
283 dw8250_writel_ext(p, DW_UART_DMASA, 1);
287 if (serial8250_handle_irq(p, iir))
290 if ((iir & UART_IIR_BUSY) == UART_IIR_BUSY) {
292 (void)p->serial_in(p, d->pdata->usr_reg);
300 static void dw8250_clk_work_cb(struct work_struct *work)
302 struct dw8250_data *d = work_to_dw8250_data(work);
303 struct uart_8250_port *up;
306 rate = clk_get_rate(d->clk);
310 up = serial8250_get_port(d->data.line);
312 serial8250_update_uartclk(&up->port, rate);
315 static int dw8250_clk_notifier_cb(struct notifier_block *nb,
316 unsigned long event, void *data)
318 struct dw8250_data *d = clk_to_dw8250_data(nb);
321 * We have no choice but to defer the uartclk update due to two
322 * deadlocks. First one is caused by a recursive mutex lock which
323 * happens when clk_set_rate() is called from dw8250_set_termios().
324 * Second deadlock is more tricky and is caused by an inverted order of
325 * the clk and tty-port mutexes lock. It happens if clock rate change
326 * is requested asynchronously while set_termios() is executed between
327 * tty-port mutex lock and clk_set_rate() function invocation and
328 * vise-versa. Anyway if we didn't have the reference clock alteration
329 * in the dw8250_set_termios() method we wouldn't have needed this
330 * deferred event handling complication.
332 if (event == POST_RATE_CHANGE) {
333 queue_work(system_unbound_wq, &d->clk_work);
341 dw8250_do_pm(struct uart_port *port, unsigned int state, unsigned int old)
344 pm_runtime_get_sync(port->dev);
346 serial8250_do_pm(port, state, old);
349 pm_runtime_put_sync_suspend(port->dev);
352 static void dw8250_set_termios(struct uart_port *p, struct ktermios *termios,
353 const struct ktermios *old)
355 unsigned long newrate = tty_termios_baud_rate(termios) * 16;
356 struct dw8250_data *d = to_dw8250_data(p->private_data);
360 clk_disable_unprepare(d->clk);
361 rate = clk_round_rate(d->clk, newrate);
364 * Note that any clock-notifer worker will block in
365 * serial8250_update_uartclk() until we are done.
367 ret = clk_set_rate(d->clk, newrate);
371 clk_prepare_enable(d->clk);
373 dw8250_do_set_termios(p, termios, old);
376 static void dw8250_set_ldisc(struct uart_port *p, struct ktermios *termios)
378 struct uart_8250_port *up = up_to_u8250p(p);
379 unsigned int mcr = p->serial_in(p, UART_MCR);
381 if (up->capabilities & UART_CAP_IRDA) {
382 if (termios->c_line == N_IRDA)
383 mcr |= DW_UART_MCR_SIRE;
385 mcr &= ~DW_UART_MCR_SIRE;
387 p->serial_out(p, UART_MCR, mcr);
389 serial8250_do_set_ldisc(p, termios);
393 * dw8250_fallback_dma_filter will prevent the UART from getting just any free
394 * channel on platforms that have DMA engines, but don't have any channels
395 * assigned to the UART.
397 * REVISIT: This is a work around for limitation in the DMA Engine API. Once the
398 * core problem is fixed, this function is no longer needed.
400 static bool dw8250_fallback_dma_filter(struct dma_chan *chan, void *param)
405 static bool dw8250_idma_filter(struct dma_chan *chan, void *param)
407 return param == chan->device->dev;
410 static u32 dw8250_rzn1_get_dmacr_burst(int max_burst)
413 return RZN1_UART_xDMACR_8_WORD_BURST;
414 else if (max_burst >= 4)
415 return RZN1_UART_xDMACR_4_WORD_BURST;
417 return RZN1_UART_xDMACR_1_WORD_BURST;
420 static void dw8250_prepare_tx_dma(struct uart_8250_port *p)
422 struct uart_port *up = &p->port;
423 struct uart_8250_dma *dma = p->dma;
426 dw8250_writel_ext(up, RZN1_UART_TDMACR, 0);
427 val = dw8250_rzn1_get_dmacr_burst(dma->txconf.dst_maxburst) |
428 RZN1_UART_xDMACR_BLK_SZ(dma->tx_size) |
429 RZN1_UART_xDMACR_DMA_EN;
430 dw8250_writel_ext(up, RZN1_UART_TDMACR, val);
433 static void dw8250_prepare_rx_dma(struct uart_8250_port *p)
435 struct uart_port *up = &p->port;
436 struct uart_8250_dma *dma = p->dma;
439 dw8250_writel_ext(up, RZN1_UART_RDMACR, 0);
440 val = dw8250_rzn1_get_dmacr_burst(dma->rxconf.src_maxburst) |
441 RZN1_UART_xDMACR_BLK_SZ(dma->rx_size) |
442 RZN1_UART_xDMACR_DMA_EN;
443 dw8250_writel_ext(up, RZN1_UART_RDMACR, val);
446 static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
448 struct device_node *np = p->dev->of_node;
451 unsigned int quirks = data->pdata->quirks;
454 /* get index of serial line, if found in DT aliases */
455 id = of_alias_get_id(np, "serial");
459 if (quirks & DW_UART_QUIRK_OCTEON) {
460 p->serial_in = dw8250_serial_inq;
461 p->serial_out = dw8250_serial_outq;
462 p->flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_FIXED_TYPE;
463 p->type = PORT_OCTEON;
464 data->skip_autocfg = true;
468 if (of_device_is_big_endian(np)) {
469 p->iotype = UPIO_MEM32BE;
470 p->serial_in = dw8250_serial_in32be;
471 p->serial_out = dw8250_serial_out32be;
474 if (quirks & DW_UART_QUIRK_ARMADA_38X)
475 p->serial_out = dw8250_serial_out38x;
476 if (quirks & DW_UART_QUIRK_SKIP_SET_RATE)
477 p->set_termios = dw8250_do_set_termios;
478 if (quirks & DW_UART_QUIRK_IS_DMA_FC) {
479 data->data.dma.txconf.device_fc = 1;
480 data->data.dma.rxconf.device_fc = 1;
481 data->data.dma.prepare_tx_dma = dw8250_prepare_tx_dma;
482 data->data.dma.prepare_rx_dma = dw8250_prepare_rx_dma;
485 } else if (acpi_dev_present("APMC0D08", NULL, -1)) {
486 p->iotype = UPIO_MEM32;
488 p->serial_in = dw8250_serial_in32;
489 data->uart_16550_compatible = true;
492 /* Platforms with iDMA 64-bit */
493 if (platform_get_resource_byname(to_platform_device(p->dev),
494 IORESOURCE_MEM, "lpss_priv")) {
495 data->data.dma.rx_param = p->dev->parent;
496 data->data.dma.tx_param = p->dev->parent;
497 data->data.dma.fn = dw8250_idma_filter;
501 static void dw8250_reset_control_assert(void *data)
503 reset_control_assert(data);
506 static int dw8250_probe(struct platform_device *pdev)
508 struct uart_8250_port uart = {}, *up = &uart;
509 struct uart_port *p = &up->port;
510 struct device *dev = &pdev->dev;
511 struct dw8250_data *data;
512 struct resource *regs;
517 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
519 return dev_err_probe(dev, -EINVAL, "no registers defined\n");
521 irq = platform_get_irq_optional(pdev, 0);
522 /* no interrupt -> fall back to polling */
528 spin_lock_init(&p->lock);
529 p->mapbase = regs->start;
531 p->handle_irq = dw8250_handle_irq;
532 p->pm = dw8250_do_pm;
534 p->flags = UPF_SHARE_IRQ | UPF_FIXED_PORT;
536 p->iotype = UPIO_MEM;
537 p->serial_in = dw8250_serial_in;
538 p->serial_out = dw8250_serial_out;
539 p->set_ldisc = dw8250_set_ldisc;
540 p->set_termios = dw8250_set_termios;
542 p->membase = devm_ioremap(dev, regs->start, resource_size(regs));
546 data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
550 data->data.dma.fn = dw8250_fallback_dma_filter;
551 data->pdata = device_get_match_data(p->dev);
552 p->private_data = &data->data;
554 data->uart_16550_compatible = device_property_read_bool(dev,
555 "snps,uart-16550-compatible");
557 err = device_property_read_u32(dev, "reg-shift", &val);
561 err = device_property_read_u32(dev, "reg-io-width", &val);
562 if (!err && val == 4) {
563 p->iotype = UPIO_MEM32;
564 p->serial_in = dw8250_serial_in32;
565 p->serial_out = dw8250_serial_out32;
568 if (device_property_read_bool(dev, "dcd-override")) {
569 /* Always report DCD as active */
570 data->msr_mask_on |= UART_MSR_DCD;
571 data->msr_mask_off |= UART_MSR_DDCD;
574 if (device_property_read_bool(dev, "dsr-override")) {
575 /* Always report DSR as active */
576 data->msr_mask_on |= UART_MSR_DSR;
577 data->msr_mask_off |= UART_MSR_DDSR;
580 if (device_property_read_bool(dev, "cts-override")) {
581 /* Always report CTS as active */
582 data->msr_mask_on |= UART_MSR_CTS;
583 data->msr_mask_off |= UART_MSR_DCTS;
586 if (device_property_read_bool(dev, "ri-override")) {
587 /* Always report Ring indicator as inactive */
588 data->msr_mask_off |= UART_MSR_RI;
589 data->msr_mask_off |= UART_MSR_TERI;
592 /* Always ask for fixed clock rate from a property. */
593 device_property_read_u32(dev, "clock-frequency", &p->uartclk);
595 /* If there is separate baudclk, get the rate from it. */
596 data->clk = devm_clk_get_optional_enabled(dev, "baudclk");
597 if (data->clk == NULL)
598 data->clk = devm_clk_get_optional_enabled(dev, NULL);
599 if (IS_ERR(data->clk))
600 return PTR_ERR(data->clk);
602 INIT_WORK(&data->clk_work, dw8250_clk_work_cb);
603 data->clk_notifier.notifier_call = dw8250_clk_notifier_cb;
606 p->uartclk = clk_get_rate(data->clk);
608 /* If no clock rate is defined, fail. */
610 return dev_err_probe(dev, -EINVAL, "clock rate not defined\n");
612 data->pclk = devm_clk_get_optional_enabled(dev, "apb_pclk");
613 if (IS_ERR(data->pclk))
614 return PTR_ERR(data->pclk);
616 data->rst = devm_reset_control_get_optional_exclusive(dev, NULL);
617 if (IS_ERR(data->rst))
618 return PTR_ERR(data->rst);
620 reset_control_deassert(data->rst);
622 err = devm_add_action_or_reset(dev, dw8250_reset_control_assert, data->rst);
626 dw8250_quirks(p, data);
628 /* If the Busy Functionality is not implemented, don't handle it */
629 if (data->uart_16550_compatible)
630 p->handle_irq = NULL;
632 if (!data->skip_autocfg)
633 dw8250_setup_port(p);
635 /* If we have a valid fifosize, try hooking up DMA */
637 data->data.dma.rxconf.src_maxburst = p->fifosize / 4;
638 data->data.dma.txconf.dst_maxburst = p->fifosize / 4;
639 up->dma = &data->data.dma;
642 data->data.line = serial8250_register_8250_port(up);
643 if (data->data.line < 0)
644 return data->data.line;
647 * Some platforms may provide a reference clock shared between several
648 * devices. In this case any clock state change must be known to the
649 * UART port at least post factum.
652 err = clk_notifier_register(data->clk, &data->clk_notifier);
654 return dev_err_probe(dev, err, "Failed to set the clock notifier\n");
655 queue_work(system_unbound_wq, &data->clk_work);
658 platform_set_drvdata(pdev, data);
660 pm_runtime_set_active(dev);
661 pm_runtime_enable(dev);
666 static int dw8250_remove(struct platform_device *pdev)
668 struct dw8250_data *data = platform_get_drvdata(pdev);
669 struct device *dev = &pdev->dev;
671 pm_runtime_get_sync(dev);
674 clk_notifier_unregister(data->clk, &data->clk_notifier);
676 flush_work(&data->clk_work);
679 serial8250_unregister_port(data->data.line);
681 pm_runtime_disable(dev);
682 pm_runtime_put_noidle(dev);
687 static int dw8250_suspend(struct device *dev)
689 struct dw8250_data *data = dev_get_drvdata(dev);
691 serial8250_suspend_port(data->data.line);
696 static int dw8250_resume(struct device *dev)
698 struct dw8250_data *data = dev_get_drvdata(dev);
700 serial8250_resume_port(data->data.line);
705 static int dw8250_runtime_suspend(struct device *dev)
707 struct dw8250_data *data = dev_get_drvdata(dev);
709 clk_disable_unprepare(data->clk);
711 clk_disable_unprepare(data->pclk);
716 static int dw8250_runtime_resume(struct device *dev)
718 struct dw8250_data *data = dev_get_drvdata(dev);
720 clk_prepare_enable(data->pclk);
722 clk_prepare_enable(data->clk);
727 static const struct dev_pm_ops dw8250_pm_ops = {
728 SYSTEM_SLEEP_PM_OPS(dw8250_suspend, dw8250_resume)
729 RUNTIME_PM_OPS(dw8250_runtime_suspend, dw8250_runtime_resume, NULL)
732 static const struct dw8250_platform_data dw8250_dw_apb = {
733 .usr_reg = DW_UART_USR,
736 static const struct dw8250_platform_data dw8250_octeon_3860_data = {
737 .usr_reg = OCTEON_UART_USR,
738 .quirks = DW_UART_QUIRK_OCTEON,
741 static const struct dw8250_platform_data dw8250_armada_38x_data = {
742 .usr_reg = DW_UART_USR,
743 .quirks = DW_UART_QUIRK_ARMADA_38X,
746 static const struct dw8250_platform_data dw8250_renesas_rzn1_data = {
747 .usr_reg = DW_UART_USR,
748 .cpr_val = 0x00012f32,
749 .quirks = DW_UART_QUIRK_IS_DMA_FC,
752 static const struct dw8250_platform_data dw8250_starfive_jh7100_data = {
753 .usr_reg = DW_UART_USR,
754 .quirks = DW_UART_QUIRK_SKIP_SET_RATE,
757 static const struct of_device_id dw8250_of_match[] = {
758 { .compatible = "snps,dw-apb-uart", .data = &dw8250_dw_apb },
759 { .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data },
760 { .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data },
761 { .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data },
762 { .compatible = "starfive,jh7100-uart", .data = &dw8250_starfive_jh7100_data },
765 MODULE_DEVICE_TABLE(of, dw8250_of_match);
767 static const struct acpi_device_id dw8250_acpi_match[] = {
768 { "80860F0A", (kernel_ulong_t)&dw8250_dw_apb },
769 { "8086228A", (kernel_ulong_t)&dw8250_dw_apb },
770 { "AMD0020", (kernel_ulong_t)&dw8250_dw_apb },
771 { "AMDI0020", (kernel_ulong_t)&dw8250_dw_apb },
772 { "AMDI0022", (kernel_ulong_t)&dw8250_dw_apb },
773 { "APMC0D08", (kernel_ulong_t)&dw8250_dw_apb},
774 { "BRCM2032", (kernel_ulong_t)&dw8250_dw_apb },
775 { "HISI0031", (kernel_ulong_t)&dw8250_dw_apb },
776 { "INT33C4", (kernel_ulong_t)&dw8250_dw_apb },
777 { "INT33C5", (kernel_ulong_t)&dw8250_dw_apb },
778 { "INT3434", (kernel_ulong_t)&dw8250_dw_apb },
779 { "INT3435", (kernel_ulong_t)&dw8250_dw_apb },
780 { "INTC10EE", (kernel_ulong_t)&dw8250_dw_apb },
783 MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);
785 static struct platform_driver dw8250_platform_driver = {
787 .name = "dw-apb-uart",
788 .pm = pm_ptr(&dw8250_pm_ops),
789 .of_match_table = dw8250_of_match,
790 .acpi_match_table = dw8250_acpi_match,
792 .probe = dw8250_probe,
793 .remove = dw8250_remove,
796 module_platform_driver(dw8250_platform_driver);
798 MODULE_AUTHOR("Jamie Iles");
799 MODULE_LICENSE("GPL");
800 MODULE_DESCRIPTION("Synopsys DesignWare 8250 serial port driver");
801 MODULE_ALIAS("platform:dw-apb-uart");