summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Marklund <robert.marklund@stericsson.com>2011-05-27 12:03:53 +0200
committerPhilippe LANGLAIS <philippe.langlais@stericsson.com>2011-05-27 16:17:28 +0200
commit3e0c0465fc26db176d0635c8fce22c52fd1bfb7e (patch)
treed4327e5fac7bd22d0ec4930052925a5ae5d82072
parenta1fc3af865eba0374eca0a977d9f2b681950ee97 (diff)
serial: pl011: Fix enable of pins
ST-Ericsson Linux next: 342766 ST-Ericsson ID: 340139 ST-Ericsson FOSS-OUT ID: Trivial Signed-off-by: Robert Marklund <robert.marklund@stericsson.com> Change-Id: I47692d7a7993cbeda53dfca737d6346f043336f3 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24059 Reviewed-by: Par-Gunnar HJALMDAHL <par-gunnar.p.hjalmdahl@stericsson.com> Reviewed-by: Dmitry TARNYAGIN <dmitry.tarnyagin@stericsson.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
-rw-r--r--drivers/tty/serial/amba-pl011.c16
-rw-r--r--include/linux/amba/serial.h2
2 files changed, 18 insertions, 0 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 57731e87008..647254eac70 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1341,6 +1341,14 @@ static int pl011_startup(struct uart_port *port)
writew(uap->im, uap->port.membase + UART011_IMSC);
spin_unlock_irq(&uap->port.lock);
+ if (uap->port.dev->platform_data) {
+ struct amba_pl011_data *plat;
+
+ plat = uap->port.dev->platform_data;
+ if (plat->init)
+ plat->init();
+ }
+
return 0;
clk_dis:
@@ -1392,6 +1400,14 @@ static void pl011_shutdown(struct uart_port *port)
if (uap->lcrh_rx != uap->lcrh_tx)
pl011_shutdown_channel(uap, uap->lcrh_tx);
+ if (uap->port.dev->platform_data) {
+ struct amba_pl011_data *plat;
+
+ plat = uap->port.dev->platform_data;
+ if (plat->exit)
+ plat->exit();
+ }
+
/*
* Shut down the clock producer
*/
diff --git a/include/linux/amba/serial.h b/include/linux/amba/serial.h
index 5479fdc849e..4d297b61f5e 100644
--- a/include/linux/amba/serial.h
+++ b/include/linux/amba/serial.h
@@ -201,6 +201,8 @@ struct amba_pl011_data {
bool (*dma_filter)(struct dma_chan *chan, void *filter_param);
void *dma_rx_param;
void *dma_tx_param;
+ void (*init) (void);
+ void (*exit) (void);
};
#endif