public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] mx6: Read silicon revision from register
@ 2012-03-13 14:18 Fabio Estevam
  2012-03-13 14:37 ` Dirk Behme
  2012-03-13 15:40 ` Eric Nelson
  0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2012-03-13 14:18 UTC (permalink / raw)
  To: u-boot

Instead of hardcoding the mx6 silicon revision, read it from the proper register.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Fix typo on Subject
 arch/arm/cpu/armv7/mx6/soc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index 2ac74b5..639bf30 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -32,7 +32,8 @@
 
 u32 get_cpu_rev(void)
 {
-	int system_rev = 0x61000 | CHIP_REV_1_0;
+	int reg = readl(ANATOP_BASE_ADDR + 0x260) & 0xFF;
+	int system_rev = 0x61000 | 0x10 + reg;
 
 	return system_rev;
 }
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-13 18:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-13 14:18 [U-Boot] [PATCH v2] mx6: Read silicon revision from register Fabio Estevam
2012-03-13 14:37 ` Dirk Behme
2012-03-13 15:40 ` Eric Nelson
2012-03-13 15:49   ` Stefano Babic
2012-03-13 18:01     ` Eric Nelson
2012-03-13 17:04   ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox