]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-imx/mach-mx51_efikamx.c
Merge tag 'cleanup-initcall' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[karo-tx-linux.git] / arch / arm / mach-imx / mach-mx51_efikamx.c
index 86e96ef11f9d554ef926b35b344d1d70441bfa55..8d09c0126cabeb505a269f79c1131e9ffb5debd5 100644 (file)
@@ -207,29 +207,32 @@ static void mx51_efikamx_power_off(void)
 
 static int __init mx51_efikamx_power_init(void)
 {
-       if (machine_is_mx51_efikamx()) {
-               pwgt1 = regulator_get(NULL, "pwgt1");
-               pwgt2 = regulator_get(NULL, "pwgt2");
-               if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) {
-                       regulator_enable(pwgt1);
-                       regulator_enable(pwgt2);
-               }
-               gpio_request(EFIKAMX_POWEROFF, "poweroff");
-               pm_power_off = mx51_efikamx_power_off;
-
-               /* enable coincell charger. maybe need a small power driver ? */
-               coincell = regulator_get(NULL, "coincell");
-               if (!IS_ERR(coincell)) {
-                       regulator_set_voltage(coincell, 3000000, 3000000);
-                       regulator_enable(coincell);
-               }
-
-               regulator_has_full_constraints();
+       pwgt1 = regulator_get(NULL, "pwgt1");
+       pwgt2 = regulator_get(NULL, "pwgt2");
+       if (!IS_ERR(pwgt1) && !IS_ERR(pwgt2)) {
+               regulator_enable(pwgt1);
+               regulator_enable(pwgt2);
+       }
+       gpio_request(EFIKAMX_POWEROFF, "poweroff");
+       pm_power_off = mx51_efikamx_power_off;
+
+       /* enable coincell charger. maybe need a small power driver ? */
+       coincell = regulator_get(NULL, "coincell");
+       if (!IS_ERR(coincell)) {
+               regulator_set_voltage(coincell, 3000000, 3000000);
+               regulator_enable(coincell);
        }
 
+       regulator_has_full_constraints();
+
        return 0;
 }
-late_initcall(mx51_efikamx_power_init);
+
+static void __init mx51_efikamx_init_late(void)
+{
+       imx51_init_late();
+       mx51_efikamx_power_init();
+}
 
 static void __init mx51_efikamx_init(void)
 {
@@ -292,5 +295,6 @@ MACHINE_START(MX51_EFIKAMX, "Genesi Efika MX (Smarttop)")
        .handle_irq = imx51_handle_irq,
        .timer = &mx51_efikamx_timer,
        .init_machine = mx51_efikamx_init,
+       .init_late = mx51_efikamx_init_late,
        .restart = mx51_efikamx_restart,
 MACHINE_END