aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-imx/cpu-imx5.c6
-rw-r--r--arch/arm/mach-imx/imx51-dt.c1
-rw-r--r--arch/arm/mach-imx/mach-cpuimx51.c1
-rw-r--r--arch/arm/mach-imx/mach-cpuimx51sd.c1
-rw-r--r--arch/arm/mach-imx/mach-mx51_3ds.c1
-rw-r--r--arch/arm/mach-imx/mach-mx51_babbage.c1
-rw-r--r--arch/arm/mach-imx/mach-mx51_efikamx.c42
-rw-r--r--arch/arm/mach-imx/mach-mx51_efikasb.c28
-rw-r--r--arch/arm/mach-imx/mach-pcm037.c6
-rw-r--r--arch/arm/mach-imx/mach-pcm037_eet.c5
-rw-r--r--arch/arm/mach-imx/mm-imx5.c5
-rw-r--r--arch/arm/mach-imx/pcm037.h6
-rw-r--r--arch/arm/plat-mxc/include/mach/common.h7
13 files changed, 71 insertions, 39 deletions
diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c
index aa15c517d06e..8eb15a2fcaf9 100644
--- a/arch/arm/mach-imx/cpu-imx5.c
+++ b/arch/arm/mach-imx/cpu-imx5.c
@@ -62,11 +62,8 @@ EXPORT_SYMBOL(mx51_revision);
62 * Dependent on link order - so the assumption is that vfp_init is called 62 * Dependent on link order - so the assumption is that vfp_init is called
63 * before us. 63 * before us.
64 */ 64 */
65static int __init mx51_neon_fixup(void) 65int __init mx51_neon_fixup(void)
66{ 66{
67 if (!cpu_is_mx51())
68 return 0;
69
70 if (mx51_revision() < IMX_CHIP_REVISION_3_0 && 67 if (mx51_revision() < IMX_CHIP_REVISION_3_0 &&
71 (elf_hwcap & HWCAP_NEON)) { 68 (elf_hwcap & HWCAP_NEON)) {
72 elf_hwcap &= ~HWCAP_NEON; 69 elf_hwcap &= ~HWCAP_NEON;
@@ -75,7 +72,6 @@ static int __init mx51_neon_fixup(void)
75 return 0; 72 return 0;
76} 73}
77 74
78late_initcall(mx51_neon_fixup);
79#endif 75#endif
80 76
81static int get_mx53_srev(void) 77static int get_mx53_srev(void)
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
index 5cca573964f0..da4f4f5ddd42 100644
--- a/arch/arm/mach-imx/imx51-dt.c
+++ b/arch/arm/mach-imx/imx51-dt.c
@@ -115,6 +115,7 @@ DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
115 .handle_irq = imx51_handle_irq, 115 .handle_irq = imx51_handle_irq,
116 .timer = &imx51_timer, 116 .timer = &imx51_timer,
117 .init_machine = imx51_dt_init, 117 .init_machine = imx51_dt_init,
118 .init_late = imx51_init_late,
118 .dt_compat = imx51_dt_board_compat, 119 .dt_compat = imx51_dt_board_compat,
119 .restart = mxc_restart, 120 .restart = mxc_restart,
120MACHINE_END 121MACHINE_END
diff --git a/arch/arm/mach-imx/mach-cpuimx51.c b/arch/arm/mach-imx/mach-cpuimx51.c
index 944025da8333..4bd7c7679b1c 100644
--- a/arch/arm/mach-imx/mach-cpuimx51.c
+++ b/arch/arm/mach-imx/mach-cpuimx51.c
@@ -297,5 +297,6 @@ MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
297 .handle_irq = imx51_handle_irq, 297 .handle_irq = imx51_handle_irq,
298 .timer = &mxc_timer, 298 .timer = &mxc_timer,
299 .init_machine = eukrea_cpuimx51_init, 299 .init_machine = eukrea_cpuimx51_init,
300 .init_late = imx51_init_late,
300 .restart = mxc_restart, 301 .restart = mxc_restart,
301MACHINE_END 302MACHINE_END
diff --git a/arch/arm/mach-imx/mach-cpuimx51sd.c b/arch/arm/mach-imx/mach-cpuimx51sd.c
index 9fbe923c8b08..0b8770fe7eae 100644
--- a/arch/arm/mach-imx/mach-cpuimx51sd.c
+++ b/arch/arm/mach-imx/mach-cpuimx51sd.c
@@ -335,5 +335,6 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
335 .handle_irq = imx51_handle_irq, 335 .handle_irq = imx51_handle_irq,
336 .timer = &mxc_timer, 336 .timer = &mxc_timer,
337 .init_machine = eukrea_cpuimx51sd_init, 337 .init_machine = eukrea_cpuimx51sd_init,
338 .init_late = imx51_init_late,
338 .restart = mxc_restart, 339 .restart = mxc_restart,
339MACHINE_END 340MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx51_3ds.c b/arch/arm/mach-imx/mach-mx51_3ds.c
index 83eab4176ca4..3c5b163923f6 100644
--- a/arch/arm/mach-imx/mach-mx51_3ds.c
+++ b/arch/arm/mach-imx/mach-mx51_3ds.c
@@ -175,5 +175,6 @@ MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
175 .handle_irq = imx51_handle_irq, 175 .handle_irq = imx51_handle_irq,
176 .timer = &mx51_3ds_timer, 176 .timer = &mx51_3ds_timer,
177 .init_machine = mx51_3ds_init, 177 .init_machine = mx51_3ds_init,
178 .init_late = imx51_init_late,
178 .restart = mxc_restart, 179 .restart = mxc_restart,
179MACHINE_END 180MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx51_babbage.c b/arch/arm/mach-imx/mach-mx51_babbage.c
index e4b822e9f719..f3b01157108d 100644
--- a/arch/arm/mach-imx/mach-mx51_babbage.c
+++ b/arch/arm/mach-imx/mach-mx51_babbage.c
@@ -426,5 +426,6 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
426 .handle_irq = imx51_handle_irq, 426 .handle_irq = imx51_handle_irq,
427 .timer = &mx51_babbage_timer, 427 .timer = &mx51_babbage_timer,
428 .init_machine = mx51_babbage_init, 428 .init_machine = mx51_babbage_init,
429 .init_late = imx51_init_late,
429 .restart = mxc_restart, 430 .restart = mxc_restart,
430MACHINE_END 431MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx51_efikamx.c b/arch/arm/mach-imx/mach-mx51_efikamx.c
index 586e9f822124..a9f3c7c5a1e0 100644
--- a/arch/arm/mach-imx/mach-mx51_efikamx.c
+++ b/arch/arm/mach-imx/mach-mx51_efikamx.c
@@ -207,29 +207,32 @@ static void mx51_efikamx_power_off(void)
207 207
208static int __init mx51_efikamx_power_init(void) 208static int __init mx51_efikamx_power_init(void)
209{ 209{
210 if (machine_is_mx51_efikamx()) { 210 pwgt1 = regulator_get(NULL, "pwgt1");
211 pwgt1 = regulator_get(NULL, "pwgt1"); 211 pwgt2 = regulator_get(NULL, "pwgt2");
212 pwgt2 = regulator_get(NULL, "pwgt2"); 212 if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) {
213 if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) { 213 regulator_enable(pwgt1);
214 regulator_enable(pwgt1); 214 regulator_enable(pwgt2);
215 regulator_enable(pwgt2); 215 }
216 } 216 gpio_request(EFIKAMX_POWEROFF, "poweroff");
217 gpio_request(EFIKAMX_POWEROFF, "poweroff"); 217 pm_power_off = mx51_efikamx_power_off;
218 pm_power_off = mx51_efikamx_power_off; 218
219 219 /* enable coincell charger. maybe need a small power driver ? */
220 /* enable coincell charger. maybe need a small power driver ? */ 220 coincell = regulator_get(NULL, "coincell");
221 coincell = regulator_get(NULL, "coincell"); 221 if (!IS_ERR(coincell)) {
222 if (!IS_ERR(coincell)) { 222 regulator_set_voltage(coincell, 3000000, 3000000);
223 regulator_set_voltage(coincell, 3000000, 3000000); 223 regulator_enable(coincell);
224 regulator_enable(coincell);
225 }
226
227 regulator_has_full_constraints();
228 } 224 }
229 225
226 regulator_has_full_constraints();
227
230 return 0; 228 return 0;
231} 229}
232late_initcall(mx51_efikamx_power_init); 230
231static void __init mx51_efikamx_init_late(void)
232{
233 imx51_init_late();
234 mx51_efikamx_power_init();
235}
233 236
234static void __init mx51_efikamx_init(void) 237static void __init mx51_efikamx_init(void)
235{ 238{
@@ -293,5 +296,6 @@ MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
293 .handle_irq = imx51_handle_irq, 296 .handle_irq = imx51_handle_irq,
294 .timer = &mx51_efikamx_timer, 297 .timer = &mx51_efikamx_timer,
295 .init_machine = mx51_efikamx_init, 298 .init_machine = mx51_efikamx_init,
299 .init_late = mx51_efikamx_init_late,
296 .restart = mx51_efikamx_restart, 300 .restart = mx51_efikamx_restart,
297MACHINE_END 301MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx51_efikasb.c b/arch/arm/mach-imx/mach-mx51_efikasb.c
index 24aded9e109f..e73db383c3c1 100644
--- a/arch/arm/mach-imx/mach-mx51_efikasb.c
+++ b/arch/arm/mach-imx/mach-mx51_efikasb.c
@@ -211,22 +211,25 @@ static void mx51_efikasb_power_off(void)
211 211
212static int __init mx51_efikasb_power_init(void) 212static int __init mx51_efikasb_power_init(void)
213{ 213{
214 if (machine_is_mx51_efikasb()) { 214 pwgt1 = regulator_get(NULL, "pwgt1");
215 pwgt1 = regulator_get(NULL, "pwgt1"); 215 pwgt2 = regulator_get(NULL, "pwgt2");
216 pwgt2 = regulator_get(NULL, "pwgt2"); 216 if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) {
217 if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) { 217 regulator_enable(pwgt1);
218 regulator_enable(pwgt1); 218 regulator_enable(pwgt2);
219 regulator_enable(pwgt2);
220 }
221 gpio_request(EFIKASB_POWEROFF, "poweroff");
222 pm_power_off = mx51_efikasb_power_off;
223
224 regulator_has_full_constraints();
225 } 219 }
220 gpio_request(EFIKASB_POWEROFF, "poweroff");
221 pm_power_off = mx51_efikasb_power_off;
222
223 regulator_has_full_constraints();
226 224
227 return 0; 225 return 0;
228} 226}
229late_initcall(mx51_efikasb_power_init); 227
228static void __init mx51_efikasb_init_late(void)
229{
230 imx51_init_late();
231 mx51_efikasb_power_init();
232}
230 233
231/* 01 R1.3 board 234/* 01 R1.3 board
232 10 R2.0 board */ 235 10 R2.0 board */
@@ -287,6 +290,7 @@ MACHINE_START(MX51_EFIKASB, "Genesi Efika Smartbook")
287 .init_irq = mx51_init_irq, 290 .init_irq = mx51_init_irq,
288 .handle_irq = imx51_handle_irq, 291 .handle_irq = imx51_handle_irq,
289 .init_machine = efikasb_board_init, 292 .init_machine = efikasb_board_init,
293 .init_late = mx51_efikasb_init_late,
290 .timer = &mx51_efikasb_timer, 294 .timer = &mx51_efikasb_timer,
291 .restart = mxc_restart, 295 .restart = mxc_restart,
292MACHINE_END 296MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c
index 5fddf94cc969..3aba3a924d5f 100644
--- a/arch/arm/mach-imx/mach-pcm037.c
+++ b/arch/arm/mach-imx/mach-pcm037.c
@@ -694,6 +694,11 @@ static void __init pcm037_reserve(void)
694 MX3_CAMERA_BUF_SIZE); 694 MX3_CAMERA_BUF_SIZE);
695} 695}
696 696
697static void __init pcm037_init_late(void)
698{
699 pcm037_eet_init_devices();
700}
701
697MACHINE_START(PCM037, "Phytec Phycore pcm037") 702MACHINE_START(PCM037, "Phytec Phycore pcm037")
698 /* Maintainer: Pengutronix */ 703 /* Maintainer: Pengutronix */
699 .atag_offset = 0x100, 704 .atag_offset = 0x100,
@@ -704,5 +709,6 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
704 .handle_irq = imx31_handle_irq, 709 .handle_irq = imx31_handle_irq,
705 .timer = &pcm037_timer, 710 .timer = &pcm037_timer,
706 .init_machine = pcm037_init, 711 .init_machine = pcm037_init,
712 .init_late = pcm037_init_late,
707 .restart = mxc_restart, 713 .restart = mxc_restart,
708MACHINE_END 714MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pcm037_eet.c b/arch/arm/mach-imx/mach-pcm037_eet.c
index 1b7606bef8f4..11ffa81ad17d 100644
--- a/arch/arm/mach-imx/mach-pcm037_eet.c
+++ b/arch/arm/mach-imx/mach-pcm037_eet.c
@@ -160,9 +160,9 @@ static const struct gpio_keys_platform_data
160 .rep = 0, /* No auto-repeat */ 160 .rep = 0, /* No auto-repeat */
161}; 161};
162 162
163static int __init eet_init_devices(void) 163int __init pcm037_eet_init_devices(void)
164{ 164{
165 if (!machine_is_pcm037() || pcm037_variant() != PCM037_EET) 165 if (pcm037_variant() != PCM037_EET)
166 return 0; 166 return 0;
167 167
168 mxc_iomux_setup_multiple_pins(pcm037_eet_pins, 168 mxc_iomux_setup_multiple_pins(pcm037_eet_pins,
@@ -176,4 +176,3 @@ static int __init eet_init_devices(void)
176 176
177 return 0; 177 return 0;
178} 178}
179late_initcall(eet_init_devices);
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c
index e10f3914fcfe..d6b7e9fb0f89 100644
--- a/arch/arm/mach-imx/mm-imx5.c
+++ b/arch/arm/mach-imx/mm-imx5.c
@@ -234,3 +234,8 @@ void __init imx53_soc_init(void)
234 platform_device_register_simple("imx31-audmux", 0, imx53_audmux_res, 234 platform_device_register_simple("imx31-audmux", 0, imx53_audmux_res,
235 ARRAY_SIZE(imx53_audmux_res)); 235 ARRAY_SIZE(imx53_audmux_res));
236} 236}
237
238void __init imx51_init_late(void)
239{
240 mx51_neon_fixup();
241}
diff --git a/arch/arm/mach-imx/pcm037.h b/arch/arm/mach-imx/pcm037.h
index d6929721a5fd..7d167690e17d 100644
--- a/arch/arm/mach-imx/pcm037.h
+++ b/arch/arm/mach-imx/pcm037.h
@@ -8,4 +8,10 @@ enum pcm037_board_variant {
8 8
9extern enum pcm037_board_variant pcm037_variant(void); 9extern enum pcm037_board_variant pcm037_variant(void);
10 10
11#ifdef CONFIG_MACH_PCM037_EET
12int pcm037_eet_init_devices(void);
13#else
14static inline int pcm037_eet_init_devices(void) { return 0; }
15#endif
16
11#endif 17#endif
diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h
index 0319c4a0cafa..cf663d84e7c1 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -53,6 +53,7 @@ extern void imx35_soc_init(void);
53extern void imx50_soc_init(void); 53extern void imx50_soc_init(void);
54extern void imx51_soc_init(void); 54extern void imx51_soc_init(void);
55extern void imx53_soc_init(void); 55extern void imx53_soc_init(void);
56extern void imx51_init_late(void);
56extern void epit_timer_init(struct clk *timer_clk, void __iomem *base, int irq); 57extern void epit_timer_init(struct clk *timer_clk, void __iomem *base, int irq);
57extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int); 58extern void mxc_timer_init(struct clk *timer_clk, void __iomem *, int);
58extern int mx1_clocks_init(unsigned long fref); 59extern int mx1_clocks_init(unsigned long fref);
@@ -149,4 +150,10 @@ extern void imx6q_pm_init(void);
149static inline void imx6q_pm_init(void) {} 150static inline void imx6q_pm_init(void) {}
150#endif 151#endif
151 152
153#ifdef CONFIG_NEON
154extern int mx51_neon_fixup(void);
155#else
156static inline int mx51_neon_fixup(void) { return 0; }
157#endif
158
152#endif 159#endif