[PATCH 3/7] ARM cpuinfo: decode more bits, use ARRAY_SIZE

Sascha Hauer s.hauer at pengutronix.de
Thu Dec 15 05:49:35 EST 2011


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/cpu/cpuinfo.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/cpu/cpuinfo.c b/arch/arm/cpu/cpuinfo.c
index 05971b3..7be1671 100644
--- a/arch/arm/cpu/cpuinfo.c
+++ b/arch/arm/cpu/cpuinfo.c
@@ -47,8 +47,8 @@ static void decode_cache(unsigned long size)
 }
 
 static char *crbits[] = {"M", "A", "C", "W", "P", "D", "L", "B", "S", "R",
-	"F", "Z", "I", "V", "RR", "L4", "", "", "", "", "", "FI", "U", "XP",
-	"VE", "EE", "L2"};
+	"F", "Z", "I", "V", "RR", "L4", "DT", "", "IT", "ST", "", "FI", "U", "XP",
+	"VE", "EE", "L2", "", "TRE", "AFE", "TE"};
 
 static int do_cpuinfo(struct command *cmdtp, int argc, char *argv[])
 {
@@ -170,7 +170,7 @@ static int do_cpuinfo(struct command *cmdtp, int argc, char *argv[])
 	}
 
 	printf("Control register: ");
-	for (i = 0; i < 27; i++)
+	for (i = 0; i < ARRAY_SIZE(crbits); i++)
 		if (cr & (1 << i))
 			printf("%s ", crbits[i]);
 	printf("\n");
-- 
1.7.7.3




More information about the barebox mailing list