[U-Boot] [PATCH v2] MX53: Handle silicon revision 2.1 case

Fabio Estevam festevam at gmail.com
Tue Apr 26 22:50:15 CEST 2011


Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
Changes since v1:
- Make the revision detection logic simpler as suggested by Stefano

 arch/arm/cpu/armv7/mx5/soc.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx5/soc.c b/arch/arm/cpu/armv7/mx5/soc.c
index 6f4e8db..40b8b56 100644
--- a/arch/arm/cpu/armv7/mx5/soc.c
+++ b/arch/arm/cpu/armv7/mx5/soc.c
@@ -65,14 +65,10 @@ u32 get_cpu_rev(void)
 		break;
 	}
 #else
-	switch (reg) {
-	case 0x20:
-		system_rev |= CHIP_REV_2_0;
-		break;
-	default:
+	if (reg < 0x20)
 		system_rev |= CHIP_REV_1_0;
-		break;
-	}
+	else
+		system_rev |= reg;
 #endif
 	return system_rev;
 }
-- 
1.6.0.4



More information about the U-Boot mailing list