Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / ppc / syslib / gen550_dbg.c
index 4692ba7..9fcff74 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/syslib/gen550_dbg.c
- *
  * A library of polled 16550 serial routines.  These are intended to
  * be used to support progress messages, xmon, kgdb, etc. on a
  * variety of platforms.
 
 #define SERIAL_BAUD    9600
 
+/* SERIAL_PORT_DFNS is defined in <asm/serial.h> */
+#ifndef SERIAL_PORT_DFNS
+#define SERIAL_PORT_DFNS
+#endif
+
 static struct serial_state rs_table[RS_TABLE_SIZE] = {
        SERIAL_PORT_DFNS        /* defined in <asm/serial.h> */
 };
@@ -40,12 +43,12 @@ static int shift;
 
 unsigned long direct_inb(unsigned long addr)
 {
-       return readb(addr);
+       return readb((void __iomem *)addr);
 }
 
 void direct_outb(unsigned long addr, unsigned char val)
 {
-       writeb(val, addr);
+       writeb(val, (void __iomem *)addr);
 }
 
 unsigned long io_inb(unsigned long port)
@@ -154,6 +157,7 @@ gen550_init(int i, struct uart_port *serial_req)
        rs_table[i].port = serial_req->iobase;
        rs_table[i].iomem_base = serial_req->membase;
        rs_table[i].iomem_reg_shift = serial_req->regshift;
+       rs_table[i].baud_base = serial_req->uartclk ? serial_req->uartclk / 16 : BASE_BAUD;
 }
 
 #ifdef CONFIG_SERIAL_TEXT_DEBUG