diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-03-29 02:41:27 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-04-04 09:15:57 -0400 |
commit | 45680995cd8ccf5eb71a1808eb96408589d37a26 (patch) | |
tree | 0ad2b5c89a2a4138de4f2538180833491f8d8f06 /arch/arm/mach-mxs | |
parent | e933a1a12a02f42e0013cda87bba37ccb59efc47 (diff) |
ARM: mxs: call mxs_pm_init() as a machine_desc hook
The device_initcall is not a friend of multiplatform build. Call
mxs_pm_init() as a machine_desc hook instead of device_initcall.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-mxs')
-rw-r--r-- | arch/arm/mach-mxs/mach-mxs.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-mxs/pm.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-mxs/pm.h | 14 |
3 files changed, 18 insertions, 3 deletions
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 16870bf853b8..b5c1bdd3dcdf 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include <asm/mach/time.h> | 32 | #include <asm/mach/time.h> |
33 | #include <asm/system_misc.h> | 33 | #include <asm/system_misc.h> |
34 | 34 | ||
35 | #include "pm.h" | ||
36 | |||
35 | /* MXS DIGCTL SAIF CLKMUX */ | 37 | /* MXS DIGCTL SAIF CLKMUX */ |
36 | #define MXS_DIGCTL_SAIF_CLKMUX_DIRECT 0x0 | 38 | #define MXS_DIGCTL_SAIF_CLKMUX_DIRECT 0x0 |
37 | #define MXS_DIGCTL_SAIF_CLKMUX_CROSSINPUT 0x1 | 39 | #define MXS_DIGCTL_SAIF_CLKMUX_CROSSINPUT 0x1 |
@@ -607,6 +609,7 @@ DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)") | |||
607 | .handle_irq = icoll_handle_irq, | 609 | .handle_irq = icoll_handle_irq, |
608 | .init_time = mxs_timer_init, | 610 | .init_time = mxs_timer_init, |
609 | .init_machine = mxs_machine_init, | 611 | .init_machine = mxs_machine_init, |
612 | .init_late = mxs_pm_init, | ||
610 | .dt_compat = mxs_dt_compat, | 613 | .dt_compat = mxs_dt_compat, |
611 | .restart = mxs_restart, | 614 | .restart = mxs_restart, |
612 | MACHINE_END | 615 | MACHINE_END |
diff --git a/arch/arm/mach-mxs/pm.c b/arch/arm/mach-mxs/pm.c index a9b4bbcdafb4..b2494d2db2c4 100644 --- a/arch/arm/mach-mxs/pm.c +++ b/arch/arm/mach-mxs/pm.c | |||
@@ -34,9 +34,7 @@ static struct platform_suspend_ops mxs_suspend_ops = { | |||
34 | .valid = suspend_valid_only_mem, | 34 | .valid = suspend_valid_only_mem, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static int __init mxs_pm_init(void) | 37 | void __init mxs_pm_init(void) |
38 | { | 38 | { |
39 | suspend_set_ops(&mxs_suspend_ops); | 39 | suspend_set_ops(&mxs_suspend_ops); |
40 | return 0; | ||
41 | } | 40 | } |
42 | device_initcall(mxs_pm_init); | ||
diff --git a/arch/arm/mach-mxs/pm.h b/arch/arm/mach-mxs/pm.h new file mode 100644 index 000000000000..f57e7cdece2e --- /dev/null +++ b/arch/arm/mach-mxs/pm.h | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Freescale Semiconductor, Inc. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ARCH_MXS_PM_H | ||
10 | #define __ARCH_MXS_PM_H | ||
11 | |||
12 | void mxs_pm_init(void); | ||
13 | |||
14 | #endif | ||