summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-07-28 09:39:46 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-07-29 12:00:41 +0200
commit90c35f44f1dbd09815df8ee9a036c2bfe165896a (patch)
tree040e5753ec96b897872eda95ff6497165a6ce049 /arch/x86
parentddf349e0118c48a7266e8b1fecfe17408cdcb769 (diff)
downloadbarebox-90c35f44f1dbd09815df8ee9a036c2bfe165896a.tar.gz
barebox-90c35f44f1dbd09815df8ee9a036c2bfe165896a.tar.xz
add a ns16550 registration helper and use it
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/boards/x86_generic/generic_pc.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/x86/boards/x86_generic/generic_pc.c b/arch/x86/boards/x86_generic/generic_pc.c
index fa2975f016..d031c523b0 100644
--- a/arch/x86/boards/x86_generic/generic_pc.c
+++ b/arch/x86/boards/x86_generic/generic_pc.c
@@ -83,19 +83,12 @@ static struct NS16550_plat serial_plat = {
.reg_write = x86_uart_write,
};
-/* we are expecting always one serial interface */
-static struct device_d generic_pc_serial_device = {
- .id = -1,
- .name = "serial_ns16550",
- .map_base = 0x3f8,
- .size = 8,
- .platform_data = (void *)&serial_plat,
-};
-
static int pc_console_init(void)
{
- /* Register the serial port */
- return register_device(&generic_pc_serial_device);
+ /* Register the serial port */
+ add_ns16550_device(-1, 0x3f8, 8, &serial_plat);
+
+ return 0;
}
console_initcall(pc_console_init);