diff options
Diffstat (limited to 'arch/arm/mach-mx5/mm.c')
-rw-r--r-- | arch/arm/mach-mx5/mm.c | 75 |
1 files changed, 44 insertions, 31 deletions
diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c index bc3f30db8d9a..457f9f95204b 100644 --- a/arch/arm/mach-mx5/mm.c +++ b/arch/arm/mach-mx5/mm.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved. | 2 | * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved. |
3 | * | 3 | * |
4 | * The code contained herein is licensed under the GNU General Public | 4 | * The code contained herein is licensed under the GNU General Public |
5 | * License. You may obtain a copy of the GNU General Public License | 5 | * License. You may obtain a copy of the GNU General Public License |
@@ -23,33 +23,21 @@ | |||
23 | /* | 23 | /* |
24 | * Define the MX51 memory map. | 24 | * Define the MX51 memory map. |
25 | */ | 25 | */ |
26 | static struct map_desc mxc_io_desc[] __initdata = { | 26 | static struct map_desc mx51_io_desc[] __initdata = { |
27 | { | 27 | imx_map_entry(MX51, IRAM, MT_DEVICE), |
28 | .virtual = MX51_IRAM_BASE_ADDR_VIRT, | 28 | imx_map_entry(MX51, DEBUG, MT_DEVICE), |
29 | .pfn = __phys_to_pfn(MX51_IRAM_BASE_ADDR), | 29 | imx_map_entry(MX51, AIPS1, MT_DEVICE), |
30 | .length = MX51_IRAM_SIZE, | 30 | imx_map_entry(MX51, SPBA0, MT_DEVICE), |
31 | .type = MT_DEVICE | 31 | imx_map_entry(MX51, AIPS2, MT_DEVICE), |
32 | }, { | 32 | }; |
33 | .virtual = MX51_DEBUG_BASE_ADDR_VIRT, | 33 | |
34 | .pfn = __phys_to_pfn(MX51_DEBUG_BASE_ADDR), | 34 | /* |
35 | .length = MX51_DEBUG_SIZE, | 35 | * Define the MX53 memory map. |
36 | .type = MT_DEVICE | 36 | */ |
37 | }, { | 37 | static struct map_desc mx53_io_desc[] __initdata = { |
38 | .virtual = MX51_AIPS1_BASE_ADDR_VIRT, | 38 | imx_map_entry(MX53, AIPS1, MT_DEVICE), |
39 | .pfn = __phys_to_pfn(MX51_AIPS1_BASE_ADDR), | 39 | imx_map_entry(MX53, SPBA0, MT_DEVICE), |
40 | .length = MX51_AIPS1_SIZE, | 40 | imx_map_entry(MX53, AIPS2, MT_DEVICE), |
41 | .type = MT_DEVICE | ||
42 | }, { | ||
43 | .virtual = MX51_SPBA0_BASE_ADDR_VIRT, | ||
44 | .pfn = __phys_to_pfn(MX51_SPBA0_BASE_ADDR), | ||
45 | .length = MX51_SPBA0_SIZE, | ||
46 | .type = MT_DEVICE | ||
47 | }, { | ||
48 | .virtual = MX51_AIPS2_BASE_ADDR_VIRT, | ||
49 | .pfn = __phys_to_pfn(MX51_AIPS2_BASE_ADDR), | ||
50 | .length = MX51_AIPS2_SIZE, | ||
51 | .type = MT_DEVICE | ||
52 | }, | ||
53 | }; | 41 | }; |
54 | 42 | ||
55 | /* | 43 | /* |
@@ -61,8 +49,16 @@ void __init mx51_map_io(void) | |||
61 | { | 49 | { |
62 | mxc_set_cpu_type(MXC_CPU_MX51); | 50 | mxc_set_cpu_type(MXC_CPU_MX51); |
63 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); | 51 | mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); |
64 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG_BASE_ADDR)); | 52 | mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); |
65 | iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc)); | 53 | iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc)); |
54 | } | ||
55 | |||
56 | void __init mx53_map_io(void) | ||
57 | { | ||
58 | mxc_set_cpu_type(MXC_CPU_MX53); | ||
59 | mxc_iomux_v3_init(MX53_IO_ADDRESS(MX53_IOMUXC_BASE_ADDR)); | ||
60 | mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG_BASE_ADDR)); | ||
61 | iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc)); | ||
66 | } | 62 | } |
67 | 63 | ||
68 | int imx51_register_gpios(void); | 64 | int imx51_register_gpios(void); |
@@ -72,7 +68,7 @@ void __init mx51_init_irq(void) | |||
72 | unsigned long tzic_addr; | 68 | unsigned long tzic_addr; |
73 | void __iomem *tzic_virt; | 69 | void __iomem *tzic_virt; |
74 | 70 | ||
75 | if (mx51_revision() < MX51_CHIP_REV_2_0) | 71 | if (mx51_revision() < IMX_CHIP_REVISION_2_0) |
76 | tzic_addr = MX51_TZIC_BASE_ADDR_TO1; | 72 | tzic_addr = MX51_TZIC_BASE_ADDR_TO1; |
77 | else | 73 | else |
78 | tzic_addr = MX51_TZIC_BASE_ADDR; | 74 | tzic_addr = MX51_TZIC_BASE_ADDR; |
@@ -84,3 +80,20 @@ void __init mx51_init_irq(void) | |||
84 | tzic_init_irq(tzic_virt); | 80 | tzic_init_irq(tzic_virt); |
85 | imx51_register_gpios(); | 81 | imx51_register_gpios(); |
86 | } | 82 | } |
83 | |||
84 | int imx53_register_gpios(void); | ||
85 | |||
86 | void __init mx53_init_irq(void) | ||
87 | { | ||
88 | unsigned long tzic_addr; | ||
89 | void __iomem *tzic_virt; | ||
90 | |||
91 | tzic_addr = MX53_TZIC_BASE_ADDR; | ||
92 | |||
93 | tzic_virt = ioremap(tzic_addr, SZ_16K); | ||
94 | if (!tzic_virt) | ||
95 | panic("unable to map TZIC interrupt controller\n"); | ||
96 | |||
97 | tzic_init_irq(tzic_virt); | ||
98 | imx53_register_gpios(); | ||
99 | } | ||