diff options
author | Nishanth Menon <nm@ti.com> | 2014-01-20 15:06:37 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2014-01-31 17:57:37 -0500 |
commit | de70af494c468c107eedf90090eb74d6ccf30c4c (patch) | |
tree | 3aee0707c7fe9a0ba0844377dd883880f952446a | |
parent | 74ed7bdcb41d32c7628c3bd1478b076e5b1ad8a4 (diff) |
ARM: OMAP4+: move errata initialization to omap4_pm_init_early
Move all OMAP4 PM errata initializations to centralized location in
omap4_pm_init_early. This allows for users to utilize the erratas
in various submodules as needed.
Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | arch/arm/mach-omap2/common.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap-smp.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm44xx.c | 15 |
4 files changed, 23 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 3adaa1d5cd10..a6aae300542c 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -62,11 +62,17 @@ static inline int omap3_pm_init(void) | |||
62 | 62 | ||
63 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP4) | 63 | #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP4) |
64 | int omap4_pm_init(void); | 64 | int omap4_pm_init(void); |
65 | int omap4_pm_init_early(void); | ||
65 | #else | 66 | #else |
66 | static inline int omap4_pm_init(void) | 67 | static inline int omap4_pm_init(void) |
67 | { | 68 | { |
68 | return 0; | 69 | return 0; |
69 | } | 70 | } |
71 | |||
72 | static inline int omap4_pm_init_early(void) | ||
73 | { | ||
74 | return 0; | ||
75 | } | ||
70 | #endif | 76 | #endif |
71 | 77 | ||
72 | #ifdef CONFIG_OMAP_MUX | 78 | #ifdef CONFIG_OMAP_MUX |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 47381fd8746f..d408b15b4fbf 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -641,6 +641,7 @@ void __init omap4430_init_early(void) | |||
641 | omap_cm_base_init(); | 641 | omap_cm_base_init(); |
642 | omap4xxx_check_revision(); | 642 | omap4xxx_check_revision(); |
643 | omap4xxx_check_features(); | 643 | omap4xxx_check_features(); |
644 | omap4_pm_init_early(); | ||
644 | omap44xx_prm_init(); | 645 | omap44xx_prm_init(); |
645 | omap44xx_voltagedomains_init(); | 646 | omap44xx_voltagedomains_init(); |
646 | omap44xx_powerdomains_init(); | 647 | omap44xx_powerdomains_init(); |
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c index 75e95d4fb448..17550aa39d0f 100644 --- a/arch/arm/mach-omap2/omap-smp.c +++ b/arch/arm/mach-omap2/omap-smp.c | |||
@@ -39,8 +39,6 @@ | |||
39 | 39 | ||
40 | #define OMAP5_CORE_COUNT 0x2 | 40 | #define OMAP5_CORE_COUNT 0x2 |
41 | 41 | ||
42 | u16 pm44xx_errata; | ||
43 | |||
44 | /* SCU base address */ | 42 | /* SCU base address */ |
45 | static void __iomem *scu_base; | 43 | static void __iomem *scu_base; |
46 | 44 | ||
@@ -217,10 +215,8 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus) | |||
217 | if (scu_base) | 215 | if (scu_base) |
218 | scu_enable(scu_base); | 216 | scu_enable(scu_base); |
219 | 217 | ||
220 | if (cpu_is_omap446x()) { | 218 | if (cpu_is_omap446x()) |
221 | startup_addr = omap4460_secondary_startup; | 219 | startup_addr = omap4460_secondary_startup; |
222 | pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD; | ||
223 | } | ||
224 | 220 | ||
225 | /* | 221 | /* |
226 | * Write the address of secondary startup routine into the | 222 | * Write the address of secondary startup routine into the |
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index 82f0698933d8..eefb30cfcabd 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include "powerdomain.h" | 24 | #include "powerdomain.h" |
25 | #include "pm.h" | 25 | #include "pm.h" |
26 | 26 | ||
27 | u16 pm44xx_errata; | ||
28 | |||
27 | struct power_state { | 29 | struct power_state { |
28 | struct powerdomain *pwrdm; | 30 | struct powerdomain *pwrdm; |
29 | u32 next_state; | 31 | u32 next_state; |
@@ -199,6 +201,19 @@ static inline int omap4_init_static_deps(void) | |||
199 | } | 201 | } |
200 | 202 | ||
201 | /** | 203 | /** |
204 | * omap4_pm_init_early - Does early initialization necessary for OMAP4+ devices | ||
205 | * | ||
206 | * Initializes basic stuff for power management functionality. | ||
207 | */ | ||
208 | int __init omap4_pm_init_early(void) | ||
209 | { | ||
210 | if (cpu_is_omap446x()) | ||
211 | pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD; | ||
212 | |||
213 | return 0; | ||
214 | } | ||
215 | |||
216 | /** | ||
202 | * omap4_pm_init - Init routine for OMAP4+ devices | 217 | * omap4_pm_init - Init routine for OMAP4+ devices |
203 | * | 218 | * |
204 | * Initializes all powerdomain and clockdomain target states | 219 | * Initializes all powerdomain and clockdomain target states |