From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 12/30] ARM: tegra: clean-up mach/io.h
Date: Thu, 1 Mar 2012 21:13:24 -0600 [thread overview]
Message-ID: <1330658022-14559-13-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1330658022-14559-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>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Cc: Colin Cross <ccross@android.com>
Cc: Olof Johansson <olof@lixom.net>
---
arch/arm/mach-tegra/include/mach/debug-macro.S | 1 -
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 +
4 files changed, 49 insertions(+), 49 deletions(-)
diff --git a/arch/arm/mach-tegra/include/mach/debug-macro.S b/arch/arm/mach-tegra/include/mach/debug-macro.S
index 619abc6..e28ce16 100644
--- a/arch/arm/mach-tegra/include/mach/debug-macro.S
+++ b/arch/arm/mach-tegra/include/mach/debug-macro.S
@@ -18,7 +18,6 @@
*
*/
-#include <mach/io.h>
#include <mach/iomap.h>
.macro addruart, rp, rv, tmp
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-03-02 3:13 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 3:13 [PATCH v3 00/30] mach/io.h cleanup and removal Rob Herring
2012-03-02 3:13 ` [PATCH v3 01/30] usb: ohci-pxa27x: add explicit include of hardware.h Rob Herring
2012-03-02 3:13 ` [PATCH v3 02/30] ARM: provide runtime hook for ioremap/iounmap Rob Herring
2012-03-05 19:21 ` Nicolas Pitre
2012-03-05 20:13 ` Arnd Bergmann
2012-03-05 21:11 ` Nicolas Pitre
2012-03-06 4:02 ` [PATCH v4 1/4] " Rob Herring
2012-03-06 4:02 ` [PATCH v4 2/4] ARM: imx: convert to common runtime ioremap hook Rob Herring
2012-03-06 4:02 ` [PATCH v4 3/4] ARM: msm: use " Rob Herring
2012-03-06 20:59 ` David Brown
2012-03-06 21:10 ` Rob Herring
2012-03-06 4:03 ` [PATCH v4 4/4] ARM: iop13xx: " Rob Herring
2012-03-06 16:53 ` [PATCH v4 1/4] ARM: provide runtime hook for ioremap/iounmap Arnd Bergmann
2012-03-06 17:18 ` Nicolas Pitre
2012-03-06 4:07 ` [PATCH v3 02/30] " Rob Herring
2012-03-06 17:20 ` Nicolas Pitre
2012-03-06 21:45 ` [PATCH v5 1/7] " Rob Herring
2012-03-06 21:45 ` [PATCH v5 2/7] ARM: imx: convert to common runtime ioremap hook Rob Herring
2012-03-06 21:45 ` [PATCH v5 3/7] ARM: msm: use " Rob Herring
2012-03-06 21:45 ` [PATCH v5 4/7] ARM: iop13xx: " Rob Herring
2012-03-06 21:45 ` [PATCH v5 5/7] ARM: ixp4xx: " Rob Herring
2012-03-06 22:11 ` Russell King - ARM Linux
2012-03-06 22:49 ` Rob Herring
2012-03-06 22:50 ` Rob Herring
2012-03-06 21:45 ` [PATCH v5 6/7] ARM: ebsa110: " Rob Herring
2012-03-06 22:06 ` Nicolas Pitre
2012-03-07 3:36 ` [PATCH] " Rob Herring
2012-03-06 21:45 ` [PATCH v5 7/7] ARM: remove compile time __arch_ioremap/__arch_iounmap Rob Herring
2012-03-06 22:01 ` Nicolas Pitre
2012-03-06 21:57 ` [PATCH v5 1/7] ARM: provide runtime hook for ioremap/iounmap Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 03/30] ARM: imx: convert to common runtime ioremap hook Rob Herring
2012-03-02 3:13 ` [PATCH v3 04/30] ARM: msm: use " Rob Herring
2012-03-02 3:13 ` [PATCH v3 05/30] ARM: msm: clean-up mach/io.h Rob Herring
2012-03-02 3:13 ` [PATCH v3 06/30] ARM: iop13xx: use runtime ioremap hook Rob Herring
2012-03-02 3:13 ` [PATCH v3 07/30] ARM: iop13xx: move io.h externs to pci.h Rob Herring
2012-03-02 3:13 ` [PATCH v3 08/30] ARM: OMAP: Remove remaining includes for mach/io.h Rob Herring
2012-03-02 3:13 ` [PATCH v3 09/30] [media] davinci: remove includes of mach/io.h Rob Herring
2012-03-02 3:13 ` [PATCH v3 10/30] ARM: davinci: remove unneeded mach/io.h include Rob Herring
2012-03-02 3:13 ` [PATCH v3 11/30] ARM: orion5x: clean-up mach/io.h Rob Herring
2012-03-05 19:14 ` Nicolas Pitre
2012-03-02 3:13 ` Rob Herring [this message]
2012-03-02 3:13 ` [PATCH v3 13/30] ARM: ep93xx: " Rob Herring
2012-03-02 3:13 ` [PATCH v3 14/30] ARM: at91: add explicit include of hardware.h to uncompressor Rob Herring
2012-03-02 3:13 ` [PATCH v3 15/30] ARM: dove: add explicit include of dove.h to addr-map.c Rob Herring
2012-03-05 19:26 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 16/30] ARM: clps711x: remove unneeded include of mach/io.h Rob Herring
2012-03-02 3:13 ` [PATCH v3 17/30] ARM: make mach/io.h include optional Rob Herring
2012-03-05 19:31 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 18/30] ARM: remove bunch of now unused mach/io.h files Rob Herring
2012-03-05 19:33 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 19/30] ARM: kill off __mem_pci Rob Herring
2012-03-02 3:13 ` [PATCH v3 20/30] iop13xx: use more regular PCI I/O space handling Rob Herring
2012-03-02 3:13 ` [PATCH v3 21/30] ARM: Add fixed PCI i/o mapping Rob Herring
2012-03-05 19:41 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 22/30] ARM: tegra: use " Rob Herring
2012-03-02 6:59 ` Thierry Reding
2012-03-02 3:13 ` [PATCH v3 23/30] ARM: integrator: " Rob Herring
2012-03-02 3:13 ` [PATCH v3 24/30] ARM: shark: " Rob Herring
2012-03-02 3:13 ` [PATCH v3 25/30] ARM: footbridge: " Rob Herring
2012-03-02 3:13 ` [PATCH v3 26/30] ARM: dove: " Rob Herring
2012-03-05 20:12 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 27/30] ARM: kirkwood: " Rob Herring
2012-03-05 19:59 ` Nicolas Pitre
2012-03-02 3:13 ` [PATCH v3 28/30] ARM: ixp23xx: " Rob Herring
2012-03-02 3:13 ` [PATCH v3 29/30] ARM: iop13xx: " Rob Herring
2012-03-02 3:13 ` [PATCH v3 30/30] ARM: orion5x: " Rob Herring
2012-03-05 20:13 ` Nicolas Pitre
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=1330658022-14559-13-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).