From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 10/15] ARM: tegra: clean-up mach/io.h
Date: Mon, 13 Feb 2012 15:43:23 -0600 [thread overview]
Message-ID: <1329169408-17253-11-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1329169408-17253-1-git-send-email-robherring2@gmail.com>
From: Rob Herring <rob.herring@calxeda.com>
Move tegra specific mach/io.h parts into iomap.h.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
arch/arm/mach-tegra/include/mach/io.h | 48 ------------------------------
arch/arm/mach-tegra/include/mach/iomap.h | 48 ++++++++++++++++++++++++++++++
arch/arm/mach-tegra/io.c | 1 +
3 files changed, 49 insertions(+), 48 deletions(-)
diff --git a/arch/arm/mach-tegra/include/mach/io.h b/arch/arm/mach-tegra/include/mach/io.h
index f15deff..47b4b61 100644
--- a/arch/arm/mach-tegra/include/mach/io.h
+++ b/arch/arm/mach-tegra/include/mach/io.h
@@ -23,56 +23,8 @@
#define IO_SPACE_LIMIT 0xffff
-/* On TEGRA, many peripherals are very closely packed in
- * two 256MB io windows (that actually only use about 64KB
- * at the start of each).
- *
- * We will just map the first 1MB of each window (to minimize
- * pt entries needed) and provide a macro to transform physical
- * io addresses to an appropriate void __iomem *.
- *
- */
-
-#ifdef __ASSEMBLY__
-#define IOMEM(x) (x)
-#else
-#define IOMEM(x) ((void __force __iomem *)(x))
-#endif
-
-#define IO_IRAM_PHYS 0x40000000
-#define IO_IRAM_VIRT IOMEM(0xFE400000)
-#define IO_IRAM_SIZE SZ_256K
-
-#define IO_CPU_PHYS 0x50040000
-#define IO_CPU_VIRT IOMEM(0xFE000000)
-#define IO_CPU_SIZE SZ_16K
-
-#define IO_PPSB_PHYS 0x60000000
-#define IO_PPSB_VIRT IOMEM(0xFE200000)
-#define IO_PPSB_SIZE SZ_1M
-
-#define IO_APB_PHYS 0x70000000
-#define IO_APB_VIRT IOMEM(0xFE300000)
-#define IO_APB_SIZE SZ_1M
-
-#define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz)))
-#define IO_TO_VIRT_XLATE(p, pst, vst) (((p) - (pst) + (vst)))
-
-#define IO_TO_VIRT(n) ( \
- IO_TO_VIRT_BETWEEN((n), IO_PPSB_PHYS, IO_PPSB_SIZE) ? \
- IO_TO_VIRT_XLATE((n), IO_PPSB_PHYS, IO_PPSB_VIRT) : \
- IO_TO_VIRT_BETWEEN((n), IO_APB_PHYS, IO_APB_SIZE) ? \
- IO_TO_VIRT_XLATE((n), IO_APB_PHYS, IO_APB_VIRT) : \
- IO_TO_VIRT_BETWEEN((n), IO_CPU_PHYS, IO_CPU_SIZE) ? \
- IO_TO_VIRT_XLATE((n), IO_CPU_PHYS, IO_CPU_VIRT) : \
- IO_TO_VIRT_BETWEEN((n), IO_IRAM_PHYS, IO_IRAM_SIZE) ? \
- IO_TO_VIRT_XLATE((n), IO_IRAM_PHYS, IO_IRAM_VIRT) : \
- NULL)
-
#ifndef __ASSEMBLER__
-#define IO_ADDRESS(n) (IO_TO_VIRT(n))
-
#ifdef CONFIG_TEGRA_PCI
extern void __iomem *tegra_pcie_io_base;
diff --git a/arch/arm/mach-tegra/include/mach/iomap.h b/arch/arm/mach-tegra/include/mach/iomap.h
index 19dec3a..082b4d1 100644
--- a/arch/arm/mach-tegra/include/mach/iomap.h
+++ b/arch/arm/mach-tegra/include/mach/iomap.h
@@ -271,4 +271,52 @@
# define TEGRA_DEBUG_UART_BASE TEGRA_UARTE_BASE
#endif
+/* On TEGRA, many peripherals are very closely packed in
+ * two 256MB io windows (that actually only use about 64KB
+ *@the start of each).
+ *
+ * We will just map the first 1MB of each window (to minimize
+ * pt entries needed) and provide a macro to transform physical
+ * io addresses to an appropriate void __iomem *.
+ *
+ */
+
+#ifdef __ASSEMBLY__
+#define IOMEM(x) (x)
+#else
+#define IOMEM(x) ((void __force __iomem *)(x))
+#endif
+
+#define IO_IRAM_PHYS 0x40000000
+#define IO_IRAM_VIRT IOMEM(0xFE400000)
+#define IO_IRAM_SIZE SZ_256K
+
+#define IO_CPU_PHYS 0x50040000
+#define IO_CPU_VIRT IOMEM(0xFE000000)
+#define IO_CPU_SIZE SZ_16K
+
+#define IO_PPSB_PHYS 0x60000000
+#define IO_PPSB_VIRT IOMEM(0xFE200000)
+#define IO_PPSB_SIZE SZ_1M
+
+#define IO_APB_PHYS 0x70000000
+#define IO_APB_VIRT IOMEM(0xFE300000)
+#define IO_APB_SIZE SZ_1M
+
+#define IO_TO_VIRT_BETWEEN(p, st, sz) ((p) >= (st) && (p) < ((st) + (sz)))
+#define IO_TO_VIRT_XLATE(p, pst, vst) (((p) - (pst) + (vst)))
+
+#define IO_TO_VIRT(n) ( \
+ IO_TO_VIRT_BETWEEN((n), IO_PPSB_PHYS, IO_PPSB_SIZE) ? \
+ IO_TO_VIRT_XLATE((n), IO_PPSB_PHYS, IO_PPSB_VIRT) : \
+ IO_TO_VIRT_BETWEEN((n), IO_APB_PHYS, IO_APB_SIZE) ? \
+ IO_TO_VIRT_XLATE((n), IO_APB_PHYS, IO_APB_VIRT) : \
+ IO_TO_VIRT_BETWEEN((n), IO_CPU_PHYS, IO_CPU_SIZE) ? \
+ IO_TO_VIRT_XLATE((n), IO_CPU_PHYS, IO_CPU_VIRT) : \
+ IO_TO_VIRT_BETWEEN((n), IO_IRAM_PHYS, IO_IRAM_SIZE) ? \
+ IO_TO_VIRT_XLATE((n), IO_IRAM_PHYS, IO_IRAM_VIRT) : \
+ NULL)
+
+#define IO_ADDRESS(n) (IO_TO_VIRT(n))
+
#endif
diff --git a/arch/arm/mach-tegra/io.c b/arch/arm/mach-tegra/io.c
index d23ee2d..58b4baf 100644
--- a/arch/arm/mach-tegra/io.c
+++ b/arch/arm/mach-tegra/io.c
@@ -26,6 +26,7 @@
#include <asm/page.h>
#include <asm/mach/map.h>
+#include <mach/iomap.h>
#include "board.h"
--
1.7.5.4
next prev parent reply other threads:[~2012-02-13 21:43 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 21:43 [PATCH 00/15] mach/io.h cleanup and removal Rob Herring
2012-02-13 21:43 ` [PATCH 01/15] usb: ohci-pxa27x: add explicit include of hardware.h Rob Herring
2012-02-13 21:43 ` [PATCH 02/15] ARM: add explicit include of system.h to processor.h Rob Herring
2012-02-13 22:14 ` H Hartley Sweeten
2012-02-13 21:43 ` [PATCH 03/15] ARM: provide runtime hook for ioremap Rob Herring
2012-02-13 22:13 ` H Hartley Sweeten
2012-02-13 22:30 ` Russell King - ARM Linux
2012-02-13 22:48 ` Rob Herring
2012-02-13 21:43 ` [PATCH 04/15] ARM: imx: convert to common runtime ioremap hook Rob Herring
2012-02-16 0:17 ` Shawn Guo
2012-02-13 21:43 ` [PATCH 05/15] ARM: msm: use " Rob Herring
2012-02-13 23:05 ` David Brown
2012-02-13 21:43 ` [PATCH 06/15] ARM: msm: clean-up mach/io.h Rob Herring
2012-02-13 21:43 ` [PATCH 07/15] ARM: at91: " Rob Herring
2012-02-14 9:21 ` Nicolas Ferre
2012-02-14 13:24 ` Rob Herring
2012-02-16 7:43 ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-16 14:08 ` Rob Herring
2012-02-16 14:23 ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-23 17:26 ` Nicolas Ferre
2012-02-27 16:55 ` Rob Herring
2012-02-27 17:27 ` Jean-Christophe PLAGNIOL-VILLARD
2012-02-13 21:43 ` [PATCH 08/15] ARM: davinci: remove unneeded mach/io.h include Rob Herring
2012-02-13 21:43 ` [PATCH 09/15] ARM: orion5x: clean-up mach/io.h Rob Herring
2012-02-13 21:43 ` Rob Herring [this message]
2012-02-13 21:43 ` [PATCH 11/15] ARM: ep93xx: " Rob Herring
2012-02-13 21:52 ` Ryan Mallon
2012-02-13 22:15 ` Rob Herring
2012-02-13 22:16 ` H Hartley Sweeten
2012-02-27 15:17 ` [PATCH] " Rob Herring
2012-02-13 21:43 ` [PATCH 12/15] ARM: clps711x: remove unneeded include of mach/io.h Rob Herring
2012-02-13 21:43 ` [PATCH 13/15] ARM: make mach/io.h include optional Rob Herring
2012-02-13 22:14 ` H Hartley Sweeten
2012-02-13 22:36 ` Russell King - ARM Linux
2012-02-13 22:55 ` Rob Herring
2012-02-14 2:03 ` Arnd Bergmann
2012-02-14 2:54 ` Rob Herring
2012-02-14 8:04 ` Arnd Bergmann
2012-02-14 14:36 ` Rob Herring
2012-02-14 17:16 ` Arnd Bergmann
2012-02-14 17:40 ` Russell King - ARM Linux
2012-02-14 18:12 ` Arnd Bergmann
2012-02-14 23:09 ` Rob Herring
2012-02-14 23:43 ` Russell King - ARM Linux
2012-02-15 0:25 ` Nicolas Pitre
2012-02-15 14:14 ` Rob Herring
2012-02-15 0:57 ` Arnd Bergmann
2012-02-27 19:31 ` Rob Herring
2012-02-28 16:10 ` Arnd Bergmann
2012-02-27 22:31 ` Rob Herring
2012-02-28 16:32 ` Arnd Bergmann
2012-02-13 23:15 ` H Hartley Sweeten
2012-02-14 1:06 ` Arnd Bergmann
2012-02-14 17:38 ` H Hartley Sweeten
2012-02-14 18:20 ` Arnd Bergmann
2012-02-13 21:43 ` [PATCH 14/15] ARM: remove bunch of now unused mach/io.h files Rob Herring
2012-02-13 22:16 ` H Hartley Sweeten
2012-02-16 0:19 ` Shawn Guo
2012-02-16 18:57 ` Linus Walleij
2012-02-13 21:43 ` [PATCH 15/15] ARM: kill off __mem_pci Rob Herring
2012-02-13 22:22 ` [PATCH 00/15] mach/io.h cleanup and removal Tony Lindgren
2012-02-13 23:56 ` Tony Lindgren
2012-02-14 3:09 ` Rob Herring
2012-02-13 23:41 ` Tony Lindgren
2012-02-14 3:20 ` Rob Herring
2012-02-14 17:24 ` Tony Lindgren
2012-02-14 17:57 ` Arnd Bergmann
2012-02-14 18:28 ` Nicolas Pitre
2012-02-14 19:41 ` Rob Herring
2012-02-14 20:43 ` Tony Lindgren
2012-02-14 21:26 ` Arnd Bergmann
2012-02-14 21:54 ` Rob Herring
2012-02-14 22:38 ` Arnd Bergmann
2012-02-21 22:47 ` Stephen Warren
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=1329169408-17253-11-git-send-email-robherring2@gmail.com \
--to=robherring2@gmail.com \
--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).