diff options
author | Michel Stam <m.stam@fugro.nl> | 2014-04-07 12:01:21 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-04-08 08:17:55 +0200 |
commit | 9c8f73ba86884026f4bbfc6f593d73741cfebcdc (patch) | |
tree | baaf34e77043e6e264f5320210e1303ba8e7793a /arch/x86/boards/x86_generic/serial_ns16550.c | |
parent | 4d94f56c6c5ba00d35d6b3e3a1862439b2ced3f0 (diff) | |
download | barebox-9c8f73ba86884026f4bbfc6f593d73741cfebcdc.tar.gz barebox-9c8f73ba86884026f4bbfc6f593d73741cfebcdc.tar.xz |
x86: Add support for IDE on the legacy I/O ports
Signed-off-by: Michel Stam <michel@reverze.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/x86/boards/x86_generic/serial_ns16550.c')
-rw-r--r-- | arch/x86/boards/x86_generic/serial_ns16550.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/x86/boards/x86_generic/serial_ns16550.c b/arch/x86/boards/x86_generic/serial_ns16550.c new file mode 100644 index 0000000000..cae61df1d6 --- /dev/null +++ b/arch/x86/boards/x86_generic/serial_ns16550.c @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2009 Juergen Beisert, Pengutronix, Michel Stam, + * Fugro Intersite + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * + */ + +/** + * @file + * @brief Generic PC support to let barebox acting as a boot loader + */ + +#include <common.h> +#include <types.h> +#include <driver.h> +#include <init.h> +#include <asm/syslib.h> +#include <ns16550.h> +#include <linux/err.h> + +static struct NS16550_plat serial_plat = { + .clock = 1843200, + .reg_read = x86_uart_read, + .reg_write = x86_uart_write, +}; + +static int pc_console_init(void) +{ + barebox_set_model("X86 generic barebox"); + barebox_set_hostname("x86"); + + /* Register the serial port */ + add_ns16550_device(DEVICE_ID_DYNAMIC, 0x3f8, 8, 0, &serial_plat); + + return 0; +} +console_initcall(pc_console_init); |