ppc32: allow usage of gen550 on platforms that do not define SERIAL_PORT_DFNS
Kumar Gala
galak at freescale.com
Sat Jan 22 03:47:39 EST 2005
Allows a platform to initialize serial_state completely from gen550_init
and no longer requires it to define SERIAL_PORT_DFNS.
Signed-off-by: Kumar Gala <kumar.gala at freescale.com>
---
diff -Nru a/arch/ppc/syslib/gen550_dbg.c b/arch/ppc/syslib/gen550_dbg.c
--- a/arch/ppc/syslib/gen550_dbg.c 2005-01-21 10:43:30 -06:00
+++ b/arch/ppc/syslib/gen550_dbg.c 2005-01-21 10:43:30 -06:00
@@ -29,6 +29,11 @@
#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> */
};
@@ -154,6 +159,7 @@
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
More information about the Linuxppc-embedded
mailing list