Skip to contentSkip to conversation

OMAP3: introduce OMAP3630

PATCH Superseded Nishanth Menon 3 participants 4 messages Oct 8, 2009 – Oct 9, 2009

Subsystems (3)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 OMAP3: introduce OMAP3630

--- SNIP ME --
Hi,
A bit of history for this patchset
V3 - Fixes from Sergio's comments + boot tested on SDP3430+3630. V2 - fixes of generic comments from Felipe Balbi+minor cleanups V1 - inital implementation of (a) approach
V0 - original approach introducing a new silicon family --- END OF SNIP ME --
Device intro:
OMAP3630 is the latest in the family of OMAP3 devices and among the changes it introduces are:

New OPP levels for new voltage and frequency levels. a bunch of Bug fixes to various modules feature additions, notably with ISP, sDMA etc.

Details about the chip is available here:
http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=12836&contentId=52606

Strategy used:
Strategy to introduce this device into Linux was discussed here:
Ref: http://marc.info/?t=125343303400003&r=1&w=2

Two approaches were available:
a) Consider 3630 generation of devices as a new family of silicon
b) Consider 3630 as an offshoot of 3430 family of devices

As a common consensus, (b) seems to be more valid for 3630 as:
* There are changes which are easily handled by using "FEATURES" infrastructure.
For details how to do this, see thread:
http://marc.info/?t=125050998500001&r=1&w=2
* Most of existing 34xx infrastructure can be reused(almost 90%+)
- so no ugly if (cpu_is_omap34xx() || cpu_is_omap36xx()) all over the place
- lesser chance of bugs due to reuse of proven code flow
- 36xx specific handling can still be done where required within the existing infrastructure

NOTE:
* If additional 34xx series are added, OMAP3430_REV_ESXXXX can be added on top of the existing 3630 ones are renumbered

This patch was tested on SDP3430, boot tested on 3630 platform using 3430sdp defconfig

Cc Allen Pais <[email protected]>
Cc Anand Gadiyar <[email protected]>
Cc Benoit Cousson <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Sanjeev Premi <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Sergio Alberto Aguirre Rodriguez <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 arch/arm/mach-omap2/id.c              |   32 +++++++++++++++++++++++++++++---
 arch/arm/plat-omap/include/mach/cpu.h |    6 ++++++
 2 files changed, 35 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/id.c +29 -3
index 03b80f2..2870d3b 100644
@@ -186,6 +186,7 @@ void __init omap3_check_revision(void)
 {
 	u32 cpuid, idcode;
 	u16 hawkeye;
+	u16 omap_type = 0;
 	u8 rev;
 	char *rev_name = "ES1.0";
 
@@ -210,7 +211,9 @@ void __init omap3_check_revision(void)
 	hawkeye = (idcode >> 12) & 0xffff;
 	rev = (idcode >> 28) & 0xff;
 
-	if (hawkeye == 0xb7ae) {
+	switch (hawkeye) {
+	case 0xb7ae:
+		/* Handle 34xx devices */
 		switch (rev) {
 		case 0:
 			omap_revision = OMAP3430_REV_ES2_0;
@@ -231,12 +234,35 @@ void __init omap3_check_revision(void)
 		default:
 			/* Use the latest known revision as default */
 			omap_revision = OMAP3430_REV_ES3_1;
-			rev_name = "Unknown revision\n";
+			rev_name = "Unknown 34xx revision\n";
 		}
+		break;
+	case 0xb891:
+		/* Handle 36xx devices
+		 * But, override for display purposes
+		 */
+		omap_type = 0x3630;
+		switch (rev) {
+		case 0:
+			omap_revision = OMAP3630_REV_ES1_0;
+			rev_name = "ES1.0";
+			break;
+		default:
+			/* Use the latest known revision as default */
+			omap_revision = OMAP3630_REV_ES1_0;
+			rev_name = "Unknown 36xx revision\n";
+		}
+		break;
+	default:
+		/* Unknown default to latest rev as default*/
+		omap_revision = OMAP3630_REV_ES1_0;
+		rev_name = "Unknown revision\n";
 	}
 
 out:
-	pr_info("OMAP%04x %s\n", omap_rev() >> 16, rev_name);
+	if (!omap_type)
+		omap_type = omap_rev() >> 16;
+	pr_info("OMAP%04x %s\n", omap_type, rev_name);
 }
 
 #define OMAP3_SHOW_FEATURE(feat)		\
arch/arm/plat-omap/include/mach/cpu.h +6 -0
index 431fec4..af1080f 100644
@@ -383,6 +383,12 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define OMAP3430_REV_ES2_1	0x34302034
 #define OMAP3430_REV_ES3_0	0x34303034
 #define OMAP3430_REV_ES3_1	0x34304034
+/* NOTE: Add 36xx series below
+ * If additional 34xx series are added, OMAP3430_REV_ESXXXX can be
+ * added above the 3630 defines and series renumbered to ensure
+ * rev() > checks to work
+ */
+#define OMAP3630_REV_ES1_0	0x34305034
 
 #define OMAP443X_CLASS		0x44300034
 
Signature · 1 line
1.6.0.4
#1 lore raw

Nishanth,

From: Menon, Nishanth
Sent: Thursday, October 08, 2009 6:47 PM

<snip>

Quoted 6 lines
arch/arm/plat-omap/include/mach/cpu.h +0 -0
index 431fec4..af1080f 100644

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 391

Quoted 9 lines
arch/arm/plat-omap/include/mach/cpu.h +6 -0
@@ -383,6 +383,12 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define OMAP3430_REV_ES2_1	0x34302034
 #define OMAP3430_REV_ES3_0	0x34303034
 #define OMAP3430_REV_ES3_1	0x34304034
+/* NOTE: Add 36xx series below
+ * If additional 34xx series are added, OMAP3430_REV_ESXXXX can be
+ * added above the 3630 defines and series renumbered to ensure
+ * rev() > checks to work
+ */
+#define OMAP3630_REV_ES1_0	0x34305034

Just for the sake of curiosity...

Why not defining 3630 like this?

#define OMAP3630_REV_ES1_0 0x36301034

Sorry if i'm asking something dumb.

Regards,
Sergio

Quoted 7 lines
arch/arm/plat-omap/include/mach/cpu.h +0 -0
 #define OMAP443X_CLASS		0x44300034
 
Signature · 1 line
1.6.0.4
maintainer
#2 lore raw
Quoted 25 lines · Aguirre Rodriguez, Sergio Alberto

Nishanth,

From: Menon, Nishanth
Sent: Thursday, October 08, 2009 6:47 PM

<snip>

Quoted 6 lines
arch/arm/plat-omap/include/mach/cpu.h +0 -0
index 431fec4..af1080f 100644

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 391

Quoted 9 lines
arch/arm/plat-omap/include/mach/cpu.h +6 -0
@@ -383,6 +383,12 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define OMAP3430_REV_ES2_1	0x34302034
 #define OMAP3430_REV_ES3_0	0x34303034
 #define OMAP3430_REV_ES3_1	0x34304034
+/* NOTE: Add 36xx series below
+ * If additional 34xx series are added, OMAP3430_REV_ESXXXX can be
+ * added above the 3630 defines and series renumbered to ensure
+ * rev() > checks to work
+ */
+#define OMAP3630_REV_ES1_0	0x34305034

Just for the sake of curiosity...

Quoted 5 lines

Why not defining 3630 like this?

#define OMAP3630_REV_ES1_0 0x36301034

Sorry if i'm asking something dumb.

Because it's still considered 34xx class chip with some extra features. It compiles with the same settings, and uses the same kernel code. So from kernel point of view we can treat it as 34xx.

Regards,

Tony

maintainer
#3 lore raw
Quoted 28 lines · Tony Lindgren
Quoted 27 lines · Aguirre Rodriguez, Sergio Alberto

Nishanth,

From: Menon, Nishanth
Sent: Thursday, October 08, 2009 6:47 PM

<snip>

Quoted 6 lines
arch/arm/plat-omap/include/mach/cpu.h +0 -0
index 431fec4..af1080f 100644

arch/arm/plat-omap/include/mach/cpu.h IS_OMAP_TYPE(3430, 0x3430) · line 391

Quoted 9 lines
arch/arm/plat-omap/include/mach/cpu.h +6 -0
@@ -383,6 +383,12 @@ IS_OMAP_TYPE(3430, 0x3430)
 #define OMAP3430_REV_ES2_1	0x34302034
 #define OMAP3430_REV_ES3_0	0x34303034
 #define OMAP3430_REV_ES3_1	0x34304034
+/* NOTE: Add 36xx series below
+ * If additional 34xx series are added, OMAP3430_REV_ESXXXX can be
+ * added above the 3630 defines and series renumbered to ensure
+ * rev() > checks to work
+ */
+#define OMAP3630_REV_ES1_0	0x34305034

Just for the sake of curiosity...

Why not defining 3630 like this?

Quoted 8 lines
Quoted 3 lines

#define OMAP3630_REV_ES1_0 0x36301034

Sorry if i'm asking something dumb.

Because it's still considered 34xx class chip with some extra features. It compiles with the same settings, and uses the same kernel code. So from kernel point of view we can treat it as 34xx.

Never mind, the class bits for cpu_is_omap34xx() are the still there. I was confused.

Quoted 8 lines

Regards,

Tony

--
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