From 7c86ad4a50ece39305b1be900df9a58645716602 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 19 Jan 2011 14:16:42 +0900 Subject: serial: sh-sci: Kill off unused clock string. Now that the clock string isn't used by the driver anymore, kill it off from the platform structure. Signed-off-by: Paul Mundt --- include/linux/serial_sci.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 1630d9cae22a..f538132f9622 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h @@ -45,7 +45,6 @@ struct plat_sci_port { unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */ unsigned int type; /* SCI / SCIF / IRDA */ upf_t flags; /* UPF_* flags */ - char *clk; /* clock string */ unsigned int scbrr_algo_id; /* SCBRR calculation algo */ unsigned int scscr; /* SCSCR initialization */ -- cgit v1.2.3 From e735038f3848a720f84a819c8191ed2f6a1beed8 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 19 Jan 2011 14:18:06 +0900 Subject: serial: sh-sci: Kill off unused membase kludge. All users of the platform port data specify a mapbase where the driver later derives the membase from. Now that UPF flags are taken in to account for generic ioremapping we can kill off the port-specific membase clobbering and simply use the generic paths. This derives from a time when sh64 was not capable of using the generic ioremap implementation and had employed early bolted DTLB mappings for port access, which is no longer an issue. Signed-off-by: Paul Mundt --- drivers/serial/sh-sci.c | 4 ---- include/linux/serial_sci.h | 1 - 2 files changed, 5 deletions(-) (limited to 'include') diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 92c91c83edde..1d1e700c7a43 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -1619,9 +1619,6 @@ static void sci_config_port(struct uart_port *port, int flags) port->type = s->type; - if (port->membase) - return; - if (port->flags & UPF_IOREMAP) { port->membase = ioremap_nocache(port->mapbase, 0x40); @@ -1727,7 +1724,6 @@ static int __devinit sci_init_single(struct platform_device *dev, init_timer(&sci_port->break_timer); port->mapbase = p->mapbase; - port->membase = p->membase; port->irq = p->irqs[SCIx_TXI_IRQ]; port->flags = p->flags; diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index f538132f9622..789acf5b31d3 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h @@ -40,7 +40,6 @@ struct device; * Platform device specific platform_data struct */ struct plat_sci_port { - void __iomem *membase; /* io cookie */ unsigned long mapbase; /* resource base */ unsigned int irqs[SCIx_NR_IRQS]; /* ERI, RXI, TXI, BRI */ unsigned int type; /* SCI / SCIF / IRDA */ -- cgit v1.2.3 From 22cc83780e214f4f009384f9c1d0658629625d49 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 19 Jan 2011 14:37:14 +0900 Subject: serial: sh-sci: Provide a helper for muxed IRQs. All of the muxed IRQs presently populate the IRQ array verbosely, this simply provides a trivial helper to do it for them. Signed-off-by: Paul Mundt --- include/linux/serial_sci.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 789acf5b31d3..01ffe7c56e5b 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h @@ -34,6 +34,14 @@ enum { SCIx_NR_IRQS, }; +#define SCIx_IRQ_MUXED(irq) \ +{ \ + [SCIx_ERI_IRQ] = (irq), \ + [SCIx_RXI_IRQ] = (irq), \ + [SCIx_TXI_IRQ] = (irq), \ + [SCIx_BRI_IRQ] = (irq), \ +} + struct device; /* -- cgit v1.2.3 From 27bd107525607e6a64c612ca3c43ca0dac4768b1 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 19 Jan 2011 15:37:31 +0900 Subject: 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 --- drivers/serial/sh-sci.c | 14 ++++++++------ include/linux/serial_sci.h | 6 ++---- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'include') 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) if (s->chan_rx) sci_rx_dma_release(s, false); } +#else +static inline void sci_request_dma(struct uart_port *port) +{ +} + +static inline void sci_free_dma(struct uart_port *port) +{ +} #endif static int sci_startup(struct uart_port *port) @@ -1435,9 +1443,7 @@ static int sci_startup(struct uart_port *port) s->enable(port); sci_request_irq(s); -#ifdef CONFIG_SERIAL_SH_SCI_DMA sci_request_dma(port); -#endif sci_start_tx(port); sci_start_rx(port); @@ -1452,9 +1458,7 @@ static void sci_shutdown(struct uart_port *port) sci_stop_rx(port); sci_stop_tx(port); -#ifdef CONFIG_SERIAL_SH_SCI_DMA sci_free_dma(port); -#endif sci_free_irq(s); if (s->disable) @@ -1726,11 +1730,9 @@ static int __devinit sci_init_single(struct platform_device *dev, */ port->irq = p->irqs[SCIx_TXI_IRQ]; -#ifdef CONFIG_SERIAL_SH_SCI_DMA if (p->dma_dev) dev_dbg(port->dev, "DMA device %p, tx %d, rx %d\n", p->dma_dev, p->dma_slave_tx, p->dma_slave_rx); -#endif return 0; } 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 { struct device *dma_dev; -#ifdef CONFIG_SERIAL_SH_SCI_DMA - unsigned int dma_slave_tx; - unsigned int dma_slave_rx; -#endif + unsigned int dma_slave_tx; + unsigned int dma_slave_rx; }; #endif /* __LINUX_SERIAL_SCI_H */ -- cgit v1.2.3