diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-10-25 09:38:09 -0400 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-11-17 02:58:09 -0500 |
commit | 08ff97b5214143c3bd47add6ec49097cb848120a (patch) | |
tree | c0782c278ba2f28f6f622be3ce82aa1a9ddb2e22 /arch/arm/mach-imx | |
parent | f5d7a13b18706c3328c6aac3bf782a13cabf255a (diff) |
ARM: imx: use MXxy_IO_P2V macros to setup static mappings
This makes less code rely on the virtual constants.
To further simplify code and reduce the needed boilerplate when
defining the static mappings a new helper macro is defined in
mach/hardware.h.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/mm-imx1.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-imx/mm-imx21.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-imx/mm-imx27.c | 21 |
3 files changed, 7 insertions, 42 deletions
diff --git a/arch/arm/mach-imx/mm-imx1.c b/arch/arm/mach-imx/mm-imx1.c index 9be92b96dc89..729ae0915af8 100644 --- a/arch/arm/mach-imx/mm-imx1.c +++ b/arch/arm/mach-imx/mm-imx1.c | |||
@@ -25,12 +25,7 @@ | |||
25 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | 26 | ||
27 | static struct map_desc imx_io_desc[] __initdata = { | 27 | static struct map_desc imx_io_desc[] __initdata = { |
28 | { | 28 | imx_map_entry(MX1, IO, MT_DEVICE), |
29 | .virtual = MX1_IO_BASE_ADDR_VIRT, | ||
30 | .pfn = __phys_to_pfn(MX1_IO_BASE_ADDR), | ||
31 | .length = MX1_IO_SIZE, | ||
32 | .type = MT_DEVICE | ||
33 | } | ||
34 | }; | 29 | }; |
35 | 30 | ||
36 | void __init mx1_map_io(void) | 31 | void __init mx1_map_io(void) |
diff --git a/arch/arm/mach-imx/mm-imx21.c b/arch/arm/mach-imx/mm-imx21.c index 12faeeaa0a97..e728af81d1b1 100644 --- a/arch/arm/mach-imx/mm-imx21.c +++ b/arch/arm/mach-imx/mm-imx21.c | |||
@@ -35,33 +35,18 @@ static struct map_desc imx21_io_desc[] __initdata = { | |||
35 | * - ROM Patch | 35 | * - ROM Patch |
36 | * - and some reserved space | 36 | * - and some reserved space |
37 | */ | 37 | */ |
38 | { | 38 | imx_map_entry(MX21, AIPI, MT_DEVICE), |
39 | .virtual = MX21_AIPI_BASE_ADDR_VIRT, | ||
40 | .pfn = __phys_to_pfn(MX21_AIPI_BASE_ADDR), | ||
41 | .length = MX21_AIPI_SIZE, | ||
42 | .type = MT_DEVICE | ||
43 | }, | ||
44 | /* | 39 | /* |
45 | * this fixed mapping covers: | 40 | * this fixed mapping covers: |
46 | * - CSI | 41 | * - CSI |
47 | * - ATA | 42 | * - ATA |
48 | */ | 43 | */ |
49 | { | 44 | imx_map_entry(MX21, SAHB1, MT_DEVICE), |
50 | .virtual = MX21_SAHB1_BASE_ADDR_VIRT, | ||
51 | .pfn = __phys_to_pfn(MX21_SAHB1_BASE_ADDR), | ||
52 | .length = MX21_SAHB1_SIZE, | ||
53 | .type = MT_DEVICE | ||
54 | }, | ||
55 | /* | 45 | /* |
56 | * this fixed mapping covers: | 46 | * this fixed mapping covers: |
57 | * - EMI | 47 | * - EMI |
58 | */ | 48 | */ |
59 | { | 49 | imx_map_entry(MX21, X_MEMC, MT_DEVICE), |
60 | .virtual = MX21_X_MEMC_BASE_ADDR_VIRT, | ||
61 | .pfn = __phys_to_pfn(MX21_X_MEMC_BASE_ADDR), | ||
62 | .length = MX21_X_MEMC_SIZE, | ||
63 | .type = MT_DEVICE | ||
64 | }, | ||
65 | }; | 50 | }; |
66 | 51 | ||
67 | /* | 52 | /* |
diff --git a/arch/arm/mach-imx/mm-imx27.c b/arch/arm/mach-imx/mm-imx27.c index a24622957ff2..374e48b7a412 100644 --- a/arch/arm/mach-imx/mm-imx27.c +++ b/arch/arm/mach-imx/mm-imx27.c | |||
@@ -35,33 +35,18 @@ static struct map_desc imx27_io_desc[] __initdata = { | |||
35 | * - ROM Patch | 35 | * - ROM Patch |
36 | * - and some reserved space | 36 | * - and some reserved space |
37 | */ | 37 | */ |
38 | { | 38 | imx_map_entry(MX27, AIPI, MT_DEVICE), |
39 | .virtual = MX27_AIPI_BASE_ADDR_VIRT, | ||
40 | .pfn = __phys_to_pfn(MX27_AIPI_BASE_ADDR), | ||
41 | .length = MX27_AIPI_SIZE, | ||
42 | .type = MT_DEVICE | ||
43 | }, | ||
44 | /* | 39 | /* |
45 | * this fixed mapping covers: | 40 | * this fixed mapping covers: |
46 | * - CSI | 41 | * - CSI |
47 | * - ATA | 42 | * - ATA |
48 | */ | 43 | */ |
49 | { | 44 | imx_map_entry(MX27, SAHB1, MT_DEVICE), |
50 | .virtual = MX27_SAHB1_BASE_ADDR_VIRT, | ||
51 | .pfn = __phys_to_pfn(MX27_SAHB1_BASE_ADDR), | ||
52 | .length = MX27_SAHB1_SIZE, | ||
53 | .type = MT_DEVICE | ||
54 | }, | ||
55 | /* | 45 | /* |
56 | * this fixed mapping covers: | 46 | * this fixed mapping covers: |
57 | * - EMI | 47 | * - EMI |
58 | */ | 48 | */ |
59 | { | 49 | imx_map_entry(MX27, X_MEMC, MT_DEVICE), |
60 | .virtual = MX27_X_MEMC_BASE_ADDR_VIRT, | ||
61 | .pfn = __phys_to_pfn(MX27_X_MEMC_BASE_ADDR), | ||
62 | .length = MX27_X_MEMC_SIZE, | ||
63 | .type = MT_DEVICE | ||
64 | }, | ||
65 | }; | 50 | }; |
66 | 51 | ||
67 | /* | 52 | /* |