linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: gerg@uclinux.org (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	[thread overview]
Message-ID: <1488332385-3367-2-git-send-email-gerg@uclinux.org> (raw)
In-Reply-To: <1488332385-3367-1-git-send-email-gerg@uclinux.org>

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 <gerg@uclinux.org>
---
 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 <asm/mach/map.h>
 
 /* 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))
 
 /*
-- 
1.9.1

  reply	other threads:[~2017-03-01  1:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01  1:39 [PATCHv3 0/4] arm/versatile: no-MMU support Greg Ungerer
2017-03-01  1:39 ` Greg Ungerer [this message]
2017-03-01  1:39 ` [PATCHv3 2/4] ARM: versatile: define empty debug_ll_io_init() for no-MMU Greg Ungerer
2017-03-06 11:03   ` Vladimir Murzin
2017-03-01  1:50 ` [PATCHv3 3/4] ARM: versatile: empty Makefile.boot needed for no-MMU compile Greg Ungerer
2017-03-01  1:50   ` [PATCHv3 4/4] ARM: versatile: support configuring versatile machine for no-MMU Greg Ungerer

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=1488332385-3367-2-git-send-email-gerg@uclinux.org \
    --to=gerg@uclinux.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).