diff options
author | John Rigby <jrigby@freescale.com> | 2008-01-16 16:37:24 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2008-01-21 13:01:32 -0500 |
commit | 94f389485e27641348c1951ab8d65157122a8939 (patch) | |
tree | 513c59839b466e893b9c8e3db2d6a0df2a8db11b /drivers/serial/mpc52xx_uart.c | |
parent | 5b5820d08b8cc90ba0148bf8d4a5a1f792e9e8ba (diff) |
[POWERPC] Separate MPC52xx PSC FIFO registers from rest of PSC
This is in preparation for the addition of MPC512x
PSC support. The main difference in the 512x is
in the fifo registers.
Signed-off-by: John Rigby <jrigby@freescale.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/serial/mpc52xx_uart.c')
-rw-r--r-- | drivers/serial/mpc52xx_uart.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 7e3ba8b455a8..141b8da7e0e7 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -112,6 +112,7 @@ static void mpc52xx_uart_of_enumerate(void); | |||
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | #define PSC(port) ((struct mpc52xx_psc __iomem *)((port)->membase)) | 114 | #define PSC(port) ((struct mpc52xx_psc __iomem *)((port)->membase)) |
115 | #define FIFO(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1)) | ||
115 | 116 | ||
116 | 117 | ||
117 | /* Forward declaration of the interruption handling routine */ | 118 | /* Forward declaration of the interruption handling routine */ |
@@ -223,6 +224,7 @@ static int | |||
223 | mpc52xx_uart_startup(struct uart_port *port) | 224 | mpc52xx_uart_startup(struct uart_port *port) |
224 | { | 225 | { |
225 | struct mpc52xx_psc __iomem *psc = PSC(port); | 226 | struct mpc52xx_psc __iomem *psc = PSC(port); |
227 | struct mpc52xx_psc_fifo __iomem *fifo = FIFO(port); | ||
226 | int ret; | 228 | int ret; |
227 | 229 | ||
228 | /* Request IRQ */ | 230 | /* Request IRQ */ |
@@ -239,10 +241,10 @@ mpc52xx_uart_startup(struct uart_port *port) | |||
239 | 241 | ||
240 | out_be16(&psc->mpc52xx_psc_clock_select, 0xdd00); /* /16 prescaler on */ | 242 | out_be16(&psc->mpc52xx_psc_clock_select, 0xdd00); /* /16 prescaler on */ |
241 | 243 | ||
242 | out_8(&psc->rfcntl, 0x00); | 244 | out_8(&fifo->rfcntl, 0x00); |
243 | out_be16(&psc->rfalarm, 0x1ff); | 245 | out_be16(&fifo->rfalarm, 0x1ff); |
244 | out_8(&psc->tfcntl, 0x07); | 246 | out_8(&fifo->tfcntl, 0x07); |
245 | out_be16(&psc->tfalarm, 0x80); | 247 | out_be16(&fifo->tfalarm, 0x80); |
246 | 248 | ||
247 | port->read_status_mask |= MPC52xx_PSC_IMR_RXRDY | MPC52xx_PSC_IMR_TXRDY; | 249 | port->read_status_mask |= MPC52xx_PSC_IMR_RXRDY | MPC52xx_PSC_IMR_TXRDY; |
248 | out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask); | 250 | out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask); |