summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/mach-mx51_efikamx.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 20:14:01 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 20:14:01 (GMT)
commitf465d145d76803fe6332092775d891c8c509aa44 (patch)
tree45889e2eee7e8288ef269e9b661111364a71c25f /arch/arm/mach-imx/mach-mx51_efikamx.c
parent30b842889eea1bea02dff55b13d2ddf07a46ce78 (diff)
parent80b9abf973462499c1a0110df47f62cc90361e2c (diff)
downloadlinux-fsl-qoriq-f465d145d76803fe6332092775d891c8c509aa44.tar.xz
Merge tag 'cleanup-initcall' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull sweeping late_initcall cleanup for arm-soc from Olof Johansson: "This is a patch series from Shawn Guo that moves from individual late_initcalls() to using a member in the machine structure to invoke a platform's late initcalls. This cleanup is a step in the move towards multiplatform kernels since it would reduce the need to check for compatible platforms in each and every initcall." Fix up trivial conflicts in arch/arm/mach-{exynos/mach-universal_c210.c, imx/mach-cpuimx51.c, omap2/board-generic.c} due to changes nearby (and, in the case of cpuimx51.c the board support being deleted) * tag 'cleanup-initcall' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: ux500: use machine specific hook for late init ARM: tegra: use machine specific hook for late init ARM: shmobile: use machine specific hook for late init ARM: sa1100: use machine specific hook for late init ARM: s3c64xx: use machine specific hook for late init ARM: prima2: use machine specific hook for late init ARM: pnx4008: use machine specific hook for late init ARM: omap2: use machine specific hook for late init ARM: omap1: use machine specific hook for late init ARM: msm: use machine specific hook for late init ARM: imx: use machine specific hook for late init ARM: exynos: use machine specific hook for late init ARM: ep93xx: use machine specific hook for late init ARM: davinci: use machine specific hook for late init ARM: provide a late_initcall hook for platform initialization
Diffstat (limited to 'arch/arm/mach-imx/mach-mx51_efikamx.c')
-rw-r--r--arch/arm/mach-imx/mach-mx51_efikamx.c42
1 files changed, 23 insertions, 19 deletions
diff --git a/arch/arm/mach-imx/mach-mx51_efikamx.c b/arch/arm/mach-imx/mach-mx51_efikamx.c
index 86e96ef..8d09c01 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)
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