All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: Kever Yang <kever.yang@rock-chips.com>,
	Simon Glass <sjg@chromium.org>,
	Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: u-boot@lists.denx.de, linux-amarula@amarulasolutions.com,
	linux-rockchip@lists.infradead.org
Subject: [PATCH v4 1/8] rockchip: Add cpu-info
Date: Thu,  9 Jan 2020 14:22:15 +0530	[thread overview]
Message-ID: <20200109085222.22670-2-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20200109085222.22670-1-jagan@amarulasolutions.com>

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   |  1 +
 arch/arm/mach-rockchip/cpu-info.c | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 arch/arm/mach-rockchip/cpu-info.c

diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
index a728acda24..5b38526fe0 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 0000000000..9bccbd4f68
--- /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;
+}
-- 
2.18.0.321.gffc6fa0e3

WARNING: multiple messages have this Message-ID (diff)
From: Jagan Teki <jagan@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [PATCH v4 1/8] rockchip: Add cpu-info
Date: Thu,  9 Jan 2020 14:22:15 +0530	[thread overview]
Message-ID: <20200109085222.22670-2-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20200109085222.22670-1-jagan@amarulasolutions.com>

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   |  1 +
 arch/arm/mach-rockchip/cpu-info.c | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 arch/arm/mach-rockchip/cpu-info.c

diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile
index a728acda24..5b38526fe0 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 0000000000..9bccbd4f68
--- /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;
+}
-- 
2.18.0.321.gffc6fa0e3

  reply	other threads:[~2020-01-09  8:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09  8:52 [PATCH v4 0/8] rk3399: Add redundant boot support Jagan Teki
2020-01-09  8:52 ` Jagan Teki
2020-01-09  8:52 ` Jagan Teki [this message]
2020-01-09  8:52   ` [PATCH v4 1/8] rockchip: Add cpu-info Jagan Teki
2020-01-09  8:52 ` [PATCH v4 2/8] rockchip: rk3399: Enable DISPLAY_CPUINFO Jagan Teki
2020-01-09  8:52   ` Jagan Teki
2020-01-09  8:52 ` [PATCH v4 3/8] arm: rockchip: Add common cru.h Jagan Teki
2020-01-09  8:52   ` Jagan Teki
2020-01-09  8:52 ` [PATCH v4 4/8] rockchip: Add common reset cause Jagan Teki
2020-01-09  8:52   ` Jagan Teki
     [not found] ` <20200109085222.22670-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2020-01-09  8:52   ` [PATCH v4 5/8] rockchip: rk3399: Add bootcount support Jagan Teki
2020-01-09  8:52     ` Jagan Teki
2020-01-09  8:52   ` [PATCH v4 6/8] watchdog: kconfig: Enable designware for rk3399 Jagan Teki
2020-01-09  8:52     ` Jagan Teki
     [not found]     ` <20200109085222.22670-7-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>
2020-01-17  6:46       ` Kever Yang
2020-01-17  6:46         ` Kever Yang
2020-01-09  8:52   ` [DO NOT MERGE] [PATCH v4 7/8] roc-rk3399-pc: Enable watchdog Jagan Teki
2020-01-09  8:52     ` Jagan Teki
2020-01-09  8:52 ` [DO NOT MERGE] [PATCH v4 8/8] roc-rk3399-pc: Enable bootcount Jagan Teki
2020-01-09  8:52   ` Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200109085222.22670-2-jagan@amarulasolutions.com \
    --to=jagan@amarulasolutions.com \
    --cc=kever.yang@rock-chips.com \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=philipp.tomsich@theobroma-systems.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.