]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: tegra: clean-up mach/io.h
authorRob Herring <rob.herring@calxeda.com>
Sat, 11 Feb 2012 03:22:00 +0000 (21:22 -0600)
committerRob Herring <rob.herring@calxeda.com>
Wed, 7 Mar 2012 03:34:41 +0000 (21:34 -0600)
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
arch/arm/mach-tegra/include/mach/io.h
arch/arm/mach-tegra/include/mach/iomap.h
arch/arm/mach-tegra/io.c

index 619abc63aee83748c918db3ce9cc08c1ea58d254..e28ce16751465fda992ba2b508f0e65066d3597b 100644 (file)
@@ -18,7 +18,6 @@
  *
  */
 
-#include <mach/io.h>
 #include <mach/iomap.h>
 
        .macro  addruart, rp, rv, tmp
index f15defffb5d252f519cb838afa8cbc628a097248..47b4b611911676f4210dbc9cbe454b9103c6b45c 100644 (file)
 
 #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;
 
index 19dec3ac0854a49218d107b78f00b26857ef7329..082b4d16780121c00aa443e50bfdbca6e6f62ea0 100644 (file)
 # 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
+ * 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)
+
+#define IO_ADDRESS(n) (IO_TO_VIRT(n))
+
 #endif
index d23ee2db28273afd250ecf6b6981a1562cdf5fab..58b4baf9c483d8a737fd73d418b14375c7a308e1 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <asm/page.h>
 #include <asm/mach/map.h>
+#include <mach/iomap.h>
 
 #include "board.h"