From: Nishanth Menon <menon.nishanth@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 12/26] [ns16550] Enable port-mapped access
Date: Sun, 11 Apr 2010 07:51:33 -0500 [thread overview]
Message-ID: <4BC1C5D5.3050200@gmail.com> (raw)
In-Reply-To: <1270989829-2711-13-git-send-email-graeme.russ@gmail.com>
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
next prev parent reply other threads:[~2010-04-11 12:51 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-11 12:43 [U-Boot] [PATCH v2 00/26] [x86] 'Comming of Age' Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 01/26] [x86] Add unaligned.h Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 02/26] [x86] #ifdef out getenv_IPaddr() Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 03/26] [x86] Fix MMCR Access Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 04/26] [x86] Add register dump to crash handlers Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 05/26] [x86] Fix do_go_exec() Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 06/26] [x86] Fix sc520 memory size reporting Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 07/26] [x86] Split sc520 memory sizing versus reporting Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 08/26] [x86] Add RAM bootstrap functionality Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 09/26] [x86] Move GDT to a safe location in RAM Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 10/26] [x86] Pass relocation offset into Global Data Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 11/26] [x86] Fix copying of Real-Mode code into RAM Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 12/26] [ns16550] Enable port-mapped access Graeme Russ
2010-04-11 12:51 ` Nishanth Menon [this message]
2010-04-11 13:07 ` Graeme Russ
2010-04-11 13:09 ` Nishanth Menon
2010-04-11 12:43 ` [U-Boot] [PATCH 13/26] [x86] Use CONFIG_SERIAL_MULTI Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 14/26] [x86] Provide weak PC/AT compatibility setup function Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 15/26] [x86] Fix support for booting bzImage Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 16/26] [sc520] Allow boards to override udelay Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 17/26] [eNET] Fix Flash Write Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 18/26] [eNET] Fix CONFIG_SYS_HZ to be 1000 Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 19/26] [sc520] Move PCI defines to PCI include file Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 20/26] [sc520] Board Specific PCI Init Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 21/26] [eNET] Add support for onboard RTL8100B (RTL8139) chips Graeme Russ
2010-04-11 16:39 ` Ben Warren
2010-04-11 12:43 ` [U-Boot] [PATCH 22/26] [eNET] Add PC/AT compatibility setup function Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 23/26] Use SC520 MMCR to reset eNET board Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 24/26] Implement eNET Watchdog Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 25/26] [sc520] Update to new AMD Copyright Graeme Russ
2010-04-11 12:43 ` Graeme Russ
2010-04-11 12:43 ` [U-Boot] [PATCH 26/26] [sc520] Fix minor DRAM Controller Setup bug Graeme Russ
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BC1C5D5.3050200@gmail.com \
--to=menon.nishanth@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox