diff options
author | Jagan Teki <jagan@amarulasolutions.com> | 2020-01-09 14:22:15 +0530 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2020-01-30 11:44:01 +0800 |
commit | 2952f39269cab842769d0ff9a8ad5d7dcfb9a26c (patch) | |
tree | 04fc4a61aea5141717028046aaab008220023e8f | |
parent | 1c37f60c286cd4a0ff592cad64d1dcfec1adb6ae (diff) | |
download | u-boot-2952f39269cab842769d0ff9a8ad5d7dcfb9a26c.zip u-boot-2952f39269cab842769d0ff9a8ad5d7dcfb9a26c.tar.gz u-boot-2952f39269cab842769d0ff9a8ad5d7dcfb9a26c.tar.bz2 |
rockchip: Add cpu-info
Add cpu information for rockchip soc.
This would help to print the SoC family number, with
associated temparature, clock and reason for reset etc.
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
-rw-r--r-- | arch/arm/mach-rockchip/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-rockchip/cpu-info.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile index a728acd..5b38526 100644 --- a/arch/arm/mach-rockchip/Makefile +++ b/arch/arm/mach-rockchip/Makefile @@ -22,6 +22,7 @@ ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),) # we can have the preprocessor correctly recognise both 0x0 and 0 # meaning "turn it off". obj-y += boot_mode.o +obj-$(CONFIG_DISPLAY_CPUINFO) += cpu-info.o obj-$(CONFIG_ROCKCHIP_COMMON_BOARD) += board.o obj-$(CONFIG_MISC_INIT_R) += misc.o endif diff --git a/arch/arm/mach-rockchip/cpu-info.c b/arch/arm/mach-rockchip/cpu-info.c new file mode 100644 index 0000000..9bccbd4 --- /dev/null +++ b/arch/arm/mach-rockchip/cpu-info.c @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * (C) Copyright 2019 Amarula Solutions(India) + * Author: Jagan Teki <jagan@amarulasolutions.com> + */ + +#include <common.h> + +int print_cpuinfo(void) +{ + printf("SoC: Rockchip %s\n", CONFIG_SYS_SOC); + + /* TODO print operating temparature and clock */ + + return 0; +} |