diff options
author | Tony Lindgren <tony@atomide.com> | 2011-10-04 21:17:41 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-10-19 19:34:11 -0400 |
commit | 4c3cf90117f1f4906d5975aeccc5ffd414807fd2 (patch) | |
tree | 97ffb9d131b69b694229bd8c2f7f27303ee6d4d0 /arch/arm/mach-omap2/common.c | |
parent | a66cb3454f220f49f900646ebdc76cb943319eb7 (diff) |
ARM: OMAP: Move set_globals initialization to happen in init_early
Otherwise we can't do generic map_io as we currently rely on
static mappings that work only because of arch_ioremap.
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/common.c')
-rw-r--r-- | arch/arm/mach-omap2/common.c | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c index de61f15c48e2..110e5b9db145 100644 --- a/arch/arm/mach-omap2/common.c +++ b/arch/arm/mach-omap2/common.c | |||
@@ -45,11 +45,11 @@ static void __init __omap2_set_globals(struct omap_globals *omap2_globals) | |||
45 | static struct omap_globals omap242x_globals = { | 45 | static struct omap_globals omap242x_globals = { |
46 | .class = OMAP242X_CLASS, | 46 | .class = OMAP242X_CLASS, |
47 | .tap = OMAP2_L4_IO_ADDRESS(0x48014000), | 47 | .tap = OMAP2_L4_IO_ADDRESS(0x48014000), |
48 | .sdrc = OMAP2420_SDRC_BASE, | 48 | .sdrc = OMAP2_L3_IO_ADDRESS(OMAP2420_SDRC_BASE), |
49 | .sms = OMAP2420_SMS_BASE, | 49 | .sms = OMAP2_L3_IO_ADDRESS(OMAP2420_SMS_BASE), |
50 | .ctrl = OMAP242X_CTRL_BASE, | 50 | .ctrl = OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE), |
51 | .prm = OMAP2420_PRM_BASE, | 51 | .prm = OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE), |
52 | .cm = OMAP2420_CM_BASE, | 52 | .cm = OMAP2_L4_IO_ADDRESS(OMAP2420_CM_BASE), |
53 | }; | 53 | }; |
54 | 54 | ||
55 | void __init omap2_set_globals_242x(void) | 55 | void __init omap2_set_globals_242x(void) |
@@ -59,7 +59,6 @@ void __init omap2_set_globals_242x(void) | |||
59 | 59 | ||
60 | void __init omap242x_map_io(void) | 60 | void __init omap242x_map_io(void) |
61 | { | 61 | { |
62 | omap2_set_globals_242x(); | ||
63 | omap242x_map_common_io(); | 62 | omap242x_map_common_io(); |
64 | } | 63 | } |
65 | #endif | 64 | #endif |
@@ -69,11 +68,11 @@ void __init omap242x_map_io(void) | |||
69 | static struct omap_globals omap243x_globals = { | 68 | static struct omap_globals omap243x_globals = { |
70 | .class = OMAP243X_CLASS, | 69 | .class = OMAP243X_CLASS, |
71 | .tap = OMAP2_L4_IO_ADDRESS(0x4900a000), | 70 | .tap = OMAP2_L4_IO_ADDRESS(0x4900a000), |
72 | .sdrc = OMAP243X_SDRC_BASE, | 71 | .sdrc = OMAP2_L3_IO_ADDRESS(OMAP243X_SDRC_BASE), |
73 | .sms = OMAP243X_SMS_BASE, | 72 | .sms = OMAP2_L3_IO_ADDRESS(OMAP243X_SMS_BASE), |
74 | .ctrl = OMAP243X_CTRL_BASE, | 73 | .ctrl = OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE), |
75 | .prm = OMAP2430_PRM_BASE, | 74 | .prm = OMAP2_L4_IO_ADDRESS(OMAP2430_PRM_BASE), |
76 | .cm = OMAP2430_CM_BASE, | 75 | .cm = OMAP2_L4_IO_ADDRESS(OMAP2430_CM_BASE), |
77 | }; | 76 | }; |
78 | 77 | ||
79 | void __init omap2_set_globals_243x(void) | 78 | void __init omap2_set_globals_243x(void) |
@@ -83,7 +82,6 @@ void __init omap2_set_globals_243x(void) | |||
83 | 82 | ||
84 | void __init omap243x_map_io(void) | 83 | void __init omap243x_map_io(void) |
85 | { | 84 | { |
86 | omap2_set_globals_243x(); | ||
87 | omap243x_map_common_io(); | 85 | omap243x_map_common_io(); |
88 | } | 86 | } |
89 | #endif | 87 | #endif |
@@ -93,11 +91,11 @@ void __init omap243x_map_io(void) | |||
93 | static struct omap_globals omap3_globals = { | 91 | static struct omap_globals omap3_globals = { |
94 | .class = OMAP343X_CLASS, | 92 | .class = OMAP343X_CLASS, |
95 | .tap = OMAP2_L4_IO_ADDRESS(0x4830A000), | 93 | .tap = OMAP2_L4_IO_ADDRESS(0x4830A000), |
96 | .sdrc = OMAP343X_SDRC_BASE, | 94 | .sdrc = OMAP2_L3_IO_ADDRESS(OMAP343X_SDRC_BASE), |
97 | .sms = OMAP343X_SMS_BASE, | 95 | .sms = OMAP2_L3_IO_ADDRESS(OMAP343X_SMS_BASE), |
98 | .ctrl = OMAP343X_CTRL_BASE, | 96 | .ctrl = OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE), |
99 | .prm = OMAP3430_PRM_BASE, | 97 | .prm = OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE), |
100 | .cm = OMAP3430_CM_BASE, | 98 | .cm = OMAP2_L4_IO_ADDRESS(OMAP3430_CM_BASE), |
101 | }; | 99 | }; |
102 | 100 | ||
103 | void __init omap2_set_globals_3xxx(void) | 101 | void __init omap2_set_globals_3xxx(void) |
@@ -107,7 +105,6 @@ void __init omap2_set_globals_3xxx(void) | |||
107 | 105 | ||
108 | void __init omap3_map_io(void) | 106 | void __init omap3_map_io(void) |
109 | { | 107 | { |
110 | omap2_set_globals_3xxx(); | ||
111 | omap34xx_map_common_io(); | 108 | omap34xx_map_common_io(); |
112 | } | 109 | } |
113 | 110 | ||
@@ -122,9 +119,9 @@ void __init omap3_map_io(void) | |||
122 | static struct omap_globals ti816x_globals = { | 119 | static struct omap_globals ti816x_globals = { |
123 | .class = OMAP343X_CLASS, | 120 | .class = OMAP343X_CLASS, |
124 | .tap = OMAP2_L4_IO_ADDRESS(TI816X_TAP_BASE), | 121 | .tap = OMAP2_L4_IO_ADDRESS(TI816X_TAP_BASE), |
125 | .ctrl = TI816X_CTRL_BASE, | 122 | .ctrl = OMAP2_L4_IO_ADDRESS(TI816X_CTRL_BASE), |
126 | .prm = TI816X_PRCM_BASE, | 123 | .prm = OMAP2_L4_IO_ADDRESS(TI816X_PRCM_BASE), |
127 | .cm = TI816X_PRCM_BASE, | 124 | .cm = OMAP2_L4_IO_ADDRESS(TI816X_PRCM_BASE), |
128 | }; | 125 | }; |
129 | 126 | ||
130 | void __init omap2_set_globals_ti816x(void) | 127 | void __init omap2_set_globals_ti816x(void) |
@@ -137,11 +134,11 @@ void __init omap2_set_globals_ti816x(void) | |||
137 | static struct omap_globals omap4_globals = { | 134 | static struct omap_globals omap4_globals = { |
138 | .class = OMAP443X_CLASS, | 135 | .class = OMAP443X_CLASS, |
139 | .tap = OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE), | 136 | .tap = OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE), |
140 | .ctrl = OMAP443X_SCM_BASE, | 137 | .ctrl = OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE), |
141 | .ctrl_pad = OMAP443X_CTRL_BASE, | 138 | .ctrl_pad = OMAP2_L4_IO_ADDRESS(OMAP443X_CTRL_BASE), |
142 | .prm = OMAP4430_PRM_BASE, | 139 | .prm = OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE), |
143 | .cm = OMAP4430_CM_BASE, | 140 | .cm = OMAP2_L4_IO_ADDRESS(OMAP4430_CM_BASE), |
144 | .cm2 = OMAP4430_CM2_BASE, | 141 | .cm2 = OMAP2_L4_IO_ADDRESS(OMAP4430_CM2_BASE), |
145 | }; | 142 | }; |
146 | 143 | ||
147 | void __init omap2_set_globals_443x(void) | 144 | void __init omap2_set_globals_443x(void) |
@@ -153,7 +150,6 @@ void __init omap2_set_globals_443x(void) | |||
153 | 150 | ||
154 | void __init omap4_map_io(void) | 151 | void __init omap4_map_io(void) |
155 | { | 152 | { |
156 | omap2_set_globals_443x(); | ||
157 | omap44xx_map_common_io(); | 153 | omap44xx_map_common_io(); |
158 | } | 154 | } |
159 | #endif | 155 | #endif |