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/clk.h>
13 #include <linux/delay.h>
14 #include <linux/device.h>
16 #include <linux/mod_devicetable.h>
17 #include <linux/module.h>
18 #include <linux/notifier.h>
19 #include <linux/platform_device.h>
20 #include <linux/pm_runtime.h>
21 #include <linux/property.h>
22 #include <linux/reset.h>
23 #include <linux/slab.h>
24 #include <linux/workqueue.h>
26 #include <asm/byteorder.h>
28 #include <linux/serial_8250.h>
29 #include <linux/serial_reg.h>
31 #include "8250_dwlib.h"
33 /* Offsets for the DesignWare specific registers */
34 #define DW_UART_USR 0x1f /* UART Status Register */
35 #define DW_UART_DMASA 0xa8 /* DMA Software Ack */
37 #define OCTEON_UART_USR 0x27 /* UART Status Register */
39 #define RZN1_UART_TDMACR 0x10c /* DMA Control Register Transmit Mode */
40 #define RZN1_UART_RDMACR 0x110 /* DMA Control Register Receive Mode */
42 /* DesignWare specific register fields */
43 #define DW_UART_MCR_SIRE BIT(6)
45 /* Renesas specific register fields */
46 #define RZN1_UART_xDMACR_DMA_EN BIT(0)
47 #define RZN1_UART_xDMACR_1_WORD_BURST (0 << 1)
48 #define RZN1_UART_xDMACR_4_WORD_BURST (1 << 1)
49 #define RZN1_UART_xDMACR_8_WORD_BURST (2 << 1)
50 #define RZN1_UART_xDMACR_BLK_SZ(x) ((x) << 3)
53 #define DW_UART_QUIRK_OCTEON BIT(0)
54 #define DW_UART_QUIRK_ARMADA_38X BIT(1)
55 #define DW_UART_QUIRK_SKIP_SET_RATE BIT(2)
56 #define DW_UART_QUIRK_IS_DMA_FC BIT(3)
57 #define DW_UART_QUIRK_APMC0D08 BIT(4)
59 static inline struct dw8250_data *clk_to_dw8250_data(struct notifier_block *nb)
61 return container_of(nb, struct dw8250_data, clk_notifier);
64 static inline struct dw8250_data *work_to_dw8250_data(struct work_struct *work)
66 return container_of(work, struct dw8250_data, clk_work);
69 static inline int dw8250_modify_msr(struct uart_port *p, int offset, int value)
71 struct dw8250_data *d = to_dw8250_data(p->private_data);
73 /* Override any modem control signals if needed */
74 if (offset == UART_MSR) {
75 value |= d->msr_mask_on;
76 value &= ~d->msr_mask_off;
82 static void dw8250_force_idle(struct uart_port *p)
84 struct uart_8250_port *up = up_to_u8250p(p);
87 serial8250_clear_and_reinit_fifos(up);
90 * With PSLVERR_RESP_EN parameter set to 1, the device generates an
91 * error response when an attempt to read an empty RBR with FIFO
94 if (up->fcr & UART_FCR_ENABLE_FIFO) {
95 lsr = p->serial_in(p, UART_LSR);
96 if (!(lsr & UART_LSR_DR))
100 (void)p->serial_in(p, UART_RX);
103 static void dw8250_check_lcr(struct uart_port *p, int value)
105 void __iomem *offset = p->membase + (UART_LCR << p->regshift);
108 /* Make sure LCR write wasn't ignored */
110 unsigned int lcr = p->serial_in(p, UART_LCR);
112 if ((value & ~UART_LCR_SPAR) == (lcr & ~UART_LCR_SPAR))
115 dw8250_force_idle(p);
118 if (p->type == PORT_OCTEON)
119 __raw_writeq(value & 0xff, offset);
122 if (p->iotype == UPIO_MEM32)
123 writel(value, offset);
124 else if (p->iotype == UPIO_MEM32BE)
125 iowrite32be(value, offset);
127 writeb(value, offset);
130 * FIXME: this deadlocks if port->lock is already held
131 * dev_err(p->dev, "Couldn't set LCR to %d\n", value);
135 /* Returns once the transmitter is empty or we run out of retries */
136 static void dw8250_tx_wait_empty(struct uart_port *p)
138 struct uart_8250_port *up = up_to_u8250p(p);
139 unsigned int tries = 20000;
140 unsigned int delay_threshold = tries - 1000;
144 lsr = readb (p->membase + (UART_LSR << p->regshift));
145 up->lsr_saved_flags |= lsr & up->lsr_save_mask;
147 if (lsr & UART_LSR_TEMT)
150 /* The device is first given a chance to empty without delay,
151 * to avoid slowdowns at high bitrates. If after 1000 tries
152 * the buffer has still not emptied, allow more time for low-
154 if (tries < delay_threshold)
159 static void dw8250_serial_out(struct uart_port *p, int offset, int value)
161 struct dw8250_data *d = to_dw8250_data(p->private_data);
163 writeb(value, p->membase + (offset << p->regshift));
165 if (offset == UART_LCR && !d->uart_16550_compatible)
166 dw8250_check_lcr(p, value);
169 static void dw8250_serial_out38x(struct uart_port *p, int offset, int value)
171 /* Allow the TX to drain before we reconfigure */
172 if (offset == UART_LCR)
173 dw8250_tx_wait_empty(p);
175 dw8250_serial_out(p, offset, value);
178 static unsigned int dw8250_serial_in(struct uart_port *p, int offset)
180 unsigned int value = readb(p->membase + (offset << p->regshift));
182 return dw8250_modify_msr(p, offset, value);
186 static unsigned int dw8250_serial_inq(struct uart_port *p, int offset)
190 value = (u8)__raw_readq(p->membase + (offset << p->regshift));
192 return dw8250_modify_msr(p, offset, value);
195 static void dw8250_serial_outq(struct uart_port *p, int offset, int value)
197 struct dw8250_data *d = to_dw8250_data(p->private_data);
200 __raw_writeq(value, p->membase + (offset << p->regshift));
201 /* Read back to ensure register write ordering. */
202 __raw_readq(p->membase + (UART_LCR << p->regshift));
204 if (offset == UART_LCR && !d->uart_16550_compatible)
205 dw8250_check_lcr(p, value);
207 #endif /* CONFIG_64BIT */
209 static void dw8250_serial_out32(struct uart_port *p, int offset, int value)
211 struct dw8250_data *d = to_dw8250_data(p->private_data);
213 writel(value, p->membase + (offset << p->regshift));
215 if (offset == UART_LCR && !d->uart_16550_compatible)
216 dw8250_check_lcr(p, value);
219 static unsigned int dw8250_serial_in32(struct uart_port *p, int offset)
221 unsigned int value = readl(p->membase + (offset << p->regshift));
223 return dw8250_modify_msr(p, offset, value);
226 static void dw8250_serial_out32be(struct uart_port *p, int offset, int value)
228 struct dw8250_data *d = to_dw8250_data(p->private_data);
230 iowrite32be(value, p->membase + (offset << p->regshift));
232 if (offset == UART_LCR && !d->uart_16550_compatible)
233 dw8250_check_lcr(p, value);
236 static unsigned int dw8250_serial_in32be(struct uart_port *p, int offset)
238 unsigned int value = ioread32be(p->membase + (offset << p->regshift));
240 return dw8250_modify_msr(p, offset, value);
244 static int dw8250_handle_irq(struct uart_port *p)
246 struct uart_8250_port *up = up_to_u8250p(p);
247 struct dw8250_data *d = to_dw8250_data(p->private_data);
248 unsigned int iir = p->serial_in(p, UART_IIR);
249 bool rx_timeout = (iir & 0x3f) == UART_IIR_RX_TIMEOUT;
250 unsigned int quirks = d->pdata->quirks;
255 * There are ways to get Designware-based UARTs into a state where
256 * they are asserting UART_IIR_RX_TIMEOUT but there is no actual
257 * data available. If we see such a case then we'll do a bogus
258 * read. If we don't do this then the "RX TIMEOUT" interrupt will
261 * This problem has only been observed so far when not in DMA mode
262 * so we limit the workaround only to non-DMA mode.
264 if (!up->dma && rx_timeout) {
265 uart_port_lock_irqsave(p, &flags);
266 status = serial_lsr_in(up);
268 if (!(status & (UART_LSR_DR | UART_LSR_BI)))
269 (void) p->serial_in(p, UART_RX);
271 uart_port_unlock_irqrestore(p, flags);
274 /* Manually stop the Rx DMA transfer when acting as flow controller */
275 if (quirks & DW_UART_QUIRK_IS_DMA_FC && up->dma && up->dma->rx_running && rx_timeout) {
276 uart_port_lock_irqsave(p, &flags);
277 status = serial_lsr_in(up);
278 uart_port_unlock_irqrestore(p, flags);
280 if (status & (UART_LSR_DR | UART_LSR_BI)) {
281 dw8250_writel_ext(p, RZN1_UART_RDMACR, 0);
282 dw8250_writel_ext(p, DW_UART_DMASA, 1);
286 if (serial8250_handle_irq(p, iir))
289 if ((iir & UART_IIR_BUSY) == UART_IIR_BUSY) {
291 (void)p->serial_in(p, d->pdata->usr_reg);
299 static void dw8250_clk_work_cb(struct work_struct *work)
301 struct dw8250_data *d = work_to_dw8250_data(work);
302 struct uart_8250_port *up;
305 rate = clk_get_rate(d->clk);
309 up = serial8250_get_port(d->data.line);
311 serial8250_update_uartclk(&up->port, rate);
314 static int dw8250_clk_notifier_cb(struct notifier_block *nb,
315 unsigned long event, void *data)
317 struct dw8250_data *d = clk_to_dw8250_data(nb);
320 * We have no choice but to defer the uartclk update due to two
321 * deadlocks. First one is caused by a recursive mutex lock which
322 * happens when clk_set_rate() is called from dw8250_set_termios().
323 * Second deadlock is more tricky and is caused by an inverted order of
324 * the clk and tty-port mutexes lock. It happens if clock rate change
325 * is requested asynchronously while set_termios() is executed between
326 * tty-port mutex lock and clk_set_rate() function invocation and
327 * vise-versa. Anyway if we didn't have the reference clock alteration
328 * in the dw8250_set_termios() method we wouldn't have needed this
329 * deferred event handling complication.
331 if (event == POST_RATE_CHANGE) {
332 queue_work(system_unbound_wq, &d->clk_work);
340 dw8250_do_pm(struct uart_port *port, unsigned int state, unsigned int old)
343 pm_runtime_get_sync(port->dev);
345 serial8250_do_pm(port, state, old);
348 pm_runtime_put_sync_suspend(port->dev);
351 static void dw8250_set_termios(struct uart_port *p, struct ktermios *termios,
352 const struct ktermios *old)
354 unsigned long newrate = tty_termios_baud_rate(termios) * 16;
355 struct dw8250_data *d = to_dw8250_data(p->private_data);
359 rate = clk_round_rate(d->clk, newrate);
360 if (rate > 0 && p->uartclk != rate) {
361 clk_disable_unprepare(d->clk);
363 * Note that any clock-notifer worker will block in
364 * serial8250_update_uartclk() until we are done.
366 ret = clk_set_rate(d->clk, newrate);
369 clk_prepare_enable(d->clk);
372 dw8250_do_set_termios(p, termios, old);
375 static void dw8250_set_ldisc(struct uart_port *p, struct ktermios *termios)
377 struct uart_8250_port *up = up_to_u8250p(p);
378 unsigned int mcr = p->serial_in(p, UART_MCR);
380 if (up->capabilities & UART_CAP_IRDA) {
381 if (termios->c_line == N_IRDA)
382 mcr |= DW_UART_MCR_SIRE;
384 mcr &= ~DW_UART_MCR_SIRE;
386 p->serial_out(p, UART_MCR, mcr);
388 serial8250_do_set_ldisc(p, termios);
392 * dw8250_fallback_dma_filter will prevent the UART from getting just any free
393 * channel on platforms that have DMA engines, but don't have any channels
394 * assigned to the UART.
396 * REVISIT: This is a work around for limitation in the DMA Engine API. Once the
397 * core problem is fixed, this function is no longer needed.
399 static bool dw8250_fallback_dma_filter(struct dma_chan *chan, void *param)
404 static bool dw8250_idma_filter(struct dma_chan *chan, void *param)
406 return param == chan->device->dev;
409 static u32 dw8250_rzn1_get_dmacr_burst(int max_burst)
412 return RZN1_UART_xDMACR_8_WORD_BURST;
413 else if (max_burst >= 4)
414 return RZN1_UART_xDMACR_4_WORD_BURST;
416 return RZN1_UART_xDMACR_1_WORD_BURST;
419 static void dw8250_prepare_tx_dma(struct uart_8250_port *p)
421 struct uart_port *up = &p->port;
422 struct uart_8250_dma *dma = p->dma;
425 dw8250_writel_ext(up, RZN1_UART_TDMACR, 0);
426 val = dw8250_rzn1_get_dmacr_burst(dma->txconf.dst_maxburst) |
427 RZN1_UART_xDMACR_BLK_SZ(dma->tx_size) |
428 RZN1_UART_xDMACR_DMA_EN;
429 dw8250_writel_ext(up, RZN1_UART_TDMACR, val);
432 static void dw8250_prepare_rx_dma(struct uart_8250_port *p)
434 struct uart_port *up = &p->port;
435 struct uart_8250_dma *dma = p->dma;
438 dw8250_writel_ext(up, RZN1_UART_RDMACR, 0);
439 val = dw8250_rzn1_get_dmacr_burst(dma->rxconf.src_maxburst) |
440 RZN1_UART_xDMACR_BLK_SZ(dma->rx_size) |
441 RZN1_UART_xDMACR_DMA_EN;
442 dw8250_writel_ext(up, RZN1_UART_RDMACR, val);
445 static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
447 unsigned int quirks = data->pdata ? data->pdata->quirks : 0;
450 if (quirks & DW_UART_QUIRK_OCTEON) {
451 p->serial_in = dw8250_serial_inq;
452 p->serial_out = dw8250_serial_outq;
453 p->flags = UPF_SKIP_TEST | UPF_SHARE_IRQ | UPF_FIXED_TYPE;
454 p->type = PORT_OCTEON;
455 data->skip_autocfg = true;
459 if (quirks & DW_UART_QUIRK_ARMADA_38X)
460 p->serial_out = dw8250_serial_out38x;
461 if (quirks & DW_UART_QUIRK_SKIP_SET_RATE)
462 p->set_termios = dw8250_do_set_termios;
463 if (quirks & DW_UART_QUIRK_IS_DMA_FC) {
464 data->data.dma.txconf.device_fc = 1;
465 data->data.dma.rxconf.device_fc = 1;
466 data->data.dma.prepare_tx_dma = dw8250_prepare_tx_dma;
467 data->data.dma.prepare_rx_dma = dw8250_prepare_rx_dma;
469 if (quirks & DW_UART_QUIRK_APMC0D08) {
470 p->iotype = UPIO_MEM32;
472 p->serial_in = dw8250_serial_in32;
473 data->uart_16550_compatible = true;
476 /* Platforms with iDMA 64-bit */
477 if (platform_get_resource_byname(to_platform_device(p->dev),
478 IORESOURCE_MEM, "lpss_priv")) {
479 data->data.dma.rx_param = p->dev->parent;
480 data->data.dma.tx_param = p->dev->parent;
481 data->data.dma.fn = dw8250_idma_filter;
485 static void dw8250_reset_control_assert(void *data)
487 reset_control_assert(data);
490 static int dw8250_probe(struct platform_device *pdev)
492 struct uart_8250_port uart = {}, *up = &uart;
493 struct uart_port *p = &up->port;
494 struct device *dev = &pdev->dev;
495 struct dw8250_data *data;
496 struct resource *regs;
499 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
501 return dev_err_probe(dev, -EINVAL, "no registers defined\n");
503 spin_lock_init(&p->lock);
504 p->handle_irq = dw8250_handle_irq;
505 p->pm = dw8250_do_pm;
507 p->flags = UPF_FIXED_PORT;
509 p->set_ldisc = dw8250_set_ldisc;
510 p->set_termios = dw8250_set_termios;
512 data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
516 data->data.dma.fn = dw8250_fallback_dma_filter;
517 data->pdata = device_get_match_data(p->dev);
518 p->private_data = &data->data;
520 data->uart_16550_compatible = device_property_read_bool(dev,
521 "snps,uart-16550-compatible");
523 p->mapbase = regs->start;
524 p->mapsize = resource_size(regs);
526 p->membase = devm_ioremap(dev, p->mapbase, p->mapsize);
530 err = uart_read_port_properties(p);
531 /* no interrupt -> fall back to polling */
539 p->serial_in = dw8250_serial_in;
540 p->serial_out = dw8250_serial_out;
543 p->serial_in = dw8250_serial_in32;
544 p->serial_out = dw8250_serial_out32;
547 p->serial_in = dw8250_serial_in32be;
548 p->serial_out = dw8250_serial_out32be;
554 if (device_property_read_bool(dev, "dcd-override")) {
555 /* Always report DCD as active */
556 data->msr_mask_on |= UART_MSR_DCD;
557 data->msr_mask_off |= UART_MSR_DDCD;
560 if (device_property_read_bool(dev, "dsr-override")) {
561 /* Always report DSR as active */
562 data->msr_mask_on |= UART_MSR_DSR;
563 data->msr_mask_off |= UART_MSR_DDSR;
566 if (device_property_read_bool(dev, "cts-override")) {
567 /* Always report CTS as active */
568 data->msr_mask_on |= UART_MSR_CTS;
569 data->msr_mask_off |= UART_MSR_DCTS;
572 if (device_property_read_bool(dev, "ri-override")) {
573 /* Always report Ring indicator as inactive */
574 data->msr_mask_off |= UART_MSR_RI;
575 data->msr_mask_off |= UART_MSR_TERI;
578 /* If there is separate baudclk, get the rate from it. */
579 data->clk = devm_clk_get_optional_enabled(dev, "baudclk");
580 if (data->clk == NULL)
581 data->clk = devm_clk_get_optional_enabled(dev, NULL);
582 if (IS_ERR(data->clk))
583 return dev_err_probe(dev, PTR_ERR(data->clk),
584 "failed to get baudclk\n");
586 INIT_WORK(&data->clk_work, dw8250_clk_work_cb);
587 data->clk_notifier.notifier_call = dw8250_clk_notifier_cb;
590 p->uartclk = clk_get_rate(data->clk);
592 /* If no clock rate is defined, fail. */
594 return dev_err_probe(dev, -EINVAL, "clock rate not defined\n");
596 data->pclk = devm_clk_get_optional_enabled(dev, "apb_pclk");
597 if (IS_ERR(data->pclk))
598 return PTR_ERR(data->pclk);
600 data->rst = devm_reset_control_get_optional_exclusive(dev, NULL);
601 if (IS_ERR(data->rst))
602 return PTR_ERR(data->rst);
604 reset_control_deassert(data->rst);
606 err = devm_add_action_or_reset(dev, dw8250_reset_control_assert, data->rst);
610 dw8250_quirks(p, data);
612 /* If the Busy Functionality is not implemented, don't handle it */
613 if (data->uart_16550_compatible)
614 p->handle_irq = NULL;
616 if (!data->skip_autocfg)
617 dw8250_setup_port(p);
619 /* If we have a valid fifosize, try hooking up DMA */
621 data->data.dma.rxconf.src_maxburst = p->fifosize / 4;
622 data->data.dma.txconf.dst_maxburst = p->fifosize / 4;
623 up->dma = &data->data.dma;
626 data->data.line = serial8250_register_8250_port(up);
627 if (data->data.line < 0)
628 return data->data.line;
631 * Some platforms may provide a reference clock shared between several
632 * devices. In this case any clock state change must be known to the
633 * UART port at least post factum.
636 err = clk_notifier_register(data->clk, &data->clk_notifier);
638 return dev_err_probe(dev, err, "Failed to set the clock notifier\n");
639 queue_work(system_unbound_wq, &data->clk_work);
642 platform_set_drvdata(pdev, data);
644 pm_runtime_set_active(dev);
645 pm_runtime_enable(dev);
650 static void dw8250_remove(struct platform_device *pdev)
652 struct dw8250_data *data = platform_get_drvdata(pdev);
653 struct device *dev = &pdev->dev;
655 pm_runtime_get_sync(dev);
658 clk_notifier_unregister(data->clk, &data->clk_notifier);
660 flush_work(&data->clk_work);
663 serial8250_unregister_port(data->data.line);
665 pm_runtime_disable(dev);
666 pm_runtime_put_noidle(dev);
669 static int dw8250_suspend(struct device *dev)
671 struct dw8250_data *data = dev_get_drvdata(dev);
673 serial8250_suspend_port(data->data.line);
678 static int dw8250_resume(struct device *dev)
680 struct dw8250_data *data = dev_get_drvdata(dev);
682 serial8250_resume_port(data->data.line);
687 static int dw8250_runtime_suspend(struct device *dev)
689 struct dw8250_data *data = dev_get_drvdata(dev);
691 clk_disable_unprepare(data->clk);
693 clk_disable_unprepare(data->pclk);
698 static int dw8250_runtime_resume(struct device *dev)
700 struct dw8250_data *data = dev_get_drvdata(dev);
702 clk_prepare_enable(data->pclk);
704 clk_prepare_enable(data->clk);
709 static const struct dev_pm_ops dw8250_pm_ops = {
710 SYSTEM_SLEEP_PM_OPS(dw8250_suspend, dw8250_resume)
711 RUNTIME_PM_OPS(dw8250_runtime_suspend, dw8250_runtime_resume, NULL)
714 static const struct dw8250_platform_data dw8250_dw_apb = {
715 .usr_reg = DW_UART_USR,
718 static const struct dw8250_platform_data dw8250_octeon_3860_data = {
719 .usr_reg = OCTEON_UART_USR,
720 .quirks = DW_UART_QUIRK_OCTEON,
723 static const struct dw8250_platform_data dw8250_armada_38x_data = {
724 .usr_reg = DW_UART_USR,
725 .quirks = DW_UART_QUIRK_ARMADA_38X,
728 static const struct dw8250_platform_data dw8250_renesas_rzn1_data = {
729 .usr_reg = DW_UART_USR,
730 .cpr_val = 0x00012f32,
731 .quirks = DW_UART_QUIRK_IS_DMA_FC,
734 static const struct dw8250_platform_data dw8250_starfive_jh7100_data = {
735 .usr_reg = DW_UART_USR,
736 .quirks = DW_UART_QUIRK_SKIP_SET_RATE,
739 static const struct of_device_id dw8250_of_match[] = {
740 { .compatible = "snps,dw-apb-uart", .data = &dw8250_dw_apb },
741 { .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data },
742 { .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data },
743 { .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data },
744 { .compatible = "starfive,jh7100-uart", .data = &dw8250_starfive_jh7100_data },
747 MODULE_DEVICE_TABLE(of, dw8250_of_match);
749 static const struct dw8250_platform_data dw8250_apmc0d08 = {
750 .usr_reg = DW_UART_USR,
751 .quirks = DW_UART_QUIRK_APMC0D08,
754 static const struct acpi_device_id dw8250_acpi_match[] = {
755 { "80860F0A", (kernel_ulong_t)&dw8250_dw_apb },
756 { "8086228A", (kernel_ulong_t)&dw8250_dw_apb },
757 { "AMD0020", (kernel_ulong_t)&dw8250_dw_apb },
758 { "AMDI0020", (kernel_ulong_t)&dw8250_dw_apb },
759 { "AMDI0022", (kernel_ulong_t)&dw8250_dw_apb },
760 { "APMC0D08", (kernel_ulong_t)&dw8250_apmc0d08 },
761 { "BRCM2032", (kernel_ulong_t)&dw8250_dw_apb },
762 { "HISI0031", (kernel_ulong_t)&dw8250_dw_apb },
763 { "INT33C4", (kernel_ulong_t)&dw8250_dw_apb },
764 { "INT33C5", (kernel_ulong_t)&dw8250_dw_apb },
765 { "INT3434", (kernel_ulong_t)&dw8250_dw_apb },
766 { "INT3435", (kernel_ulong_t)&dw8250_dw_apb },
767 { "INTC10EE", (kernel_ulong_t)&dw8250_dw_apb },
770 MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);
772 static struct platform_driver dw8250_platform_driver = {
774 .name = "dw-apb-uart",
775 .pm = pm_ptr(&dw8250_pm_ops),
776 .of_match_table = dw8250_of_match,
777 .acpi_match_table = dw8250_acpi_match,
779 .probe = dw8250_probe,
780 .remove_new = dw8250_remove,
783 module_platform_driver(dw8250_platform_driver);
785 MODULE_AUTHOR("Jamie Iles");
786 MODULE_LICENSE("GPL");
787 MODULE_DESCRIPTION("Synopsys DesignWare 8250 serial port driver");
788 MODULE_ALIAS("platform:dw-apb-uart");