]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ARM: OMAP4+: move errata initialization to omap4_pm_init_early
authorNishanth Menon <nm@ti.com>
Mon, 20 Jan 2014 20:06:37 +0000 (14:06 -0600)
committerOlof Johansson <olof@lixom.net>
Fri, 31 Jan 2014 22:57:37 +0000 (14:57 -0800)
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>
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/omap-smp.c
arch/arm/mach-omap2/pm44xx.c

index 3adaa1d5cd108f9a5a5683f214df608cc228dafe..a6aae300542cd822a873501e7670ea2dc273dd14 100644 (file)
@@ -62,11 +62,17 @@ static inline int omap3_pm_init(void)
 
 #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP4)
 int omap4_pm_init(void);
+int omap4_pm_init_early(void);
 #else
 static inline int omap4_pm_init(void)
 {
        return 0;
 }
+
+static inline int omap4_pm_init_early(void)
+{
+       return 0;
+}
 #endif
 
 #ifdef CONFIG_OMAP_MUX
index 47381fd8746f6f673a6c2aeaa25ca11436c3809e..d408b15b4fbfd97ecd3d82aaa46cc86788e63a8c 100644 (file)
@@ -641,6 +641,7 @@ void __init omap4430_init_early(void)
        omap_cm_base_init();
        omap4xxx_check_revision();
        omap4xxx_check_features();
+       omap4_pm_init_early();
        omap44xx_prm_init();
        omap44xx_voltagedomains_init();
        omap44xx_powerdomains_init();
index 75e95d4fb448cdc3747323576e1c3ea800a3886e..17550aa39d0f395fe6489c309c77a316e4cdc16c 100644 (file)
@@ -39,8 +39,6 @@
 
 #define OMAP5_CORE_COUNT       0x2
 
-u16 pm44xx_errata;
-
 /* SCU base address */
 static void __iomem *scu_base;
 
@@ -217,10 +215,8 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
        if (scu_base)
                scu_enable(scu_base);
 
-       if (cpu_is_omap446x()) {
+       if (cpu_is_omap446x())
                startup_addr = omap4460_secondary_startup;
-               pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD;
-       }
 
        /*
         * Write the address of secondary startup routine into the
index 82f0698933d85a5715282378736de84fa16ebad6..eefb30cfcabdae50892872b335d6c47f06f50571 100644 (file)
@@ -24,6 +24,8 @@
 #include "powerdomain.h"
 #include "pm.h"
 
+u16 pm44xx_errata;
+
 struct power_state {
        struct powerdomain *pwrdm;
        u32 next_state;
@@ -198,6 +200,19 @@ static inline int omap4_init_static_deps(void)
        return ret;
 }
 
+/**
+ * omap4_pm_init_early - Does early initialization necessary for OMAP4+ devices
+ *
+ * Initializes basic stuff for power management functionality.
+ */
+int __init omap4_pm_init_early(void)
+{
+       if (cpu_is_omap446x())
+               pm44xx_errata |= PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD;
+
+       return 0;
+}
+
 /**
  * omap4_pm_init - Init routine for OMAP4+ devices
  *