[U-Boot] [PATCH 0/2] ARM: TI: Enable DISPLAY_{CPU/BOARD}INFO

This series adds ID code detection support for AM437x and enables CONFIG_DISPLAY_{CPU/BOARD}INFO on all TI platforms.
Lokesh Vutla (2): ARM: AM437X: Add Silicon ID support configs: ti: armv7_common: Enable DISPLAY_{CPU/BOARD}INFO
arch/arm/cpu/armv7/am33xx/sys_info.c | 5 ++++- arch/arm/include/asm/arch-am33xx/cpu.h | 3 ++- include/configs/ti_armv7_common.h | 4 ++++ include/configs/ti_armv7_keystone2.h | 1 - include/configs/ti_omap4_common.h | 2 -- include/configs/ti_omap5_common.h | 3 --- 6 files changed, 10 insertions(+), 8 deletions(-)

Add silicon ID code for AM437x silicon. This can be used to print the cpu info using CONFIG_DISPLAY_CPUINFO. Also printing "CPU :" along with cpu name in order to be consistent with other OMAP platforms.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- arch/arm/cpu/armv7/am33xx/sys_info.c | 5 ++++- arch/arm/include/asm/arch-am33xx/cpu.h | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/armv7/am33xx/sys_info.c b/arch/arm/cpu/armv7/am33xx/sys_info.c index 52a6824..808faf4 100644 --- a/arch/arm/cpu/armv7/am33xx/sys_info.c +++ b/arch/arm/cpu/armv7/am33xx/sys_info.c @@ -97,6 +97,9 @@ int print_cpuinfo(void) case TI81XX: cpu_s = "TI81XX"; break; + case AM437X: + cpu_s = "AM437X"; + break; default: cpu_s = "Unknown CPU type"; break; @@ -112,7 +115,7 @@ int print_cpuinfo(void) else sec_s = "?";
- printf("%s-%s rev %s\n", cpu_s, sec_s, rev_s); + printf("CPU : %s-%s rev %s\n", cpu_s, sec_s, rev_s);
return 0; } diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h b/arch/arm/include/asm/arch-am33xx/cpu.h index 62bca8c..4a0dce9 100644 --- a/arch/arm/include/asm/arch-am33xx/cpu.h +++ b/arch/arm/include/asm/arch-am33xx/cpu.h @@ -43,7 +43,8 @@ #define HS_DEVICE 0x2 #define GP_DEVICE 0x3
-/* cpu-id for AM33XX and TI81XX family */ +/* cpu-id for AM43XX AM33XX and TI81XX family */ +#define AM437X 0xB98C #define AM335X 0xB944 #define TI81XX 0xB81E #define DEVICE_ID (CTRL_BASE + 0x0600)

Enable CONFIG_DISPLAY_{CPU/BOARD}INFO on all TI platforms. Also removing the duplicated configs.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com --- include/configs/ti_armv7_common.h | 4 ++++ include/configs/ti_armv7_keystone2.h | 1 - include/configs/ti_omap4_common.h | 2 -- include/configs/ti_omap5_common.h | 3 --- 4 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 9f947ee..b11ddb2 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -284,6 +284,10 @@ #endif #endif /* !CONFIG_NOR_BOOT */
+/* Display CPU and Board info */ +#define CONFIG_DISPLAY_CPUINFO +#define CONFIG_DISPLAY_BOARDINFO + /* Generic Environment Variables */
#ifdef CONFIG_CMD_NET diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h index 4aa262e..9241323 100644 --- a/include/configs/ti_armv7_keystone2.h +++ b/include/configs/ti_armv7_keystone2.h @@ -15,7 +15,6 @@ /* U-Boot Build Configuration */ #define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is a 2nd stage loader */ #define CONFIG_BOARD_EARLY_INIT_F -#define CONFIG_DISPLAY_CPUINFO
/* SoC Configuration */ #define CONFIG_ARCH_CPU_INIT diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h index 5fad3c1..24d4c83 100644 --- a/include/configs/ti_omap4_common.h +++ b/include/configs/ti_omap4_common.h @@ -17,8 +17,6 @@ */ #define CONFIG_OMAP4430 1 /* which is in a 4430 */ #define CONFIG_MISC_INIT_R -#define CONFIG_DISPLAY_CPUINFO 1 -#define CONFIG_DISPLAY_BOARDINFO 1
#define CONFIG_SYS_THUMB_BUILD
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h index 3589cdc..2d859e1 100644 --- a/include/configs/ti_omap5_common.h +++ b/include/configs/ti_omap5_common.h @@ -17,9 +17,6 @@ #ifndef __CONFIG_TI_OMAP5_COMMON_H #define __CONFIG_TI_OMAP5_COMMON_H
-#define CONFIG_DISPLAY_CPUINFO -#define CONFIG_DISPLAY_BOARDINFO - /* Common ARM Erratas */ #define CONFIG_ARM_ERRATA_798870

On Sat, Aug 27, 2016 at 05:23:55PM +0530, Lokesh Vutla wrote:
Enable CONFIG_DISPLAY_{CPU/BOARD}INFO on all TI platforms. Also removing the duplicated configs.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
include/configs/ti_armv7_common.h | 4 ++++ include/configs/ti_armv7_keystone2.h | 1 - include/configs/ti_omap4_common.h | 2 -- include/configs/ti_omap5_common.h | 3 --- 4 files changed, 4 insertions(+), 6 deletions(-)
This is the wrong direction. Please add an entry to common/Kconfig (a "hidden" one) and select it from board/ti/*/Kconfig. And this will need some cleaning up of some other boards/ Kconfig files that introduced it locally and instead should select this new option. Thanks!

On Monday 29 August 2016 01:46 AM, Tom Rini wrote:
On Sat, Aug 27, 2016 at 05:23:55PM +0530, Lokesh Vutla wrote:
Enable CONFIG_DISPLAY_{CPU/BOARD}INFO on all TI platforms. Also removing the duplicated configs.
Signed-off-by: Lokesh Vutla lokeshvutla@ti.com
include/configs/ti_armv7_common.h | 4 ++++ include/configs/ti_armv7_keystone2.h | 1 - include/configs/ti_omap4_common.h | 2 -- include/configs/ti_omap5_common.h | 3 --- 4 files changed, 4 insertions(+), 6 deletions(-)
This is the wrong direction. Please add an entry to common/Kconfig (a "hidden" one) and select it from board/ti/*/Kconfig. And this will need
Sure, will update the patch to add a common Kconfig entry. But I am not sure about the statement "select it from board/ti/*/Kconfig". You meant it should be selected by every config TARGET_XXX_EVM or something else?
some cleaning up of some other boards/ Kconfig files that introduced it locally and instead should select this new option. Thanks!
okay, will do it.
Thanks and regards, Lokesh
participants (2)
-
Lokesh Vutla
-
Tom Rini