--- linux/arch/ppc/boot/common/ns16550.c 2004-08-14 20:56:23.000000000 +1000 +++ play-2.6.9.new/arch/ppc/boot/common/ns16550.c 2004-09-16 13:56:44.000000000 +1000 @@ -11,8 +11,8 @@ #define SERIAL_BAUD 9600 -extern void outb(int port, unsigned char val); -extern unsigned char inb(int port); +extern void outb(unsigned int val, unsigned int port); +extern unsigned int inb(unsigned int port); extern unsigned long ISA_io; static struct serial_state rs_table[RS_TABLE_SIZE] = { @@ -47,7 +47,7 @@ /* save the LCR */ lcr = inb(com_port + (UART_LCR << shift)); /* Access baud rate */ - outb(com_port + (UART_LCR << shift), 0x80); + outb(0x80, com_port + (UART_LCR << shift)); dlm = inb(com_port + (UART_DLM << shift)); /* * Test if serial port is unconfigured. @@ -58,20 +58,20 @@ if ((dlm <= 4) && (lcr & 2)) /* port is configured, put the old LCR back */ - outb(com_port + (UART_LCR << shift), lcr); + outb(lcr, com_port + (UART_LCR << shift)); else { /* Input clock. */ - outb(com_port + (UART_DLL << shift), - (BASE_BAUD / SERIAL_BAUD) & 0xFF); - outb(com_port + (UART_DLM << shift), - (BASE_BAUD / SERIAL_BAUD) >> 8); + outb((BASE_BAUD / SERIAL_BAUD) & 0xFF, + com_port + (UART_DLL << shift)); + outb((BASE_BAUD / SERIAL_BAUD) >> 8, + com_port + (UART_DLM << shift)); /* 8 data, 1 stop, no parity */ - outb(com_port + (UART_LCR << shift), 0x03); + outb(0x03, com_port + (UART_LCR << shift)); /* RTS/DTR */ - outb(com_port + (UART_MCR << shift), 0x03); + outb(0x03, com_port + (UART_MCR << shift)); } /* Clear & enable FIFOs */ - outb(com_port + (UART_FCR << shift), 0x07); + outb(0x07, com_port + (UART_FCR << shift)); return (com_port); } @@ -81,7 +81,7 @@ { while ((inb(com_port + (UART_LSR << shift)) & UART_LSR_THRE) == 0) ; - outb(com_port, c); + outb(c, com_port); } unsigned char