Skip to contentSkip to conversation

MX53: Handle silicon revision 2.1 case

PATCH Superseded Fabio Estevam 2 participants 2 messages Apr 26, 2011

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 MX53: Handle silicon revision 2.1 case

---
 arch/arm/cpu/armv7/mx5/soc.c             |    3 +++
 arch/arm/include/asm/arch-mx5/imx-regs.h |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/cpu/armv7/mx5/soc.c +3 -0
index 6f4e8db..fa7ee6d 100644
@@ -69,6 +69,9 @@ u32 get_cpu_rev(void)
 	case 0x20:
 		system_rev |= CHIP_REV_2_0;
 		break;
+	case 0x21:
+		system_rev |= CHIP_REV_2_1;
+		break;
 	default:
 		system_rev |= CHIP_REV_1_0;
 		break;
arch/arm/include/asm/arch-mx5/imx-regs.h +1 -0
index a1849f8..2d3d501 100644
@@ -175,6 +175,7 @@
 #define CHIP_REV_1_0            0x10
 #define CHIP_REV_1_1            0x11
 #define CHIP_REV_2_0            0x20
+#define CHIP_REV_2_1            0x21
 #define CHIP_REV_2_5		0x25
 #define CHIP_REV_3_0            0x30
 
Signature · 1 line
1.6.0.4
#1 lore raw

PATCH 1/1 MX53: Handle silicon revision 2.1 case

Quoted 6 lines · Fabio Estevam
---
 arch/arm/cpu/armv7/mx5/soc.c             |    3 +++
 arch/arm/include/asm/arch-mx5/imx-regs.h |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

Hi Fabio,

arch/arm/cpu/armv7/mx5/soc.c u32 get_cpu_rev(void) · line 74

Quoted 11 lines
arch/arm/cpu/armv7/mx5/soc.c +3 -0
index 6f4e8db..fa7ee6d 100644
@@ -69,6 +69,9 @@ u32 get_cpu_rev(void)
 	case 0x20:
 		system_rev |= CHIP_REV_2_0;
 		break;
+	case 0x21:
+		system_rev |= CHIP_REV_2_1;
+		break;

At the moment it seems to me that the revision number corresponds 1:1 to the value of the register in the i.MX53, and we do not need some mapping as for i.MX51. What about to drop the switch and adding a simpler:

	if (reg < 0x20)
		system_rev |= CHIP_REV_1_0;
	else

system_rev |= reg;

Best regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [email protected]
=====================================================================