diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-01-19 01:37:31 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-19 01:37:31 -0500 |
commit | 27bd107525607e6a64c612ca3c43ca0dac4768b1 (patch) | |
tree | f508fa9c1ed15fe840de3f41e39887dc98944e07 | |
parent | ce6738b60d94bb317bc568ef7b81a227b2928bd4 (diff) |
serial: sh-sci: Kill off some DMA ifdeffery.
There's nothing worth hiding under the ifdef in the platform DMA
definitions, and we certainly don't want board code adding this in to
their platform data definitions, so we always expose the slave rx/tx
and device pointer members instead.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | drivers/serial/sh-sci.c | 14 | ||||
-rw-r--r-- | include/linux/serial_sci.h | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index dccc9822ab9b..5b3e9769ca21 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -1423,6 +1423,14 @@ static void sci_free_dma(struct uart_port *port) | |||
1423 | if (s->chan_rx) | 1423 | if (s->chan_rx) |
1424 | sci_rx_dma_release(s, false); | 1424 | sci_rx_dma_release(s, false); |
1425 | } | 1425 | } |
1426 | #else | ||
1427 | static inline void sci_request_dma(struct uart_port *port) | ||
1428 | { | ||
1429 | } | ||
1430 | |||
1431 | static inline void sci_free_dma(struct uart_port *port) | ||
1432 | { | ||
1433 | } | ||
1426 | #endif | 1434 | #endif |
1427 | 1435 | ||
1428 | static int sci_startup(struct uart_port *port) | 1436 | static int sci_startup(struct uart_port *port) |
@@ -1435,9 +1443,7 @@ static int sci_startup(struct uart_port *port) | |||
1435 | s->enable(port); | 1443 | s->enable(port); |
1436 | 1444 | ||
1437 | sci_request_irq(s); | 1445 | sci_request_irq(s); |
1438 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | ||
1439 | sci_request_dma(port); | 1446 | sci_request_dma(port); |
1440 | #endif | ||
1441 | sci_start_tx(port); | 1447 | sci_start_tx(port); |
1442 | sci_start_rx(port); | 1448 | sci_start_rx(port); |
1443 | 1449 | ||
@@ -1452,9 +1458,7 @@ static void sci_shutdown(struct uart_port *port) | |||
1452 | 1458 | ||
1453 | sci_stop_rx(port); | 1459 | sci_stop_rx(port); |
1454 | sci_stop_tx(port); | 1460 | sci_stop_tx(port); |
1455 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | ||
1456 | sci_free_dma(port); | 1461 | sci_free_dma(port); |
1457 | #endif | ||
1458 | sci_free_irq(s); | 1462 | sci_free_irq(s); |
1459 | 1463 | ||
1460 | if (s->disable) | 1464 | if (s->disable) |
@@ -1726,11 +1730,9 @@ static int __devinit sci_init_single(struct platform_device *dev, | |||
1726 | */ | 1730 | */ |
1727 | port->irq = p->irqs[SCIx_TXI_IRQ]; | 1731 | port->irq = p->irqs[SCIx_TXI_IRQ]; |
1728 | 1732 | ||
1729 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | ||
1730 | if (p->dma_dev) | 1733 | if (p->dma_dev) |
1731 | dev_dbg(port->dev, "DMA device %p, tx %d, rx %d\n", | 1734 | dev_dbg(port->dev, "DMA device %p, tx %d, rx %d\n", |
1732 | p->dma_dev, p->dma_slave_tx, p->dma_slave_rx); | 1735 | p->dma_dev, p->dma_slave_tx, p->dma_slave_rx); |
1733 | #endif | ||
1734 | 1736 | ||
1735 | return 0; | 1737 | return 0; |
1736 | } | 1738 | } |
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 01ffe7c56e5b..a2afc9fbe186 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
@@ -58,10 +58,8 @@ struct plat_sci_port { | |||
58 | 58 | ||
59 | struct device *dma_dev; | 59 | struct device *dma_dev; |
60 | 60 | ||
61 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | 61 | unsigned int dma_slave_tx; |
62 | unsigned int dma_slave_tx; | 62 | unsigned int dma_slave_rx; |
63 | unsigned int dma_slave_rx; | ||
64 | #endif | ||
65 | }; | 63 | }; |
66 | 64 | ||
67 | #endif /* __LINUX_SERIAL_SCI_H */ | 65 | #endif /* __LINUX_SERIAL_SCI_H */ |