On 04/11/2010 07:43 AM, Graeme Russ wrote: > The x86 architecture exclusively uses Port-Mapped I/O (inb/outb) to access > the 16550 UARTs. This patch mimics how Linux selects between Memory-Mapped > and Port-Mapped I/O. This allows x86 boards to use CONFIG_SERIAL_MUTLI and > drop the custom serial port driver [...]
> diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c > index b3bf10b..0e9beb7 100644 > --- a/drivers/serial/ns16550.c > +++ b/drivers/serial/ns16550.c > @@ -7,6 +7,8 @@ > #include<config.h> > #include<ns16550.h> > #include<watchdog.h> > +#include<linux/types.h> > +#include<asm/io.h> > > #define UART_LCRVAL UART_LCR_8N1 /* 8 data, 1 stop, no parity */ > #define UART_MCRVAL (UART_MCR_DTR | \ > @@ -14,28 +16,35 @@ > #define UART_FCRVAL (UART_FCR_FIFO_EN | \ > UART_FCR_RXSR | \ > UART_FCR_TXSR) /* Clear& enable FIFOs */ > +#ifdef CONFIG_X86 > +#define serial_out(x,y) outb(x,(ulong)y) > +#define serial_in(y) inb((ulong)y) > +#else > +#define serial_out(x,y) writeb(x,y) > +#define serial_in(y) readb(y) > +#endif wont it be nice if we have: CONFIG_NS16550_PORT_MAPPED CONFIG_NS16550_MEMORY_MAPPED ? rather than being tied to x86? [..] Regards, Nishanth Menon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot