[U-Boot] [PATCH 12/26] [ns16550] Enable port-mapped access

Graeme Russ graeme.russ at gmail.com
Sun Apr 11 15:07:20 CEST 2010


Nishanth Menon wrote:
> 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
> [...]
> 
<snip>
>> +#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?
<snip>

Hmm, true. Or maybe CONFIG_SYS_NS16550_PORT_MAPPED instead of
CONFIG_X86 so the default of memory mapped is silently retained

I think CONFIG_SYS is more appropriate as per the README:

* Configuration _SETTINGS_:
  These depend on the hardware etc. and should not be meddled with if
  you don't know what you're doing; they have names beginning with
  "CONFIG_SYS_".


Regards,

Graeme


More information about the U-Boot mailing list