
Fabio, ________________________________________ From: u-boot-bounces@lists.denx.de [u-boot-bounces@lists.denx.de] on behalf of Fabio Estevam [fabio.estevam@freescale.com] Sent: Tuesday, March 13, 2012 10:17 PM To: u-boot@lists.denx.de Cc: Estevam Fabio-R49496 Subject: [U-Boot] [PATCH] mx6: Read register revision from register
Instead of hardcoding the mx6 silicon revision, read it from the proper register.
Signed-off-by: Fabio Estevam fabio.estevam@freescale.com --- 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;
This is not complete, you are still hard coding it. In fact,The ANATOP register contains both the chip ID and chip revision.
return system_rev; } -- 1.7.1
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot