> + > +/** to work with the 8250 UART driver implementation we need this function */ > +static unsigned int malta_uart_read(unsigned long base, unsigned char reg_idx) > +{ > + return readb((char *)base + reg_idx); > +} > + > +/** to work with the 8250 UART driver implementation we need this function */ > +static void malta_uart_write(unsigned int val, unsigned long base, unsigned char reg_idx) > +{ > + writeb(val, (char *)base + reg_idx); > +} > + > +static struct NS16550_plat serial_plat = { > + .clock = 1843200, /* no matter */ why no matter? > + .f_caps = CONSOLE_STDIN | CONSOLE_STDOUT | CONSOLE_STDERR, > + .reg_read = malta_uart_read, > + .reg_write = malta_uart_write, plewase tab for indent > +}; > + > +/* we are expecting always one serial interface */ > +static struct device_d generic_malta_serial_device = { > + .name = "serial_ns16550", > + .map_base = DEBUG_LL_UART_ADDR, > + .size = 8, > + .platform_data = (void *)&serial_plat, > +}; > + > +static int malta_console_init(void) > +{ > + /* Register the serial port */ > + return register_device(&generic_malta_serial_device); > +} > +console_initcall(malta_console_init); > diff --git a/arch/mips/configs/qemu-malta_defconfig b/arch/mips/configs/qemu-malta_defconfig > new file mode 100644 > index 0000000..507df8a > --- /dev/null > +++ b/arch/mips/configs/qemu-malta_defconfig > @@ -0,0 +1,46 @@ > +CONFIG_STACK_SIZE=0x7000 > +CONFIG_BROKEN=y > +CONFIG_EXPERIMENTAL=y > +CONFIG_PROMPT="uboot:" barebox > +CONFIG_LONGHELP=y > +CONFIG_HUSH_FANCY_PROMPT=y > +CONFIG_HUSH_GETOPT=y > +CONFIG_CMDLINE_EDITING=y > +CONFIG_AUTO_COMPLETE=y > +CONFIG_MENU=y > +CONFIG_PASSWORD=y > +CONFIG_PARTITION=y > +# CONFIG_DEFAULT_ENVIRONMENT is not set Best Regards, J. _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox