]> err.no Git - linux-2.6/commitdiff
[POWERPC] Separate MPC52xx PSC FIFO registers from rest of PSC
authorJohn Rigby <jrigby@freescale.com>
Wed, 16 Jan 2008 21:37:24 +0000 (08:37 +1100)
committerGrant Likely <grant.likely@secretlab.ca>
Mon, 21 Jan 2008 18:01:32 +0000 (11:01 -0700)
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>
drivers/serial/mpc52xx_uart.c
include/asm-powerpc/mpc52xx_psc.h
include/asm-ppc/mpc52xx_psc.h

index 7e3ba8b455a82a061b01b88d02345a9e8623a3a1..141b8da7e0e7d3beaeb527e871f5fe691a685c3f 100644 (file)
@@ -112,6 +112,7 @@ static void mpc52xx_uart_of_enumerate(void);
 #endif
 
 #define PSC(port) ((struct mpc52xx_psc __iomem *)((port)->membase))
+#define FIFO(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1))
 
 
 /* Forward declaration of the interruption handling routine */
@@ -223,6 +224,7 @@ static int
 mpc52xx_uart_startup(struct uart_port *port)
 {
        struct mpc52xx_psc __iomem *psc = PSC(port);
+       struct mpc52xx_psc_fifo __iomem *fifo = FIFO(port);
        int ret;
 
        /* Request IRQ */
@@ -239,10 +241,10 @@ mpc52xx_uart_startup(struct uart_port *port)
 
        out_be16(&psc->mpc52xx_psc_clock_select, 0xdd00); /* /16 prescaler on */
 
-       out_8(&psc->rfcntl, 0x00);
-       out_be16(&psc->rfalarm, 0x1ff);
-       out_8(&psc->tfcntl, 0x07);
-       out_be16(&psc->tfalarm, 0x80);
+       out_8(&fifo->rfcntl, 0x00);
+       out_be16(&fifo->rfalarm, 0x1ff);
+       out_8(&fifo->tfcntl, 0x07);
+       out_be16(&fifo->tfalarm, 0x80);
 
        port->read_status_mask |= MPC52xx_PSC_IMR_RXRDY | MPC52xx_PSC_IMR_TXRDY;
        out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask);
index 26690d2b32f53dc7b9b6581c7e8cc3b480a1ceeb..bea42b95390f3aec6e1bf6732faba42f9785ddd4 100644 (file)
@@ -153,6 +153,9 @@ struct mpc52xx_psc {
        u8              reserved16[3];
        u8              irfdr;          /* PSC + 0x54 */
        u8              reserved17[3];
+};
+
+struct mpc52xx_psc_fifo {
        u16             rfnum;          /* PSC + 0x58 */
        u16             reserved18;
        u16             tfnum;          /* PSC + 0x5c */
index c82b8d49a7da9fa21e978f8ccdeb1dddb7ec4f04..39fcd02cd4e8c1994d753de37eac1fb10c6689f3 100644 (file)
@@ -159,6 +159,9 @@ struct mpc52xx_psc {
        u8              reserved16[3];
        u8              irfdr;          /* PSC + 0x54 */
        u8              reserved17[3];
+};
+
+struct mpc52xx_psc_fifo {
        u16             rfnum;          /* PSC + 0x58 */
        u16             reserved18;
        u16             tfnum;          /* PSC + 0x5c */