/*
- * 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.
* or implied.
*/
-#include <linux/config.h>
#include <linux/types.h>
#include <linux/serial.h>
#include <linux/tty.h> /* For linux/serial_core.h */
#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> */
};
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)
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