From patchwork Mon Jun 18 14:19:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Ungerer X-Patchwork-Id: 10471679 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 1C6FB60532 for ; Mon, 18 Jun 2018 14:20:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AE7928AE8 for ; Mon, 18 Jun 2018 14:20:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2D0528AF2; Mon, 18 Jun 2018 14:20:46 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 6EAAD28ACD for ; Mon, 18 Jun 2018 14:20:46 +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=VsHUzJy8H1K7Z3sd3zswc+fQMCuLRKlFRIE7GKwcYyE=; b=ViZ4SAcBerGz65hUlg1e/6TMyG kFkNlNbV0unodKhcd067/vSOCluIYJtDSGBU1fp446Q0S/iLOHoaMbRaKMAg9hp05mG45521JDUKA 6VuX55oD7zB++6awKzF5CH28MqRoKw4EY8yENs7b6SiMwts0EG4yon9JRv2z6vUtvS5mwjahNVNER Ia4k58kaIR82nxezaBZ5H0pF86tV73nL5IaQF1lvmVwqPcFyZeoKyIjegYLUpQBfFZAN9gql7wQP4 7WrwnllITrEv/6H0oRKk8uQ/MzSRctCuwK0UWNXSrIjCT30S0iDhldjKkwd5naUmSNPEUpf5X/tuZ Ra2z1QHg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUv1H-0005Qg-6z; Mon, 18 Jun 2018 14:20:35 +0000 Received: from icp-osb-irony-out3.external.iinet.net.au ([203.59.1.153]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUv0P-0003ZX-Df for linux-arm-kernel@lists.infradead.org; Mon, 18 Jun 2018 14:19:43 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2ArAQDdvidb/zXSMGdbGgEBAQEBAgEBA?= =?us-ascii?q?QEIAQEBAYNIgU8SKIt9jE9LBoE/lGCBeB4YAYRAAoJbITQYAQIBAQEBAQECbSi?= =?us-ascii?q?FKQZ5EBgnElcHEoMlgXQMqzUaAoQ/g2iBaIhUgQyBB4EPjVcCmRYIAY5+iCOFI?= =?us-ascii?q?5MOOIFSMxoIKAiCfoIhF44pLTB6AQGPVQEB?= X-IPAS-Result: =?us-ascii?q?A2ArAQDdvidb/zXSMGdbGgEBAQEBAgEBAQEIAQEBAYNIgU8?= =?us-ascii?q?SKIt9jE9LBoE/lGCBeB4YAYRAAoJbITQYAQIBAQEBAQECbSiFKQZ5EBgnElcHE?= =?us-ascii?q?oMlgXQMqzUaAoQ/g2iBaIhUgQyBB4EPjVcCmRYIAY5+iCOFI5MOOIFSMxoIKAi?= =?us-ascii?q?CfoIhF44pLTB6AQGPVQEB?= X-IronPort-AV: E=Sophos;i="5.51,239,1526313600"; d="scan'208";a="88321292" Received: from unknown (HELO goober.digi.com) ([103.48.210.53]) by icp-osb-irony-out3.iinet.net.au with ESMTP; 18 Jun 2018 22:19:39 +0800 From: Greg Ungerer To: linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk Subject: [PATCHv4 1/4] ARM: versatile: support no-MMU mode addressing Date: Tue, 19 Jun 2018 00:19:02 +1000 Message-Id: <20180618141905.7789-2-gerg@linux-m68k.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180618141905.7789-1-gerg@linux-m68k.org> References: <20180618141905.7789-1-gerg@linux-m68k.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180618_071941_706681_B63DAE3F X-CRM114-Status: UNSURE ( 6.27 ) 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: vladimir.murzin@arm.com, 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 v4: rebase on top of linux-4.17 diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c index 3c8d39c12909..8cfa05a37295 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)) /*