Commit 586801f7 authored by Kumar Gala's avatar Kumar Gala Committed by Linus Torvalds

[PATCH] ppc32: allow usage of gen550 on platforms that do not define SERIAL_PORT_DFNS

Allows a platform to initialize serial_state completely from gen550_init
and no longer requires it to define SERIAL_PORT_DFNS.
Signed-off-by: default avatarKumar Gala <kumar.gala@freescale.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 83df3f84
...@@ -29,6 +29,11 @@ ...@@ -29,6 +29,11 @@
#define SERIAL_BAUD 9600 #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] = { static struct serial_state rs_table[RS_TABLE_SIZE] = {
SERIAL_PORT_DFNS /* defined in <asm/serial.h> */ SERIAL_PORT_DFNS /* defined in <asm/serial.h> */
}; };
...@@ -154,6 +159,7 @@ gen550_init(int i, struct uart_port *serial_req) ...@@ -154,6 +159,7 @@ gen550_init(int i, struct uart_port *serial_req)
rs_table[i].port = serial_req->iobase; rs_table[i].port = serial_req->iobase;
rs_table[i].iomem_base = serial_req->membase; rs_table[i].iomem_base = serial_req->membase;
rs_table[i].iomem_reg_shift = serial_req->regshift; 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 #ifdef CONFIG_SERIAL_TEXT_DEBUG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment