aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2013-09-05 10:34:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-26 17:27:24 -0400
commitfe95855539fd0a0e54412efc596adfe802a5c605 (patch)
tree34253262158b28029768562c0b89b034ab92ea68 /drivers/tty/serial/8250
parent2797f6fb6727d8ac5127f88aee1fd059db0be24b (diff)
serial: 8250_dw: don't limit DMA support to ACPI
It should be available for DT users as well. This does not enable DMA by default except with ACPI. DT users can enable DMA based on a property. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r--drivers/tty/serial/8250/8250_dw.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index daf710f5c3fc..d7a405b12600 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -56,11 +56,12 @@
56 56
57 57
58struct dw8250_data { 58struct dw8250_data {
59 int last_lcr; 59 u8 usr_reg;
60 int last_mcr; 60 int last_lcr;
61 int line; 61 int last_mcr;
62 struct clk *clk; 62 int line;
63 u8 usr_reg; 63 struct clk *clk;
64 struct uart_8250_dma dma;
64}; 65};
65 66
66static inline int dw8250_modify_msr(struct uart_port *p, int offset, int value) 67static inline int dw8250_modify_msr(struct uart_port *p, int offset, int value)
@@ -241,7 +242,8 @@ static int dw8250_probe_of(struct uart_port *p,
241} 242}
242 243
243#ifdef CONFIG_ACPI 244#ifdef CONFIG_ACPI
244static int dw8250_probe_acpi(struct uart_8250_port *up) 245static int dw8250_probe_acpi(struct uart_8250_port *up,
246 struct dw8250_data *data)
245{ 247{
246 const struct acpi_device_id *id; 248 const struct acpi_device_id *id;
247 struct uart_port *p = &up->port; 249 struct uart_port *p = &up->port;
@@ -260,9 +262,7 @@ static int dw8250_probe_acpi(struct uart_8250_port *up)
260 if (!p->uartclk) 262 if (!p->uartclk)
261 p->uartclk = (unsigned int)id->driver_data; 263 p->uartclk = (unsigned int)id->driver_data;
262 264
263 up->dma = devm_kzalloc(p->dev, sizeof(*up->dma), GFP_KERNEL); 265 up->dma = &data->dma;
264 if (!up->dma)
265 return -ENOMEM;
266 266
267 up->dma->rxconf.src_maxburst = p->fifosize / 4; 267 up->dma->rxconf.src_maxburst = p->fifosize / 4;
268 up->dma->txconf.dst_maxburst = p->fifosize / 4; 268 up->dma->txconf.dst_maxburst = p->fifosize / 4;
@@ -324,7 +324,7 @@ static int dw8250_probe(struct platform_device *pdev)
324 if (err) 324 if (err)
325 return err; 325 return err;
326 } else if (ACPI_HANDLE(&pdev->dev)) { 326 } else if (ACPI_HANDLE(&pdev->dev)) {
327 err = dw8250_probe_acpi(&uart); 327 err = dw8250_probe_acpi(&uart, data);
328 if (err) 328 if (err)
329 return err; 329 return err;
330 } else { 330 } else {