diff options
author | Robert Lee <rob.lee@linaro.org> | 2012-05-21 18:50:24 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-06-05 02:48:35 -0400 |
commit | 2ce2e4b2b56dd564d27e7aadb92ed0c2342a9c57 (patch) | |
tree | cfa4bb58666a2f88dba2775cbef210b6c1516735 /arch/arm/plat-mxc | |
parent | f8f5701bdaf9134b1f90e5044a82c66324d2073f (diff) |
ARM: imx: Modify IMX_IO_P2V macro
A change is needed in the IMX_IO_P2V macro to allow all imx5 platforms
to use common definitions when accessing registers of peripherals on
the AIPS2 bus. With this change, IMX_IO_P2V(MX50_AIPS2_BASE_ADDR) ==
IMX_IO_P2V(MX51_AIPS2_BASE_ADDR) == IMX_IO_P2V(MX53_AIPS2_BASE_ADDR).
This change was tested for mapping conflicts using the iop2v script
found at git://git.pengutronix.de/git/ukl/imx-iop2v.git and by
performing a bootup of a default build using imx_v6_v7_defconfig
on a imx51 babbage board and imx53 loco board. The comments were
modified to reflect the output given by the script which shows the
virtual address mappings.
Signed-off-by: Robert Lee <rob.lee@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r-- | arch/arm/plat-mxc/include/mach/hardware.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h index 0630513554de..071afd0b9283 100644 --- a/arch/arm/plat-mxc/include/mach/hardware.h +++ b/arch/arm/plat-mxc/include/mach/hardware.h | |||
@@ -50,7 +50,7 @@ | |||
50 | * IO 0x00200000+0x100000 -> 0xf4000000+0x100000 | 50 | * IO 0x00200000+0x100000 -> 0xf4000000+0x100000 |
51 | * mx21: | 51 | * mx21: |
52 | * AIPI 0x10000000+0x100000 -> 0xf4400000+0x100000 | 52 | * AIPI 0x10000000+0x100000 -> 0xf4400000+0x100000 |
53 | * SAHB1 0x80000000+0x100000 -> 0xf4000000+0x100000 | 53 | * SAHB1 0x80000000+0x100000 -> 0xf5000000+0x100000 |
54 | * X_MEMC 0xdf000000+0x004000 -> 0xf5f00000+0x004000 | 54 | * X_MEMC 0xdf000000+0x004000 -> 0xf5f00000+0x004000 |
55 | * mx25: | 55 | * mx25: |
56 | * AIPS1 0x43f00000+0x100000 -> 0xf5300000+0x100000 | 56 | * AIPS1 0x43f00000+0x100000 -> 0xf5300000+0x100000 |
@@ -58,47 +58,50 @@ | |||
58 | * AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000 | 58 | * AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000 |
59 | * mx27: | 59 | * mx27: |
60 | * AIPI 0x10000000+0x100000 -> 0xf4400000+0x100000 | 60 | * AIPI 0x10000000+0x100000 -> 0xf4400000+0x100000 |
61 | * SAHB1 0x80000000+0x100000 -> 0xf4000000+0x100000 | 61 | * SAHB1 0x80000000+0x100000 -> 0xf5000000+0x100000 |
62 | * X_MEMC 0xd8000000+0x100000 -> 0xf5c00000+0x100000 | 62 | * X_MEMC 0xd8000000+0x100000 -> 0xf5c00000+0x100000 |
63 | * mx31: | 63 | * mx31: |
64 | * AIPS1 0x43f00000+0x100000 -> 0xf5300000+0x100000 | 64 | * AIPS1 0x43f00000+0x100000 -> 0xf5300000+0x100000 |
65 | * AIPS2 0x53f00000+0x100000 -> 0xf5700000+0x100000 | 65 | * AIPS2 0x53f00000+0x100000 -> 0xf5700000+0x100000 |
66 | * AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000 | 66 | * AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000 |
67 | * X_MEMC 0xb8000000+0x010000 -> 0xf4c00000+0x010000 | 67 | * X_MEMC 0xb8000000+0x010000 -> 0xf5c00000+0x010000 |
68 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 | 68 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 |
69 | * mx35: | 69 | * mx35: |
70 | * AIPS1 0x43f00000+0x100000 -> 0xf5300000+0x100000 | 70 | * AIPS1 0x43f00000+0x100000 -> 0xf5300000+0x100000 |
71 | * AIPS2 0x53f00000+0x100000 -> 0xf5700000+0x100000 | 71 | * AIPS2 0x53f00000+0x100000 -> 0xf5700000+0x100000 |
72 | * AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000 | 72 | * AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000 |
73 | * X_MEMC 0xb8000000+0x010000 -> 0xf4c00000+0x010000 | 73 | * X_MEMC 0xb8000000+0x010000 -> 0xf5c00000+0x010000 |
74 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 | 74 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 |
75 | * mx50: | 75 | * mx50: |
76 | * TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000 | 76 | * TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000 |
77 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 | ||
78 | * AIPS1 0x53f00000+0x100000 -> 0xf5700000+0x100000 | 77 | * AIPS1 0x53f00000+0x100000 -> 0xf5700000+0x100000 |
78 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 | ||
79 | * AIPS2 0x63f00000+0x100000 -> 0xf5300000+0x100000 | 79 | * AIPS2 0x63f00000+0x100000 -> 0xf5300000+0x100000 |
80 | * mx51: | 80 | * mx51: |
81 | * TZIC 0xe0000000+0x004000 -> 0xf5000000+0x004000 | 81 | * TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000 |
82 | * IRAM 0x1ffe0000+0x020000 -> 0xf4fe0000+0x020000 | 82 | * IRAM 0x1ffe0000+0x020000 -> 0xf4fe0000+0x020000 |
83 | * DEBUG 0x60000000+0x100000 -> 0xf5000000+0x100000 | ||
83 | * SPBA0 0x70000000+0x100000 -> 0xf5400000+0x100000 | 84 | * SPBA0 0x70000000+0x100000 -> 0xf5400000+0x100000 |
84 | * AIPS1 0x73f00000+0x100000 -> 0xf5700000+0x100000 | 85 | * AIPS1 0x73f00000+0x100000 -> 0xf5700000+0x100000 |
85 | * AIPS2 0x83f00000+0x100000 -> 0xf4300000+0x100000 | 86 | * AIPS2 0x83f00000+0x100000 -> 0xf5300000+0x100000 |
86 | * mx53: | 87 | * mx53: |
87 | * TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000 | 88 | * TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000 |
89 | * DEBUG 0x40000000+0x100000 -> 0xf5000000+0x100000 | ||
88 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 | 90 | * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 |
89 | * AIPS1 0x53f00000+0x100000 -> 0xf5700000+0x100000 | 91 | * AIPS1 0x53f00000+0x100000 -> 0xf5700000+0x100000 |
90 | * AIPS2 0x63f00000+0x100000 -> 0xf5300000+0x100000 | 92 | * AIPS2 0x63f00000+0x100000 -> 0xf5300000+0x100000 |
91 | * mx6q: | 93 | * mx6q: |
92 | * SCU 0x00a00000+0x001000 -> 0xf4000000+0x001000 | 94 | * SCU 0x00a00000+0x004000 -> 0xf4000000+0x004000 |
93 | * CCM 0x020c4000+0x004000 -> 0xf42c4000+0x004000 | 95 | * CCM 0x020c4000+0x004000 -> 0xf42c4000+0x004000 |
94 | * ANATOP 0x020c8000+0x001000 -> 0xf42c8000+0x001000 | 96 | * ANATOP 0x020c8000+0x004000 -> 0xf42c8000+0x004000 |
95 | * UART4 0x021f0000+0x004000 -> 0xf42f0000+0x004000 | 97 | * UART4 0x021f0000+0x004000 -> 0xf42f0000+0x004000 |
96 | */ | 98 | */ |
97 | #define IMX_IO_P2V(x) ( \ | 99 | #define IMX_IO_P2V(x) ( \ |
98 | 0xf4000000 + \ | 100 | (((x) & 0x80000000) >> 7) | \ |
101 | (0xf4000000 + \ | ||
99 | (((x) & 0x50000000) >> 6) + \ | 102 | (((x) & 0x50000000) >> 6) + \ |
100 | (((x) & 0x0b000000) >> 4) + \ | 103 | (((x) & 0x0b000000) >> 4) + \ |
101 | (((x) & 0x000fffff))) | 104 | (((x) & 0x000fffff)))) |
102 | 105 | ||
103 | #define IMX_IO_ADDRESS(x) IOMEM(IMX_IO_P2V(x)) | 106 | #define IMX_IO_ADDRESS(x) IOMEM(IMX_IO_P2V(x)) |
104 | 107 | ||