From patchwork Mon Nov 16 14:36:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Chou X-Patchwork-Id: 545038 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 017D8141469 for ; Tue, 17 Nov 2015 01:37:21 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4E7D34B68A; Mon, 16 Nov 2015 15:37:19 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6Dx3tyNL9gWe; Mon, 16 Nov 2015 15:37:19 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C05C74B6AD; Mon, 16 Nov 2015 15:37:18 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 879DA4B6CD for ; Mon, 16 Nov 2015 15:37:06 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RRayZsv5IOQn for ; Mon, 16 Nov 2015 15:37:06 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from www.wytron.com.tw (220-134-43-68.HINET-IP.hinet.net [220.134.43.68]) by theia.denx.de (Postfix) with ESMTP id 1AEDC4B6C6 for ; Mon, 16 Nov 2015 15:37:01 +0100 (CET) Received: from localhost.localdomain (unknown [192.168.1.250]) by www.wytron.com.tw (Postfix) with ESMTP id F098CD00332; Mon, 16 Nov 2015 22:36:58 +0800 (CST) From: Thomas Chou To: u-boot@lists.denx.de Date: Mon, 16 Nov 2015 22:36:47 +0800 Message-Id: <1447684616-10297-4-git-send-email-thomas@wytron.com.tw> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1447684616-10297-1-git-send-email-thomas@wytron.com.tw> References: <1447684616-10297-1-git-send-email-thomas@wytron.com.tw> Cc: Marek Vasut , Tom Rini , clsee@altera.com, Tom Warren , lftan@altera.com Subject: [U-Boot] [PATCH 03/12] ns16550: change map_sysmem to map_physmem X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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); }