summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap/include/mach/sys_info.h
diff options
context:
space:
mode:
authorSanjeev Premi <premi@ti.com>2010-12-30 19:19:55 +0530
committerSascha Hauer <s.hauer@pengutronix.de>2011-01-03 12:45:42 +0100
commit0bb8b986242da7d506a089c1d5f7a5a9c6ce04c0 (patch)
tree39083dd2d8c6b58b01e5a3d522ee2b0f5a42048d /arch/arm/mach-omap/include/mach/sys_info.h
parent0c49e7056c6620e82d085c9da627eadcc0e0b20e (diff)
downloadbarebox-0bb8b986242da7d506a089c1d5f7a5a9c6ce04c0.tar.gz
barebox-0bb8b986242da7d506a089c1d5f7a5a9c6ce04c0.tar.xz
omap3: Update method to detect si revision
This patch ensures that all silicon revisions are detected. (Current implementation cannot detect ES1.0). In the process, the 'seemingly' hardcoded macros identifying cpu revision (e.g. CPU_ES1P1) have been updated to include the CPU name as well. (The mapping of IDCODE value to silicon revision may not be same across different OMAP families). Signed-off-by: Sanjeev Premi <premi@ti.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-omap/include/mach/sys_info.h')
-rw-r--r--arch/arm/mach-omap/include/mach/sys_info.h21
1 files changed, 8 insertions, 13 deletions
diff --git a/arch/arm/mach-omap/include/mach/sys_info.h b/arch/arm/mach-omap/include/mach/sys_info.h
index f9df51c9e6..8b8d332d16 100644
--- a/arch/arm/mach-omap/include/mach/sys_info.h
+++ b/arch/arm/mach-omap/include/mach/sys_info.h
@@ -51,20 +51,15 @@
#define CPU_1610 0x1610
/**
- * CPU revision
+ * Define CPU revisions
*/
-#define CPU_ES1 1
-#define CPU_ES1P1 2
-#define CPU_ES1P2 3
-#define CPU_ES2 4
-#define CPU_ES2P1 5
-#define CPU_ES2P2 6
-#define CPU_ES3 7
-#define CPU_ES3P1 8
-#define CPU_ES3P2 9
-#define CPU_ES4 10
-#define CPU_ES4P1 11
-#define CPU_ES4P2 12
+#define cpu_revision(cpu,rev) (((cpu) << 16) | (rev))
+
+#define OMAP34XX_ES1 cpu_revision(CPU_3430, 0)
+#define OMAP34XX_ES2 cpu_revision(CPU_3430, 1)
+#define OMAP34XX_ES2_1 cpu_revision(CPU_3430, 2)
+#define OMAP34XX_ES3 cpu_revision(CPU_3430, 3)
+#define OMAP34XX_ES3_1 cpu_revision(CPU_3430, 4)
#define GPMC_MUXED 1
#define GPMC_NONMUXED 0