Skip to contentSkip to conversation

ARM: OMAP4460: cpuidle: Extend PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD on cpuidle

PATCH In review Grygorii Strashko 6 participants 13 messages Oct 22, 2013 – Jan 27, 2014 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v2 1/1 ARM: OMAP4460: cpuidle: Extend PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD on cpuidle

The same workaround as ff999b8a0983ee15668394ed49e38d3568fc6859 "ARM: OMAP4460: Workaround for ROM bug because of CA9 r2pX GIC ..." need to be applied not only when system is booting, but when MPUSS hits OSWR state through CPUIdle too. Without this WA the same issue is reproduced now on boards PandaES and Tablet/Blaze with SOM OMAP4460 when CONFIG_CPU_IDLE is enabled.
After MPUSS has enterred OSWR and waken up:
- GIC distributor became disabled forever
- scheduling is not performed any more

---
Changes in V2:
- get rid of using omap4_mpuss_read_prev_context_state();
- move call of gic_dist_enable() in omap-mpuss-lowpower.c
- add call of gic_timer_retrigger()

Based on: v3.12-rc5

 arch/arm/mach-omap2/common.h              |    1 +
 arch/arm/mach-omap2/cpuidle44xx.c         |   26 +++++++++++++++++++++-----
 arch/arm/mach-omap2/omap-mpuss-lowpower.c |    3 +++
 arch/arm/mach-omap2/omap4-common.c        |    6 ++++++
 4 files changed, 31 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/common.h +1 -0
index 4a5684b..c9b4bc3 100644
@@ -232,6 +232,7 @@ static inline void __iomem *omap4_get_scu_base(void)
 
 extern void __init gic_init_irq(void);
 extern void gic_dist_disable(void);
+extern void gic_dist_enable(void);
 extern bool gic_dist_disabled(void);
 extern void gic_timer_retrigger(void);
 extern void omap_smc1(u32 fn, u32 arg);
arch/arm/mach-omap2/cpuidle44xx.c +21 -5
index 4c8982a..4c158c8 100644
@@ -80,6 +80,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
 			int index)
 {
 	struct idle_statedata *cx = state_ptr + index;
+	u32 mpuss_can_lose_context = 0;
 
 	/*
 	 * CPU0 has to wait and stay ON until CPU1 is OFF state.
@@ -104,6 +105,9 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
 		}
 	}
 
+	mpuss_can_lose_context = (cx->mpu_state == PWRDM_POWER_RET) &&
+				 (cx->mpu_logic_state == PWRDM_POWER_OFF);
+
 	/*
 	 * Call idle CPU PM enter notifier chain so that
 	 * VFP and per CPU interrupt context is saved.
@@ -118,9 +122,8 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
 		 * Call idle CPU cluster PM enter notifier chain
 		 * to save GIC and wakeupgen context.
 		 */
-		if ((cx->mpu_state == PWRDM_POWER_RET) &&
-			(cx->mpu_logic_state == PWRDM_POWER_OFF))
-				cpu_cluster_pm_enter();
+		if (mpuss_can_lose_context)
+			cpu_cluster_pm_enter();
 	}
 
 	omap4_enter_lowpower(dev->cpu, cx->cpu_state);
@@ -128,9 +131,23 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
 
 	/* Wakeup CPU1 only if it is not offlined */
 	if (dev->cpu == 0 && cpumask_test_cpu(1, cpu_online_mask)) {
+
+		if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD) &&
+		    mpuss_can_lose_context)
+			gic_dist_disable();
+
 		clkdm_wakeup(cpu_clkdm[1]);
 		omap_set_pwrdm_state(cpu_pd[1], PWRDM_POWER_ON);
 		clkdm_allow_idle(cpu_clkdm[1]);
+
+		if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD) &&
+		    mpuss_can_lose_context) {
+			while (gic_dist_disabled()) {
+				udelay(1);
+				cpu_relax();
+			}
+			gic_timer_retrigger();
+		}
 	}
 
 	/*
@@ -143,8 +160,7 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
 	 * Call idle CPU cluster PM exit notifier chain
 	 * to restore GIC and wakeupgen context.
 	 */
-	if (dev->cpu == 0 && (cx->mpu_state == PWRDM_POWER_RET) &&
-		(cx->mpu_logic_state == PWRDM_POWER_OFF))
+	if (dev->cpu == 0 && mpuss_can_lose_context)
 		cpu_cluster_pm_exit();
 
 fail:
arch/arm/mach-omap2/omap-mpuss-lowpower.c +3 -0
index f991016..667915d 100644
@@ -271,6 +271,9 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
 	else
 		omap_pm_ops.finish_suspend(save_state);
 
+	if (IS_PM44XX_ERRATUM(PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD) && cpu)
+		gic_dist_enable();
+
 	/*
 	 * Restore the CPUx power state to ON otherwise CPUx
 	 * power domain can transitions to programmed low power
arch/arm/mach-omap2/omap4-common.c +6 -0
index 5791143..3ad4a8c 100644
@@ -128,6 +128,12 @@ void gic_dist_disable(void)
 		__raw_writel(0x0, gic_dist_base_addr + GIC_DIST_CTRL);
 }
 
+void gic_dist_enable(void)
+{
+	if (gic_dist_base_addr)
+		__raw_writel(0x1, gic_dist_base_addr + GIC_DIST_CTRL);
+}
+
 bool gic_dist_disabled(void)
 {
 	return !(__raw_readl(gic_dist_base_addr + GIC_DIST_CTRL) & 0x1);
Signature · 1 line
1.7.9.5
maintainer
#2 lore raw
Quoted 10 lines · Grygorii Strashko

The same workaround as ff999b8a0983ee15668394ed49e38d3568fc6859 "ARM: OMAP4460: Workaround for ROM bug because of CA9 r2pX GIC ..." need to be applied not only when system is booting, but when MPUSS hits OSWR state through CPUIdle too. Without this WA the same issue is reproduced now on boards PandaES and Tablet/Blaze with SOM OMAP4460 when CONFIG_CPU_IDLE is enabled.
After MPUSS has enterred OSWR and waken up:
- GIC distributor became disabled forever
- scheduling is not performed any more

Quoted 4 lines

Applying into omap-for-v3.13/fixes thanks.

Tony

maintainer
#3 lore raw
Quoted 11 lines · Tony Lindgren
Quoted 10 lines · Grygorii Strashko

The same workaround as ff999b8a0983ee15668394ed49e38d3568fc6859 "ARM: OMAP4460: Workaround for ROM bug because of CA9 r2pX GIC ..." need to be applied not only when system is booting, but when MPUSS hits OSWR state through CPUIdle too. Without this WA the same issue is reproduced now on boards PandaES and Tablet/Blaze with SOM OMAP4460 when CONFIG_CPU_IDLE is enabled.
After MPUSS has enterred OSWR and waken up:
- GIC distributor became disabled forever
- scheduling is not performed any more

Quoted 6 lines
Quoted 4 lines

Applying into omap-for-v3.13/fixes thanks.

Hmm looks like this breaks the build with randconfigs at least with the attached .config, so dropping for now.

arch/arm/mach-omap2/built-in.o: In function `omap_enter_idle_coupled':
:(.text+0xb48c): undefined reference to `pm44xx_errata'

Can you please check and repost?

Thanks,

Tony

#4 lore raw
Quoted 17 lines · Tony Lindgren
Quoted 16 lines · Tony Lindgren
Quoted 14 lines · Grygorii Strashko

The same workaround as ff999b8a0983ee15668394ed49e38d3568fc6859 "ARM: OMAP4460: Workaround for ROM bug because of CA9 r2pX GIC ..." need to be applied not only when system is booting, but when MPUSS hits OSWR state through CPUIdle too. Without this WA the same issue is reproduced now on boards PandaES and Tablet/Blaze with SOM OMAP4460 when CONFIG_CPU_IDLE is enabled.
After MPUSS has enterred OSWR and waken up:
- GIC distributor became disabled forever
- scheduling is not performed any more

Quoted 4 lines
Quoted 1 line

Applying into omap-for-v3.13/fixes thanks.

Hmm looks like this breaks the build with randconfigs at least with the attached .config, so dropping for now.

Hi Tony
Have you forgot to attach .config?

Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `omap_enter_idle_coupled':
:(.text+0xb48c): undefined reference to `pm44xx_errata'

I assume that .config doesn't have CONFIG_SMP enabled while pm44xx_errata is defined in omap-smp.c.
I think it should be a separate patch to move pm44xx_errata somewhere else, so this patch will remain the same.

Btw, do we need omap_enter_idle_coupled() in UP?

Signature · 1 line
Taras Kondratiuk
maintainer
#5 lore raw
Quoted 18 lines · Taras Kondratiuk
Quoted 17 lines · Tony Lindgren
Quoted 16 lines · Tony Lindgren
Quoted 14 lines · Grygorii Strashko

The same workaround as ff999b8a0983ee15668394ed49e38d3568fc6859 "ARM: OMAP4460: Workaround for ROM bug because of CA9 r2pX GIC ..." need to be applied not only when system is booting, but when MPUSS hits OSWR state through CPUIdle too. Without this WA the same issue is reproduced now on boards PandaES and Tablet/Blaze with SOM OMAP4460 when CONFIG_CPU_IDLE is enabled.
After MPUSS has enterred OSWR and waken up:
- GIC distributor became disabled forever
- scheduling is not performed any more

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Applying into omap-for-v3.13/fixes thanks.

Hmm looks like this breaks the build with randconfigs at least with the attached .config, so dropping for now.

Hi Tony
Have you forgot to attach .config?

Oops, sorry looks like I removed it already as I rebuilt the tree and started a new set of randconfig build tests.

Quoted 7 lines
Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `omap_enter_idle_coupled':
:(.text+0xb48c): undefined reference to `pm44xx_errata'

I assume that .config doesn't have CONFIG_SMP enabled while pm44xx_errata is defined in omap-smp.c.
I think it should be a separate patch to move pm44xx_errata somewhere else, so this patch will remain the same.

Yes something like that probably. Sounds like that should be then patches before this fix.

Quoted 1 line

Btw, do we need omap_enter_idle_coupled() in UP?

That should be checked, am43xx may need it.

Regards,

Tony

#6 lore raw
Quoted 38 lines · Tony Lindgren
Quoted 18 lines · Taras Kondratiuk
Quoted 17 lines · Tony Lindgren
Quoted 16 lines · Tony Lindgren
Quoted 14 lines · Grygorii Strashko

The same workaround as ff999b8a0983ee15668394ed49e38d3568fc6859 "ARM: OMAP4460: Workaround for ROM bug because of CA9 r2pX GIC ..." need to be applied not only when system is booting, but when MPUSS hits OSWR state through CPUIdle too. Without this WA the same issue is reproduced now on boards PandaES and Tablet/Blaze with SOM OMAP4460 when CONFIG_CPU_IDLE is enabled.
After MPUSS has enterred OSWR and waken up:
- GIC distributor became disabled forever
- scheduling is not performed any more

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Applying into omap-for-v3.13/fixes thanks.

Hmm looks like this breaks the build with randconfigs at least with the attached .config, so dropping for now.

Hi Tony
Have you forgot to attach .config?

Oops, sorry looks like I removed it already as I rebuilt the tree and started a new set of randconfig build tests.

Quoted 7 lines
Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `omap_enter_idle_coupled':
:(.text+0xb48c): undefined reference to `pm44xx_errata'

I assume that .config doesn't have CONFIG_SMP enabled while pm44xx_errata is defined in omap-smp.c.
I think it should be a separate patch to move pm44xx_errata somewhere else, so this patch will remain the same.

Quoted 7 lines

Yes something like that probably. Sounds like that should be then patches before this fix.

Quoted 1 line

Btw, do we need omap_enter_idle_coupled() in UP?

That should be checked, am43xx may need it.

Nope. omap_enter_idle_coupled() is needed only for SMP systems. UP don't need couple idle functionality as such.

Regards,
Santosh

#7 lore raw
Quoted 42 lines · Santosh Shilimkar
Quoted 41 lines · Tony Lindgren
Quoted 18 lines · Taras Kondratiuk
Quoted 17 lines · Tony Lindgren
Quoted 16 lines · Tony Lindgren
Quoted 14 lines · Grygorii Strashko

The same workaround as ff999b8a0983ee15668394ed49e38d3568fc6859 "ARM: OMAP4460: Workaround for ROM bug because of CA9 r2pX GIC ..." need to be applied not only when system is booting, but when MPUSS hits OSWR state through CPUIdle too. Without this WA the same issue is reproduced now on boards PandaES and Tablet/Blaze with SOM OMAP4460 when CONFIG_CPU_IDLE is enabled.
After MPUSS has enterred OSWR and waken up:
- GIC distributor became disabled forever
- scheduling is not performed any more

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Applying into omap-for-v3.13/fixes thanks.

Hmm looks like this breaks the build with randconfigs at least with the attached .config, so dropping for now.

Hi Tony
Have you forgot to attach .config?

Oops, sorry looks like I removed it already as I rebuilt the tree and started a new set of randconfig build tests.

Quoted 7 lines
Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `omap_enter_idle_coupled':
:(.text+0xb48c): undefined reference to `pm44xx_errata'

I assume that .config doesn't have CONFIG_SMP enabled while pm44xx_errata is defined in omap-smp.c.
I think it should be a separate patch to move pm44xx_errata somewhere else, so this patch will remain the same.

Yes something like that probably. Sounds like that should be then patches before this fix.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Btw, do we need omap_enter_idle_coupled() in UP?

That should be checked, am43xx may need it.

Nope. omap_enter_idle_coupled() is needed only for SMP systems. UP don't need couple idle functionality as such.

So what's the status of this fix and dependencies?

Both linux-next[1] and arm-soc/for-next[2] are failing boot tests on omap4460/panda-es because multi_v7_defconfig now has CPUidle enabled by default.

Kevin

[1] http://lists.linaro.org/pipermail/kernel-build-reports/2014-January/001891.html
[2] http://lists.linaro.org/pipermail/kernel-build-reports/2014-January/001898.html

#8 lore raw
Quoted 52 lines · Kevin Hilman
Quoted 42 lines · Santosh Shilimkar
Quoted 41 lines · Tony Lindgren
Quoted 18 lines · Taras Kondratiuk
Quoted 17 lines · Tony Lindgren
Quoted 16 lines · Tony Lindgren
Quoted 14 lines · Grygorii Strashko

The same workaround as ff999b8a0983ee15668394ed49e38d3568fc6859 "ARM: OMAP4460: Workaround for ROM bug because of CA9 r2pX GIC ..." need to be applied not only when system is booting, but when MPUSS hits OSWR state through CPUIdle too. Without this WA the same issue is reproduced now on boards PandaES and Tablet/Blaze with SOM OMAP4460 when CONFIG_CPU_IDLE is enabled.
After MPUSS has enterred OSWR and waken up:
- GIC distributor became disabled forever
- scheduling is not performed any more

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Applying into omap-for-v3.13/fixes thanks.

Hmm looks like this breaks the build with randconfigs at least with the attached .config, so dropping for now.

Hi Tony
Have you forgot to attach .config?

Oops, sorry looks like I removed it already as I rebuilt the tree and started a new set of randconfig build tests.

Quoted 7 lines
Quoted 2 lines

arch/arm/mach-omap2/built-in.o: In function `omap_enter_idle_coupled':
:(.text+0xb48c): undefined reference to `pm44xx_errata'

I assume that .config doesn't have CONFIG_SMP enabled while pm44xx_errata is defined in omap-smp.c.
I think it should be a separate patch to move pm44xx_errata somewhere else, so this patch will remain the same.

Yes something like that probably. Sounds like that should be then patches before this fix.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Btw, do we need omap_enter_idle_coupled() in UP?

That should be checked, am43xx may need it.

Nope. omap_enter_idle_coupled() is needed only for SMP systems. UP don't need couple idle functionality as such.

Quoted 6 lines

So what's the status of this fix and dependencies?

Both linux-next[1] and arm-soc/for-next[2] are failing boot tests on omap4460/panda-es because multi_v7_defconfig now has CPUidle enabled by default.

I think Taras needs to refresh the patch based on discussion and then it can be merged.

Quoted 4 lines

[1] http://lists.linaro.org/pipermail/kernel-build-reports/2014-January/001891.html
[2] http://lists.linaro.org/pipermail/kernel-build-reports/2014-January/001898.html

#9 lore raw

PATCH 1/1 ARM: OMAP4+: move errata initialization to omap4_pm_init_early

In reply to Kevin Hilman

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 here: https://patchwork.kernel.org/patch/3084521/
Reproduced with .config: http://slexy.org/view/s2EEdvTGXV on next-20140120 tag (based on omap2plus_defconfig) Applies on v3.13 tag and on next-20140120
Tested to boot on next-20140120 along with https://patchwork.kernel.org/patch/3084521/
on PandaBoard-ES with multi_v7_defconfig: http://slexy.org/view/s27n0BWrPf

 arch/arm/mach-omap2/common.h   |    6 ++++++
 arch/arm/mach-omap2/io.c       |    1 +
 arch/arm/mach-omap2/omap-smp.c |    6 +-----
 arch/arm/mach-omap2/pm44xx.c   |   15 +++++++++++++++
 4 files changed, 23 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/common.h +6 -0
index 3adaa1d..a6aae30 100644
@@ -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
arch/arm/mach-omap2/io.c +1 -0
index 47381fd..d408b15 100644
@@ -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();
arch/arm/mach-omap2/omap-smp.c +1 -5
index 75e95d4..17550aa 100644
@@ -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
arch/arm/mach-omap2/pm44xx.c +15 -0
index 82f06989..eefb30c 100644
@@ -24,6 +24,8 @@
 #include "powerdomain.h"
 #include "pm.h"
 
+u16 pm44xx_errata;
+
 struct power_state {
 	struct powerdomain *pwrdm;
 	u32 next_state;
@@ -199,6 +201,19 @@ static inline int omap4_init_static_deps(void)
 }
 
 /**
+ * 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
  *
  * Initializes all powerdomain and clockdomain target states
Signature · 1 line
1.7.9.5
#10 lore raw

PATCH 1/1 ARM: OMAP4+: move errata initialization to omap4_pm_init_early

Quoted 4 lines · Nishanth Menon

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.

This patch fixes build failure caused by patch
https://patchwork.kernel.org/patch/3084521/
in case if SMP is not enabled.

Quoted 108 lines

---
Reported by Tony here: https://patchwork.kernel.org/patch/3084521/
Reproduced with .config: http://slexy.org/view/s2EEdvTGXV on next-20140120 tag (based on omap2plus_defconfig) Applies on v3.13 tag and on next-20140120
Tested to boot on next-20140120 along with https://patchwork.kernel.org/patch/3084521/
on PandaBoard-ES with multi_v7_defconfig: http://slexy.org/view/s27n0BWrPf

  arch/arm/mach-omap2/common.h   |    6 ++++++
  arch/arm/mach-omap2/io.c       |    1 +
  arch/arm/mach-omap2/omap-smp.c |    6 +-----
  arch/arm/mach-omap2/pm44xx.c   |   15 +++++++++++++++
  4 files changed, 23 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/common.h +6 -0
index 3adaa1d..a6aae30 100644
@@ -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
arch/arm/mach-omap2/io.c +1 -0
index 47381fd..d408b15 100644
@@ -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();
arch/arm/mach-omap2/omap-smp.c +1 -5
index 75e95d4..17550aa 100644
@@ -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
arch/arm/mach-omap2/pm44xx.c +15 -0
index 82f06989..eefb30c 100644
@@ -24,6 +24,8 @@
  #include "powerdomain.h"
  #include "pm.h"
 
+u16 pm44xx_errata;
+
  struct power_state {
  	struct powerdomain *pwrdm;
  	u32 next_state;
@@ -199,6 +201,19 @@ static inline int omap4_init_static_deps(void)
  }
 
  /**
+ * 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
   *
   * Initializes all powerdomain and clockdomain target states
#11 lore raw

PATCH 1/1 ARM: OMAP4+: move errata initialization to omap4_pm_init_early

Quoted 10 lines · Grygorii Strashko
Quoted 4 lines · Nishanth Menon

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.

This patch fixes build failure caused by patch
https://patchwork.kernel.org/patch/3084521/
in case if SMP is not enabled.

So does that mean that that patch can now be applied as is?

We could sure use that fix (or equivalent) for CPUidle breakage on 4460.

Kevin

maintainer
#12 lore raw

PATCH 1/1 ARM: OMAP4+: move errata initialization to omap4_pm_init_early

Quoted 9 lines · Kevin Hilman
Quoted 7 lines · Grygorii Strashko
Quoted 4 lines · Nishanth Menon

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.

Quoted 7 lines
Quoted 3 lines

This patch fixes build failure caused by patch
https://patchwork.kernel.org/patch/3084521/
in case if SMP is not enabled.

So does that mean that that patch can now be applied as is?

We could sure use that fix (or equivalent) for CPUidle breakage on 4460.

Yeah, seems OK to me, feel free to apply it directly:

#13 lore raw

PATCH 1/1 ARM: OMAP4+: move errata initialization to omap4_pm_init_early

Quoted 14 lines · Tony Lindgren
Quoted 13 lines · Kevin Hilman
Quoted 10 lines · Grygorii Strashko
Quoted 4 lines · Nishanth Menon

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.

This patch fixes build failure caused by patch
https://patchwork.kernel.org/patch/3084521/
in case if SMP is not enabled.

Quoted 7 lines
Quoted 3 lines

So does that mean that that patch can now be applied as is?

We could sure use that fix (or equivalent) for CPUidle breakage on 4460.

Yeah, seems OK to me, feel free to apply it directly:

OK, I've picked up both $SUBJECT patch and the one from the above patchworks link and will queue them up for v3.14-rc (and have added your Ack to both.)

Thanks,

Kevin