From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Sun, 11 Apr 2010 23:07:20 +1000 Subject: [U-Boot] [PATCH 12/26] [ns16550] Enable port-mapped access In-Reply-To: <4BC1C5D5.3050200@gmail.com> References: <1270989829-2711-1-git-send-email-graeme.russ@gmail.com> <1270989829-2711-13-git-send-email-graeme.russ@gmail.com> <4BC1C5D5.3050200@gmail.com> Message-ID: <4BC1C988.6040609@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > [...] > >> +#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? 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