summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorRay Jui <rjui@broadcom.com>2014-10-07 17:35:47 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-05 19:24:07 -0800
commita8b26e1af94825296f29eee6bfc001c5543d3c7e (patch)
treec52a4952234096d27ff71ac360fb303c97462ecb /drivers/tty
parent10263f656a23e303d9d2ae1336ea6ff83f0714ef (diff)
downloadop-kernel-dev-a8b26e1af94825296f29eee6bfc001c5543d3c7e.zip
op-kernel-dev-a8b26e1af94825296f29eee6bfc001c5543d3c7e.tar.gz
serial: 8250_dw: Add DMA support for non-ACPI platforms
The dma pointer under struct uart_8250_port is currently left unassigned for non-ACPI platforms. It should be pointing to the dma member in struct dw8250_data like how it was done for ACPI, so the core 8250 code will try to request for DMA when registering the port If DMA is not enabled in device tree, request DMA will fail and the driver will fall back to PIO Signed-off-by: Ray Jui <rjui@broadcom.com> Reviewed-by: JD (Jiandong) Zheng <jdzheng@broadcom.com> Reviewed-by: Scott Branden <sbranden@broadcom.com> Tested-by: Scott Branden <sbranden@broadcom.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_dw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index beea6ca..73a14ae 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -290,6 +290,14 @@ static int dw8250_probe_of(struct uart_port *p,
if (has_ucv)
dw8250_setup_port(up);
+ /* if we have a valid fifosize, try hooking up DMA here */
+ if (p->fifosize) {
+ up->dma = &data->dma;
+
+ up->dma->rxconf.src_maxburst = p->fifosize / 4;
+ up->dma->txconf.dst_maxburst = p->fifosize / 4;
+ }
+
if (!of_property_read_u32(np, "reg-shift", &val))
p->regshift = val;
OpenPOWER on IntegriCloud