Patchwork [U-Boot,1/7] arm: dra7xx: Add silicon id support for DRA752 soc

login
register
mail settings
Submitter Lokesh Vutla
Date Feb. 13, 2013, 7:29 a.m.
Message ID <1360740549-32588-2-git-send-email-lokeshvutla@ti.com>
Download mbox | patch
Permalink /patch/220064/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Lokesh Vutla - Feb. 13, 2013, 7:29 a.m.
Adding CPU detection support for the DRA752 ES1.0 soc.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: R Sricharan <r.sricharan@ti.com>
---
 arch/arm/cpu/armv7/omap-common/hwinit-common.c |    9 +++++++--
 arch/arm/cpu/armv7/omap5/hwinit.c              |    3 +++
 arch/arm/include/asm/arch-omap5/omap.h         |    1 +
 arch/arm/include/asm/omap_common.h             |    3 +++
 4 files changed, 14 insertions(+), 2 deletions(-)
Tom Rini - Feb. 15, 2013, 4:34 p.m.
On Wed, Feb 13, 2013 at 12:59:03PM +0530, Lokesh Vutla wrote:

> Adding CPU detection support for the DRA752 ES1.0 soc.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> Signed-off-by: R Sricharan <r.sricharan@ti.com>

Reviewed-by: Tom Rini <trini@ti.com>

Patch

diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
index 60af7eb..05ff2e8 100644
--- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
@@ -81,12 +81,17 @@  u32 cortex_rev(void)
 void omap_rev_string(void)
 {
 	u32 omap_rev = omap_revision();
+	u32 soc_variant	= (omap_rev & 0xF0000000) >> 28;
 	u32 omap_variant = (omap_rev & 0xFFFF0000) >> 16;
 	u32 major_rev = (omap_rev & 0x00000F00) >> 8;
 	u32 minor_rev = (omap_rev & 0x000000F0) >> 4;
 
-	printf("OMAP%x ES%x.%x\n", omap_variant, major_rev,
-		minor_rev);
+	if (soc_variant)
+		printf("OMAP");
+	else
+		printf("DRA");
+	printf("%x ES%x.%x\n", omap_variant, major_rev,
+	       minor_rev);
 }
 
 #ifdef CONFIG_SPL_BUILD
diff --git a/arch/arm/cpu/armv7/omap5/hwinit.c b/arch/arm/cpu/armv7/omap5/hwinit.c
index f083198..d8f711c 100644
--- a/arch/arm/cpu/armv7/omap5/hwinit.c
+++ b/arch/arm/cpu/armv7/omap5/hwinit.c
@@ -337,6 +337,9 @@  void init_omap_revision(void)
 	case OMAP5432_CONTROL_ID_CODE_ES2_0:
 		*omap_si_rev = OMAP5432_ES2_0;
 		break;
+	case DRA752_CONTROL_ID_CODE_ES1_0:
+		*omap_si_rev = DRA752_ES1_0;
+		break;
 	default:
 		*omap_si_rev = OMAP5430_SILICON_ID_INVALID;
 	}
diff --git a/arch/arm/include/asm/arch-omap5/omap.h b/arch/arm/include/asm/arch-omap5/omap.h
index d29be93..b632635 100644
--- a/arch/arm/include/asm/arch-omap5/omap.h
+++ b/arch/arm/include/asm/arch-omap5/omap.h
@@ -60,6 +60,7 @@ 
 #define OMAP5430_CONTROL_ID_CODE_ES2_0          0x1B94202F
 #define OMAP5432_CONTROL_ID_CODE_ES1_0		0x0B99802F
 #define OMAP5432_CONTROL_ID_CODE_ES2_0          0x1B99802F
+#define DRA752_CONTROL_ID_CODE_ES1_0		0x0B99002F
 
 /* STD_FUSE_PROD_ID_1 */
 #define STD_FUSE_PROD_ID_1		(CTRL_BASE + 0x218)
diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h
index 0af0c33..785daff 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -554,4 +554,7 @@  static inline u32 omap_revision(void)
 #define OMAP5432_ES1_0	0x54320100
 #define OMAP5430_ES2_0  0x54300200
 #define OMAP5432_ES2_0  0x54320200
+
+/* DRA7XX */
+#define DRA752_ES1_0	0x07520100
 #endif /* _OMAP_COMMON_H_ */