From 4c547754f525729e0e81389d94b26f2bea80741c Mon Sep 17 00:00:00 2001
From: Francois Retief <fgretief@spaceteq.co.za>
Date: Wed, 28 Oct 2015 16:49:02 +0200
Subject: [PATCH] sparc: Add CONFIG_DISPLAY_BOARDINFO variable to all LEON
 boards

Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
---
 arch/sparc/cpu/leon2/cpu.c       | 10 ++++++++++
 arch/sparc/cpu/leon3/cpu.c       | 10 ++++++++++
 include/configs/gr_cpci_ax2000.h |  3 ++-
 include/configs/gr_ep2s60.h      |  3 ++-
 include/configs/gr_xc3s_1500.h   |  3 ++-
 include/configs/grsim.h          |  3 ++-
 include/configs/grsim_leon2.h    |  3 ++-
 7 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/arch/sparc/cpu/leon2/cpu.c b/arch/sparc/cpu/leon2/cpu.c
index 22e63e3869..d044c3abc7 100644
--- a/arch/sparc/cpu/leon2/cpu.c
+++ b/arch/sparc/cpu/leon2/cpu.c
@@ -22,6 +22,16 @@ int checkcpu(void)
 	return 0;
 }
 
+#ifdef CONFIG_DISPLAY_CPUINFO
+
+int print_cpuinfo(void)
+{
+	printf("CPU:   LEON2\n");
+	return 0;
+}
+
+#endif
+
 /* ------------------------------------------------------------------------- */
 
 void cpu_reset(void)
diff --git a/arch/sparc/cpu/leon3/cpu.c b/arch/sparc/cpu/leon3/cpu.c
index d57bf2fc87..7034be60ec 100644
--- a/arch/sparc/cpu/leon3/cpu.c
+++ b/arch/sparc/cpu/leon3/cpu.c
@@ -25,6 +25,16 @@ int checkcpu(void)
 	return 0;
 }
 
+#ifdef CONFIG_DISPLAY_CPUINFO
+
+int print_cpuinfo(void)
+{
+	printf("CPU:   LEON3\n");
+	return 0;
+}
+
+#endif
+
 /* ------------------------------------------------------------------------- */
 
 void cpu_reset(void)
diff --git a/include/configs/gr_cpci_ax2000.h b/include/configs/gr_cpci_ax2000.h
index a16f59a891..c3b1729326 100644
--- a/include/configs/gr_cpci_ax2000.h
+++ b/include/configs/gr_cpci_ax2000.h
@@ -15,6 +15,7 @@
 #define __CONFIG_H__
 
 #define CONFIG_SYS_GENERIC_BOARD
+#define CONFIG_DISPLAY_BOARDINFO
 
 /*
  * High Level Configuration Options
@@ -343,7 +344,7 @@
 #undef CONFIG_SYS_GRLIB_GAISLER_DDR2SPA1
 
 /* Identification string */
-#define CONFIG_IDENT_STRING "GAISLER LEON3 GR-CPCI-AX2000"
+#define CONFIG_IDENT_STRING " Gaisler LEON3 GR-CPCI-AX2000"
 
 /* default kernel command line */
 #define CONFIG_DEFAULT_KERNEL_COMMAND_LINE "console=ttyS0,38400\0\0"
diff --git a/include/configs/gr_ep2s60.h b/include/configs/gr_ep2s60.h
index f472179dd6..45163edd8d 100644
--- a/include/configs/gr_ep2s60.h
+++ b/include/configs/gr_ep2s60.h
@@ -16,6 +16,7 @@
 #define __CONFIG_H__
 
 #define CONFIG_SYS_GENERIC_BOARD
+#define CONFIG_DISPLAY_BOARDINFO
 
 /*
  * High Level Configuration Options
@@ -313,7 +314,7 @@
 #undef CONFIG_SYS_GRLIB_GAISLER_DDR2SPA1
 
 /* Identification string */
-#define CONFIG_IDENT_STRING "GAISLER LEON3 EP2S60"
+#define CONFIG_IDENT_STRING " Gaisler LEON3 EP2S60"
 
 /* default kernel command line */
 #define CONFIG_DEFAULT_KERNEL_COMMAND_LINE "console=ttyS0,38400\0\0"
diff --git a/include/configs/gr_xc3s_1500.h b/include/configs/gr_xc3s_1500.h
index 8598ac1881..f675b75843 100644
--- a/include/configs/gr_xc3s_1500.h
+++ b/include/configs/gr_xc3s_1500.h
@@ -14,6 +14,7 @@
 #define __CONFIG_H__
 
 #define CONFIG_SYS_GENERIC_BOARD
+#define CONFIG_DISPLAY_BOARDINFO
 
 /*
  * High Level Configuration Options
@@ -275,7 +276,7 @@
 #undef CONFIG_SYS_GRLIB_GAISLER_DDR2SPA1
 
 /* Identification string */
-#define CONFIG_IDENT_STRING "GAISLER LEON3 GR-XC3S-1500"
+#define CONFIG_IDENT_STRING " Gaisler LEON3 GR-XC3S-1500"
 
 /* default kernel command line */
 #define CONFIG_DEFAULT_KERNEL_COMMAND_LINE "console=ttyS0,38400\0\0"
diff --git a/include/configs/grsim.h b/include/configs/grsim.h
index e280dee9e9..47c357322d 100644
--- a/include/configs/grsim.h
+++ b/include/configs/grsim.h
@@ -14,6 +14,7 @@
 #define __CONFIG_H__
 
 #define CONFIG_SYS_GENERIC_BOARD
+#define CONFIG_DISPLAY_BOARDINFO
 
 /*
  * High Level Configuration Options
@@ -294,7 +295,7 @@
 /* default kernel command line */
 #define CONFIG_DEFAULT_KERNEL_COMMAND_LINE "console=ttyS0,38400\0\0"
 
-#define CONFIG_IDENT_STRING "Gaisler GRSIM"
+#define CONFIG_IDENT_STRING " Gaisler GRSIM"
 
 /* TSIM command:
  * $ ./tsim-leon3 -mmu -cas
diff --git a/include/configs/grsim_leon2.h b/include/configs/grsim_leon2.h
index 2f7a5628f1..0a5292e9fd 100644
--- a/include/configs/grsim_leon2.h
+++ b/include/configs/grsim_leon2.h
@@ -13,6 +13,7 @@
 #define __CONFIG_H__
 
 #define CONFIG_SYS_GENERIC_BOARD
+#define CONFIG_DISPLAY_BOARDINFO
 
 /*
  * High Level Configuration Options
@@ -290,6 +291,6 @@
 /* default kernel command line */
 #define CONFIG_DEFAULT_KERNEL_COMMAND_LINE "console=ttyS0,38400\0\0"
 
-#define CONFIG_IDENT_STRING "Gaisler GRSIM LEON2"
+#define CONFIG_IDENT_STRING " Gaisler GRSIM LEON2"
 
 #endif				/* __CONFIG_H */
-- 
2.39.5