Skip to contentSkip to conversation

armv8/ls2085a: Avoid hard-coding for board name print

PATCH Superseded Prabhakar Kushwaha 1 participant 1 message May 18, 2015

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 13/20 armv8/ls2085a: Avoid hard-coding for board name print

LS2085A supports 6 personalities i.e. LS2045AE, LS2045A, LS2080AE, LS2080A, LS2085AE and LS2085A personlities.

Instead of hard-coding, board name should change as per selected personality.

---
 board/freescale/ls2085aqds/ls2085aqds.c | 6 +++++-
 board/freescale/ls2085ardb/ls2085ardb.c | 5 ++++-
 include/configs/ls2085aqds.h            | 3 ---
 include/configs/ls2085ardb.h            | 3 ---
 4 files changed, 9 insertions(+), 8 deletions(-)
board/freescale/ls2085aqds/ls2085aqds.c +5 -1
index b103224..5e15ab2 100644
@@ -49,11 +49,15 @@ int checkboard(void)
 					    "100 separate SSCG"};
 	int clock;
 
+	cpu_name(buf);
+	printf("Board: %s-QDS, ", buf);
+
 	sw = QIXIS_READ(arch);
-	printf("Board: %s, ", CONFIG_IDENT_STRING);
 	printf("Board Arch: V%d, ", sw >> 4);
 	printf("Board version: %c, boot from ", (sw & 0xf) + 'A' - 1);
 
+	memset((u8 *)buf, 0x00, ARRAY_SIZE(buf));
+
 	sw = QIXIS_READ(brdcfg[0]);
 	sw = (sw & QIXIS_LBMAP_MASK) >> QIXIS_LBMAP_SHIFT;
 
board/freescale/ls2085ardb/ls2085ardb.c +4 -1
index a1f5cff..175943e 100644
@@ -52,9 +52,12 @@ unsigned long long get_qixis_addr(void)
 int checkboard(void)
 {
 	u8 sw;
+	char buf[15];
+
+	cpu_name(buf);
+	printf("Board: %s-RDB, ", buf);
 
 	sw = QIXIS_READ(arch);
-	printf("Board: %s, ", CONFIG_IDENT_STRING);
 	printf("Board Arch: V%d, ", sw >> 4);
 	printf("Board version: %c, boot from ", (sw & 0xf) + 'A');
 
include/configs/ls2085aqds.h +0 -3
index 8cb8c78..731eca2 100644
@@ -10,9 +10,6 @@
 #include "ls2085a_common.h"
 #include <config_cmd_default.h>
 
-#define CONFIG_IDENT_STRING		" LS2085A-QDS"
-#define CONFIG_BOOTP_VCI_STRING		"U-boot.LS2085A-QDS"
-
 #define CONFIG_DISPLAY_BOARDINFO
 
 #ifndef __ASSEMBLY__
include/configs/ls2085ardb.h +0 -3
index ba671dd..5a5884c 100644
@@ -10,9 +10,6 @@
 #include "ls2085a_common.h"
 #include <config_cmd_default.h>
 
-#define CONFIG_IDENT_STRING		" LS2085A-RDB"
-#define CONFIG_BOOTP_VCI_STRING		"U-boot.LS2085A-RDB"
-
 #undef CONFIG_CONS_INDEX
 #define CONFIG_CONS_INDEX       2
 
Signature · 1 line
1.9.1