9
0
Fork 0

MIPS: loongson-ls1b: add ns16550-based console

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Antony Pavlov 2014-01-18 19:12:59 +04:00 committed by Sascha Hauer
parent b7f18a40e9
commit b496743c61
3 changed files with 24 additions and 0 deletions

View File

@ -1 +1,2 @@
obj-y += ram.o
obj-y += serial.o

View File

@ -0,0 +1,22 @@
#include <common.h>
#include <init.h>
#include <ns16550.h>
#include <mach/loongson1.h>
static struct NS16550_plat serial_plat = {
.clock = 83000000,
.shift = 0,
};
static int console_init(void)
{
barebox_set_model("Loongson Tech LS1B Demo Board");
barebox_set_hostname("ls1b");
add_ns16550_device(DEVICE_ID_DYNAMIC, KSEG1ADDR(LS1X_UART2_BASE),
8, IORESOURCE_MEM_8BIT, &serial_plat);
return 0;
}
console_initcall(console_init);

View File

@ -14,6 +14,7 @@ config BOARD_LOONGSON_TECH_LS1B
select SYS_SUPPORTS_LITTLE_ENDIAN
select CSRC_R4K_LIB
select HAS_DEBUG_LL
select DRIVER_SERIAL_NS16550
endchoice