aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-imx')
-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-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
11 files changed, 63 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 5f577fbda2c8..18e78dba4298 100644
--- a/arch/arm/mach-imx/imx51-dt.c
+++ b/arch/arm/mach-imx/imx51-dt.c
@@ -118,6 +118,7 @@ DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
118 .handle_irq = imx51_handle_irq, 118 .handle_irq = imx51_handle_irq,
119 .timer = &imx51_timer, 119 .timer = &imx51_timer,
120 .init_machine = imx51_dt_init, 120 .init_machine = imx51_dt_init,
121 .init_late = imx51_init_late,
121 .dt_compat = imx51_dt_board_compat, 122 .dt_compat = imx51_dt_board_compat,
122 .restart = mxc_restart, 123 .restart = mxc_restart,
123MACHINE_END 124MACHINE_END
diff --git a/arch/arm/mach-imx/mach-cpuimx51sd.c b/arch/arm/mach-imx/mach-cpuimx51sd.c
index ce341a6874fc..ac50f1671e38 100644
--- a/arch/arm/mach-imx/mach-cpuimx51sd.c
+++ b/arch/arm/mach-imx/mach-cpuimx51sd.c
@@ -369,5 +369,6 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
369 .handle_irq = imx51_handle_irq, 369 .handle_irq = imx51_handle_irq,
370 .timer = &mxc_timer, 370 .timer = &mxc_timer,
371 .init_machine = eukrea_cpuimx51sd_init, 371 .init_machine = eukrea_cpuimx51sd_init,
372 .init_late = imx51_init_late,
372 .restart = mxc_restart, 373 .restart = mxc_restart,
373MACHINE_END 374MACHINE_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 517672ebcbc5..dde397014d4b 100644
--- a/arch/arm/mach-imx/mach-mx51_babbage.c
+++ b/arch/arm/mach-imx/mach-mx51_babbage.c
@@ -432,5 +432,6 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
432 .handle_irq = imx51_handle_irq, 432 .handle_irq = imx51_handle_irq,
433 .timer = &mx51_babbage_timer, 433 .timer = &mx51_babbage_timer,
434 .init_machine = mx51_babbage_init, 434 .init_machine = mx51_babbage_init,
435 .init_late = imx51_init_late,
435 .restart = mxc_restart, 436 .restart = mxc_restart,
436MACHINE_END 437MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx51_efikamx.c b/arch/arm/mach-imx/mach-mx51_efikamx.c
index 86e96ef11f9d..8d09c0126cab 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{
@@ -292,5 +295,6 @@ MACHINE_START(MX51_EFIKAMX, "Genesi Efika MX (Smarttop)")
292 .handle_irq = imx51_handle_irq, 295 .handle_irq = imx51_handle_irq,
293 .timer = &mx51_efikamx_timer, 296 .timer = &mx51_efikamx_timer,
294 .init_machine = mx51_efikamx_init, 297 .init_machine = mx51_efikamx_init,
298 .init_late = mx51_efikamx_init_late,
295 .restart = mx51_efikamx_restart, 299 .restart = mx51_efikamx_restart,
296MACHINE_END 300MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx51_efikasb.c b/arch/arm/mach-imx/mach-mx51_efikasb.c
index 88f837a6cc76..fdbd181b97ef 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 MX (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 10c9795934a3..0a40004154f2 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 8b4dc20c7c53..feeee17da96b 100644
--- a/arch/arm/mach-imx/mm-imx5.c
+++ b/arch/arm/mach-imx/mm-imx5.c
@@ -237,3 +237,8 @@ void __init imx53_soc_init(void)
237 platform_device_register_simple("imx31-audmux", 0, imx53_audmux_res, 237 platform_device_register_simple("imx31-audmux", 0, imx53_audmux_res,
238 ARRAY_SIZE(imx53_audmux_res)); 238 ARRAY_SIZE(imx53_audmux_res));
239} 239}
240
241void __init imx51_init_late(void)
242{
243 mx51_neon_fixup();
244}
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