From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Chou Date: Wed, 18 Nov 2015 21:44:48 +0800 Subject: [U-Boot] [PATCH v2 02/13] ns16550: change map_sysmem to map_physmem In-Reply-To: <1447854299-23680-1-git-send-email-thomas@wytron.com.tw> References: <1447684616-10297-1-git-send-email-thomas@wytron.com.tw> <1447854299-23680-1-git-send-email-thomas@wytron.com.tw> Message-ID: <1447854299-23680-3-git-send-email-thomas@wytron.com.tw> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Change map_sysmem() to map_physmem(), because sandbox is the only arch which define map_sysmem() and it actually only calls map_physmem(). For some arch like nios2, the flag should be MAP_NOCACHE for port access. Signed-off-by: Thomas Chou --- drivers/serial/ns16550.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 6433844..8d028de 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -97,7 +96,7 @@ static void ns16550_writeb(NS16550_t port, int offset, int value) unsigned char *addr; offset *= 1 << plat->reg_shift; - addr = map_sysmem(plat->base, 0) + offset; + addr = map_physmem(plat->base, 0, MAP_NOCACHE) + offset; /* * As far as we know it doesn't make sense to support selection of * these options at run-time, so use the existing CONFIG options. @@ -111,7 +110,7 @@ static int ns16550_readb(NS16550_t port, int offset) unsigned char *addr; offset *= 1 << plat->reg_shift; - addr = map_sysmem(plat->base, 0) + offset; + addr = map_physmem(plat->base, 0, MAP_NOCACHE) + offset; return serial_in_shift(addr, plat->reg_shift); } -- 2.5.0