From patchwork Wed Mar 1 01:39:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Ungerer X-Patchwork-Id: 9597309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 58860600CB for ; Wed, 1 Mar 2017 01:41:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49F1427F7F for ; Wed, 1 Mar 2017 01:41:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E8C9284DA; Wed, 1 Mar 2017 01:41:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D0A0327F7F for ; Wed, 1 Mar 2017 01:41:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=2mZwJBlf3iAl03tQ8OjOgjpxyUoP1Qu9NNEP0msVstA=; b=mgyXitEFmha6ez6HUcNP+dKCp0 Awj9IWpkLOQulh3+tPd5rqdkpIur8hFTqLSeGAIs416wF1Hfv1GUZhw/gaJ1NJ/qvVqrdzTAgsnxJ ZQDkP894TLeU1T/w5UBX21KbGt4O8CWTSXZs684KjHzCQfb99vNLEvDx97MoFUGi7nMvP2r9iCNWS QWkZcAoCRU9WRbCNLhx2T8fRU/NwcVzjJ8eBFyR42uTjcF0f0YkmSlU5sPNIXPZMiR1hUHYVPr9e9 LxzPfO8Xi/sr0hL5srLpgeh0m65vBUzS02bFtENLtZiwpjH/Ikz0orivUzpW3lIfKh7HZHHQAj5sY e/3lNDnA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1citH0-0007G7-8x; Wed, 01 Mar 2017 01:41:46 +0000 Received: from icp-osb-irony-out9.external.iinet.net.au ([203.59.1.226]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1citFg-0005fo-Sh for linux-arm-kernel@lists.infradead.org; Wed, 01 Mar 2017 01:40:29 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DmBAALJrZY/zXSMGdeHAEBBAEBCgEBg1CBaoMNmw4BAQEBBphkGoYIAoIuVwECAQEBAQECYiiEcQZ5EBgnElcZiWoMtBgmAop/ATGGB4pUhRkFnCOSLopghjaTMleBASEUCCQIhQ0dgXMuNYlwAQEB X-IPAS-Result: A2DmBAALJrZY/zXSMGdeHAEBBAEBCgEBg1CBaoMNmw4BAQEBBphkGoYIAoIuVwECAQEBAQECYiiEcQZ5EBgnElcZiWoMtBgmAop/ATGGB4pUhRkFnCOSLopghjaTMleBASEUCCQIhQ0dgXMuNYlwAQEB X-IronPort-AV: E=Sophos;i="5.35,222,1483977600"; d="scan'208";a="179219654" Received: from unknown (HELO goober.accelecon.com) ([103.48.210.53]) by icp-osb-irony-out9.iinet.net.au with ESMTP; 01 Mar 2017 09:40:02 +0800 From: Greg Ungerer To: linux-arm-kernel@lists.infradead.org Subject: [PATCHv3 1/4] ARM: versatile: support no-MMU mode addressing Date: Wed, 1 Mar 2017 11:39:42 +1000 Message-Id: <1488332385-3367-2-git-send-email-gerg@uclinux.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1488332385-3367-1-git-send-email-gerg@uclinux.org> References: <1488332385-3367-1-git-send-email-gerg@uclinux.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170228_174025_205198_89866E14 X-CRM114-Status: UNSURE ( 6.49 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robh@kernel.org, wangkefeng.wang@huawei.com, arnd@arndb.de, linus.walleij@linaro.org, nicolas.ferre@atmel.com, linux@armlinux.org.uk, Greg Ungerer MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently for the versatile boards the IO_ADDRESS() macro applies static virtual address mapping for built-in IO devices. When operating without the MMU enabled IO devices are accessed at their physical address, no address translation is required. For the !CONFIG_MMU case then define the IO_ADDRESS() macro to return the physical address. Signed-off-by: Greg Ungerer --- arch/arm/mach-versatile/versatile_dt.c | 4 ++++ 1 file changed, 4 insertions(+) v2: no change v3: rebase on top of linux-4.10 diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c index 3c8d39c..8cfa05a 100644 --- a/arch/arm/mach-versatile/versatile_dt.c +++ b/arch/arm/mach-versatile/versatile_dt.c @@ -37,7 +37,11 @@ #include /* macro to get at MMIO space when running virtually */ +#ifdef CONFIG_MMU #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000) +#else +#define IO_ADDRESS(x) (x) +#endif #define __io_address(n) ((void __iomem __force *)IO_ADDRESS(n)) /*