Skip to contentSkip to conversation

omap3: Fix incorrect restore pointer

RFC In review Sanjeev Premi 2 participants 2 messages Mar 19, 2010 – Mar 22, 2010

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

RFC 1/1 omap3: Fix incorrect restore pointer

Due to check for absolute omap_rev() values against ES3.0 and ES3.1, the restore pointer for OMAP3630 is incorrectly assigned.

The problem may be observed with OMAP3430 ES3.1.1 as well.

Submitting this as RFC because I have only compiled with changes. Haven't yet tried on EVM. Will submit formal patch after testing.

---
 arch/arm/mach-omap2/control.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/control.c +5 -2
index 43f8a33..575593b 100644
@@ -213,13 +213,16 @@ void omap3_save_scratchpad_contents(void)
 
 	/* Populate the Scratchpad contents */
 	scratchpad_contents.boot_config_ptr = 0x0;
-	if (omap_rev() != OMAP3430_REV_ES3_0 &&
-					omap_rev() != OMAP3430_REV_ES3_1)
+
+	if (!cpu_is_omap3630() &&
+		(cpu_is_34xx() &&
+			(omap_rev() < OMAP3430_REV_ES3_0)))
 		scratchpad_contents.public_restore_ptr =
 			virt_to_phys(get_restore_pointer());
 	else
 		scratchpad_contents.public_restore_ptr =
 			virt_to_phys(get_es3_restore_pointer());
+
 	if (omap_type() == OMAP2_DEVICE_TYPE_GP)
 		scratchpad_contents.secure_ram_restore_ptr = 0x0;
 	else
Signature · 1 line
1.6.6.1
#1 lore raw
Quoted 32 lines
Quoted 32 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Premi, Sanjeev
Sent: Friday, March 19, 2010 3:53 PM
To: [email protected]
Cc: Premi, Sanjeev
Subject: [RFC] omap3: Fix incorrect restore pointer

Due to check for absolute omap_rev() values against ES3.0 and ES3.1, the restore pointer for OMAP3630 is incorrectly assigned.

The problem may be observed with OMAP3430 ES3.1.1
as well.

Submitting this as RFC because I have only compiled with changes. Haven't yet tried on EVM. Will submit formal patch after testing.

---
arch/arm/mach-omap2/control.c | 7 +++++--

1 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/control.c +0 -0
index 43f8a33..575593b 100644
@@ -213,13 +213,16 @@ void omap3_save_scratchpad_contents(void)
 
Quoted 10 lines

arch/arm/mach-omap2/control.c void omap3_save_scratchpad_contents(void) · line 221

Quoted 10 lines
arch/arm/mach-omap2/control.c +4 -2
 	/* Populate the Scratchpad contents */
 	scratchpad_contents.boot_config_ptr = 0x0;
-	if (omap_rev() != OMAP3430_REV_ES3_0 &&
-					omap_rev() != OMAP3430_REV_ES3_1)
+
+	if (!cpu_is_omap3630() &&
+		(cpu_is_34xx() &&
+			(omap_rev() < OMAP3430_REV_ES3_0)))
 		scratchpad_contents.public_restore_ptr =
 			virt_to_phys(get_restore_pointer());

Hi Sanjeev,

Different restore pointer is required for ES3.0 and ES3.1 due to a silicon errata. I do not think the same silicon errata is applicable to 3630. At least I see it removed from the 3630 errata list. So the checks were fine. If ES3.1.1 is impacted you might need to add a ES3.1.1 check. But 3630 need not have this workaround.

Regards
Thara

Quoted 14 lines
Quoted 14 lines
arch/arm/mach-omap2/control.c +1 -1
 	else
 		scratchpad_contents.public_restore_ptr =
 			virt_to_phys(get_es3_restore_pointer());
+
 	if (omap_type() == OMAP2_DEVICE_TYPE_GP)
 		scratchpad_contents.secure_ram_restore_ptr = 0x0;
 	else
--

1.6.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html