Skip to contentSkip to conversation

ARM: OMAP4: PM: Warn users about usage of older bootloaders

PATCH New Rajendra Nayak 3 participants 3 messages Feb 4, 2013 – Feb 8, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP4: PM: Warn users about usage of older bootloaders

OMAP4 CHIP level PM works only with newer bootloaders. The dependency on the bootloader comes from the fact that the kernel is missing reset and initialization code for some devices.

While the right thing to do is to add reset and init code in the kernel, for some co-processor IP blocks like DSP and IVA it means downloading firmware into each one of them to execute idle instructions.

While a feasible solution is worked upon on how such IP blocks can be better handled in the kernel, in the interim, to avoid any further frustration to users testing PM on OMAP4 and finding it broken, warn them about the bootloader being a possible cause.

Cc Tero Kristo <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc R Sricharan <[email protected]>
---
 arch/arm/mach-omap2/pm44xx.c |   18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/pm44xx.c +17 -1
index aa6fd98..45ca053 100644
@@ -77,8 +77,18 @@ static int omap4_pm_suspend(void)
 		omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state);
 		pwrdm_set_logic_retst(pwrst->pwrdm, pwrst->saved_logic_state);
 	}
-	if (ret)
+	if (ret) {
 		pr_crit("Could not enter target state in pm_suspend\n");
+		/*
+		 * OMAP4 chip PM currently works only with certain (newer)
+		 * versions of bootloaders. This is due to missing code in the
+		 * kernel to properly reset and initialize some devices.
+		 * Warn the user about the bootloader version being one of the
+		 * possible causes.
+		 */
+		pr_warn("One of the possible cause could be an old bootloder\n"
+			"Use version v2012.07 (or later)\n");
+	}
 	else
 		pr_info("Successfully put all powerdomains to target state\n");
 
@@ -146,6 +156,12 @@ int __init omap4_pm_init(void)
 	}
 
 	pr_err("Power Management for TI OMAP4.\n");
+	/*
+	 * OMAP4 chip PM currently works only with certain (newer)
+	 * versions of bootloaders. This is due to missing code in the
+	 * kernel to properly reset and initialize some devices.
+	 */
+	pr_warn("Use Bootloader version v2012.07 (or later) for full PM support\n");
 
 	ret = pwrdm_for_each(pwrdms_setup, NULL);
 	if (ret) {
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ARM: OMAP4: PM: Warn users about usage of older bootloaders

Quoted 16 lines · Rajendra Nayak

OMAP4 CHIP level PM works only with newer bootloaders. The dependency on the bootloader comes from the fact that the kernel is missing reset and initialization code for some devices.

While the right thing to do is to add reset and init code in the kernel, for some co-processor IP blocks like DSP and IVA it means downloading firmware into each one of them to execute idle instructions.

While a feasible solution is worked upon on how such IP blocks can be better handled in the kernel, in the interim, to avoid any further frustration to users testing PM on OMAP4 and finding it broken, warn them about the bootloader being a possible cause.

Quoted 4 lines
Cc Tero Kristo <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc R Sricharan <[email protected]>

Thanks Rajendra, I appreciate the patch. I've tweaked it slightly and the following is what's queued here; hopefully it can go in for v3.9.

- Paul

From: Rajendra Nayak <[email protected]>
Date: Mon, 4 Feb 2013 17:54:43 +0530
Subject: [PATCH] ARM: OMAP4: PM: Warn users about usage of older bootloaders

OMAP4 CHIP level PM works only with newer bootloaders. The dependency on the bootloader comes from the fact that the kernel is missing reset and initialization code for some devices.

While the right thing to do is to add reset and init code in the kernel, for some co-processor IP blocks like DSP and IVA it means downloading firmware into each one of them to execute idle instructions.

While a feasible solution is worked upon on how such IP blocks can be better handled in the kernel, in the interim, to avoid any further frustration to users testing PM on OMAP4 and finding it broken, warn them about the bootloader being a possible cause.

Cc Tero Kristo <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc R Sricharan <[email protected]>
[paul at pwsan.com: tweaked warning messages and comments slightly]
---
 arch/arm/mach-omap2/pm44xx.c |   19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/pm44xx.c +18 -1
index aa6fd98..502ed9b 100644
@@ -77,8 +77,18 @@ static int omap4_pm_suspend(void)
 		omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state);
 		pwrdm_set_logic_retst(pwrst->pwrdm, pwrst->saved_logic_state);
 	}
-	if (ret)
+	if (ret) {
 		pr_crit("Could not enter target state in pm_suspend\n");
+		/*
+		 * OMAP4 chip PM currently works only with certain (newer)
+		 * versions of bootloaders. This is due to missing code in the
+		 * kernel to properly reset and initialize some devices.
+		 * Warn the user about the bootloader version being one of the
+		 * possible causes.
+		 * http://www.spinics.net/lists/arm-kernel/msg218641.html
+		 */
+		pr_warn("A possible cause could be an old bootloader - try u-boot >= v2012.07\n");
+	}
 	else
 		pr_info("Successfully put all powerdomains to target state\n");
 
@@ -146,6 +156,13 @@ int __init omap4_pm_init(void)
 	}
 
 	pr_err("Power Management for TI OMAP4.\n");
+	/*
+	 * OMAP4 chip PM currently works only with certain (newer)
+	 * versions of bootloaders. This is due to missing code in the
+	 * kernel to properly reset and initialize some devices.
+	 * http://www.spinics.net/lists/arm-kernel/msg218641.html
+	 */
+	pr_warn("u-boot >= v2012.07 is required for full PM support\n");
 
 	ret = pwrdm_for_each(pwrdms_setup, NULL);
 	if (ret) {
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 1/1 ARM: OMAP4: PM: Warn users about usage of older bootloaders

Quoted 49 lines · Paul Walmsley
Quoted 16 lines · Rajendra Nayak

OMAP4 CHIP level PM works only with newer bootloaders. The dependency on the bootloader comes from the fact that the kernel is missing reset and initialization code for some devices.

While the right thing to do is to add reset and init code in the kernel, for some co-processor IP blocks like DSP and IVA it means downloading firmware into each one of them to execute idle instructions.

While a feasible solution is worked upon on how such IP blocks can be better handled in the kernel, in the interim, to avoid any further frustration to users testing PM on OMAP4 and finding it broken, warn them about the bootloader being a possible cause.

Quoted 4 lines
Cc Tero Kristo <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc R Sricharan <[email protected]>

Thanks Rajendra, I appreciate the patch. I've tweaked it slightly and the following is what's queued here; hopefully it can go in for v3.9.

- Paul

From: Rajendra Nayak <[email protected]>
Date: Mon, 4 Feb 2013 17:54:43 +0530
Subject: [PATCH] ARM: OMAP4: PM: Warn users about usage of older bootloaders

OMAP4 CHIP level PM works only with newer bootloaders. The dependency on the bootloader comes from the fact that the kernel is missing reset and initialization code for some devices.

While the right thing to do is to add reset and init code in the kernel, for some co-processor IP blocks like DSP and IVA it means downloading firmware into each one of them to execute idle instructions.

While a feasible solution is worked upon on how such IP blocks can be better handled in the kernel, in the interim, to avoid any further frustration to users testing PM on OMAP4 and finding it broken, warn them about the bootloader being a possible cause.

Quoted 6 lines
Cc Tero Kristo <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc R Sricharan <[email protected]>
[paul at pwsan.com: tweaked warning messages and comments slightly]

FWIW

Quoted 42 lines
---
 arch/arm/mach-omap2/pm44xx.c |   19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/pm44xx.c +18 -1
index aa6fd98..502ed9b 100644
@@ -77,8 +77,18 @@ static int omap4_pm_suspend(void)
 		omap_set_pwrdm_state(pwrst->pwrdm, pwrst->saved_state);
 		pwrdm_set_logic_retst(pwrst->pwrdm, pwrst->saved_logic_state);
 	}
-	if (ret)
+	if (ret) {
 		pr_crit("Could not enter target state in pm_suspend\n");
+		/*
+		 * OMAP4 chip PM currently works only with certain (newer)
+		 * versions of bootloaders. This is due to missing code in the
+		 * kernel to properly reset and initialize some devices.
+		 * Warn the user about the bootloader version being one of the
+		 * possible causes.
+		 * http://www.spinics.net/lists/arm-kernel/msg218641.html
+		 */
+		pr_warn("A possible cause could be an old bootloader - try u-boot >= v2012.07\n");
+	}
 	else
 		pr_info("Successfully put all powerdomains to target state\n");
 
@@ -146,6 +156,13 @@ int __init omap4_pm_init(void)
 	}
 
 	pr_err("Power Management for TI OMAP4.\n");
+	/*
+	 * OMAP4 chip PM currently works only with certain (newer)
+	 * versions of bootloaders. This is due to missing code in the
+	 * kernel to properly reset and initialize some devices.
+	 * http://www.spinics.net/lists/arm-kernel/msg218641.html
+	 */
+	pr_warn("u-boot >= v2012.07 is required for full PM support\n");
 
 	ret = pwrdm_for_each(pwrdms_setup, NULL);
 	if (ret) {