]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: Add cpu-info
authorJagan Teki <jagan@amarulasolutions.com>
Thu, 9 Jan 2020 08:52:15 +0000 (14:22 +0530)
committerKever Yang <kever.yang@rock-chips.com>
Thu, 30 Jan 2020 03:44:01 +0000 (11:44 +0800)
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>
arch/arm/mach-rockchip/Makefile
arch/arm/mach-rockchip/cpu-info.c [new file with mode: 0644]

index a728acda24a3408d7b76e001ba9e9b0ed3452e68..5b38526fe05ebd3ef02082597dfa02ed1027077d 100644 (file)
@@ -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 (file)
index 0000000..9bccbd4
--- /dev/null
@@ -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;
+}