From: Kever Yang <kever.yang-TNX95d0MmH7DzftRWevZcw@public.gmane.org> To: Jagan Teki <jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org>, Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>, Philipp Tomsich <philipp.tomsich-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org> Cc: u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org, linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org, Akash Gajjar <akash-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.org>, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Subject: Re: [PATCH 02/15] rockchip: Add cpu-info Date: Mon, 5 Aug 2019 20:27:50 +0800 [thread overview] Message-ID: <f6c49feb-c7f6-71e6-33e1-67bb47618ecc@rock-chips.com> (raw) In-Reply-To: <20190729074711.16988-3-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> Jagan, On 2019/7/29 下午3:46, Jagan Teki wrote: > Add cpu information for rockchip soc. > > This would help to print the SoC family number, with > associated temparature, clock and reason for reset etc. > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > --- > arch/arm/mach-rockchip/Makefile | 1 + > arch/arm/mach-rockchip/cpu-info.c | 24 ++++++++++++++++++++++++ > 2 files changed, 25 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 a12b8d4434..655b3e3e1a 100644 > --- a/arch/arm/mach-rockchip/Makefile > +++ b/arch/arm/mach-rockchip/Makefile > @@ -25,6 +25,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_RK3188) += rk3188-board.o > obj-$(CONFIG_ROCKCHIP_RK3128) += rk3128-board.o > diff --git a/arch/arm/mach-rockchip/cpu-info.c b/arch/arm/mach-rockchip/cpu-info.c > new file mode 100644 > index 0000000000..088fc806a6 > --- /dev/null > +++ b/arch/arm/mach-rockchip/cpu-info.c > @@ -0,0 +1,24 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * (C) Copyright 2019 Amarula Solutions. > + * Author: Jagan Teki <jagan@amarulasolutions.com> > + */ > + > +#include <common.h> > + > +int print_cpuinfo(void) > +{ > + puts("SoC: Rockchip "); > + > + /* TODO print operating temparature and clock */ > +# ifdef CONFIG_ROCKCHIP_RK3288 > + puts("RK3288\n"); > +# elif CONFIG_ROCKCHIP_RK3399 > + puts("RK3399\n"); > +# else > +# warning Please update cpu.c with correct CPU information > + puts("Family\n"); > +# endif Can we use CONFIG_SYS_SOC and not one macro for each SoC? Thanks, - Kever > + > + return 0; > +} _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: Kever Yang <kever.yang@rock-chips.com> To: u-boot@lists.denx.de Subject: [U-Boot] [PATCH 02/15] rockchip: Add cpu-info Date: Mon, 5 Aug 2019 20:27:50 +0800 [thread overview] Message-ID: <f6c49feb-c7f6-71e6-33e1-67bb47618ecc@rock-chips.com> (raw) In-Reply-To: <20190729074711.16988-3-jagan@amarulasolutions.com> Jagan, On 2019/7/29 下午3:46, Jagan Teki wrote: > Add cpu information for rockchip soc. > > This would help to print the SoC family number, with > associated temparature, clock and reason for reset etc. > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > --- > arch/arm/mach-rockchip/Makefile | 1 + > arch/arm/mach-rockchip/cpu-info.c | 24 ++++++++++++++++++++++++ > 2 files changed, 25 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 a12b8d4434..655b3e3e1a 100644 > --- a/arch/arm/mach-rockchip/Makefile > +++ b/arch/arm/mach-rockchip/Makefile > @@ -25,6 +25,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_RK3188) += rk3188-board.o > obj-$(CONFIG_ROCKCHIP_RK3128) += rk3128-board.o > diff --git a/arch/arm/mach-rockchip/cpu-info.c b/arch/arm/mach-rockchip/cpu-info.c > new file mode 100644 > index 0000000000..088fc806a6 > --- /dev/null > +++ b/arch/arm/mach-rockchip/cpu-info.c > @@ -0,0 +1,24 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * (C) Copyright 2019 Amarula Solutions. > + * Author: Jagan Teki <jagan@amarulasolutions.com> > + */ > + > +#include <common.h> > + > +int print_cpuinfo(void) > +{ > + puts("SoC: Rockchip "); > + > + /* TODO print operating temparature and clock */ > +# ifdef CONFIG_ROCKCHIP_RK3288 > + puts("RK3288\n"); > +# elif CONFIG_ROCKCHIP_RK3399 > + puts("RK3399\n"); > +# else > +# warning Please update cpu.c with correct CPU information > + puts("Family\n"); > +# endif Can we use CONFIG_SYS_SOC and not one macro for each SoC? Thanks, - Kever > + > + return 0; > +}
next prev parent reply other threads:[~2019-08-05 12:27 UTC|newest] Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-29 7:46 [PATCH 00/15] rk3399: Add redundant boot support Jagan Teki 2019-07-29 7:46 ` [U-Boot] " Jagan Teki [not found] ` <20190729074711.16988-1-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-07-29 7:46 ` [PATCH 01/15] arm: rockchip: Add common cru.h Jagan Teki 2019-07-29 7:46 ` [U-Boot] " Jagan Teki [not found] ` <20190729074711.16988-2-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-08-05 12:25 ` Kever Yang 2019-08-05 12:25 ` [U-Boot] " Kever Yang 2019-08-25 17:25 ` Jagan Teki 2019-08-25 17:25 ` [U-Boot] " Jagan Teki 2019-07-29 7:46 ` [PATCH 02/15] rockchip: Add cpu-info Jagan Teki 2019-07-29 7:46 ` [U-Boot] " Jagan Teki [not found] ` <20190729074711.16988-3-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-08-05 12:27 ` Kever Yang [this message] 2019-08-05 12:27 ` Kever Yang 2019-07-29 7:46 ` [PATCH 03/15] rockchip: rk3288: Print reset reason Jagan Teki 2019-07-29 7:46 ` [U-Boot] " Jagan Teki [not found] ` <20190729074711.16988-4-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-07-29 7:57 ` Matthias Urlichs 2019-08-05 12:30 ` Kever Yang 2019-08-05 12:30 ` [U-Boot] " Kever Yang [not found] ` <98408a3c-84bd-d54b-1b3a-49901c85ba3c-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2019-08-14 9:40 ` Jagan Teki 2019-08-14 9:40 ` [U-Boot] " Jagan Teki 2019-08-14 10:43 ` Wadim Egorov 2019-08-14 10:43 ` [U-Boot] " Wadim Egorov 2019-08-14 10:46 ` Michael Nazzareno Trimarchi 2019-08-14 10:46 ` [U-Boot] " Michael Nazzareno Trimarchi 2019-07-29 7:47 ` [PATCH 04/15] rockchip: Add common " Jagan Teki 2019-07-29 7:47 ` [U-Boot] " Jagan Teki 2019-07-29 7:47 ` [PATCH 05/15] rockchip: rk3288/rk3399: Enable DISPLAY_CPUINFO Jagan Teki 2019-07-29 7:47 ` [U-Boot] " Jagan Teki 2019-08-05 12:35 ` Kever Yang 2019-08-05 12:35 ` [U-Boot] " Kever Yang 2019-07-29 7:47 ` [PATCH 06/15] wdt: designware: Simplify is_enabled function Jagan Teki 2019-07-29 7:47 ` [U-Boot] " Jagan Teki 2019-07-29 7:47 ` [PATCH 07/15] wdt: designware: Simplify enable function Jagan Teki 2019-07-29 7:47 ` [U-Boot] " Jagan Teki 2019-07-29 7:47 ` [PATCH 08/15] wdt: dw: Add driver-model support Jagan Teki 2019-07-29 7:47 ` [U-Boot] " Jagan Teki [not found] ` <20190729074711.16988-9-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-07-29 9:09 ` Andy Shevchenko 2019-07-29 9:09 ` Andy Shevchenko 2019-07-29 7:47 ` [PATCH 09/15] wdt: dw: Rename to dw_wdt.c Jagan Teki 2019-07-29 7:47 ` [U-Boot] " Jagan Teki 2019-08-05 12:40 ` Kever Yang 2019-08-05 12:40 ` [U-Boot] " Kever Yang [not found] ` <e7507f4e-de8d-e61c-5538-0a3cc203ceba-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2019-08-14 9:44 ` Jagan Teki 2019-08-14 9:44 ` [U-Boot] " Jagan Teki 2019-07-29 7:47 ` [PATCH 10/15] rockchip: dts: rk3399: Add u-boot, dm-pre-reloc for watchdog Jagan Teki 2019-07-29 7:47 ` [U-Boot] " Jagan Teki 2019-07-29 7:47 ` [PATCH 11/15] wdt: Kconfig: Add WDT_DW entry Jagan Teki 2019-07-29 7:47 ` [U-Boot] " Jagan Teki 2019-07-29 7:47 ` [PATCH 12/15] include: rk3399: Disable watchdog in TPL Jagan Teki 2019-07-29 7:47 ` [U-Boot] " Jagan Teki [not found] ` <20190729074711.16988-13-jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org> 2019-08-05 12:43 ` Kever Yang 2019-08-05 12:43 ` [U-Boot] " Kever Yang 2019-08-25 20:14 ` Jagan Teki 2019-08-25 20:14 ` [U-Boot] " Jagan Teki 2019-08-26 1:34 ` Kever Yang 2019-08-26 1:34 ` [U-Boot] " Kever Yang 2019-07-29 7:47 ` [DO NOT MERGE] [PATCH 13/15] rk3399: rockpro64: Enable watchdog Jagan Teki 2019-07-29 7:47 ` [U-Boot] " Jagan Teki 2019-07-29 7:47 ` [PATCH 14/15] rockchip: rk3399: Add bootcount support Jagan Teki 2019-07-29 7:47 ` [U-Boot] " Jagan Teki 2019-08-12 12:16 ` Kever Yang 2019-08-12 12:16 ` [U-Boot] " Kever Yang 2019-08-13 1:02 ` [PATCH 14/15] rockchip: rk3399: Add bootcount support【请注意,邮件由u-boot-bounces@lists.denx.de代发】 Kever Yang 2019-08-13 1:02 ` [U-Boot] " Kever Yang 2019-07-29 7:47 ` [DO NOT MERGE] [PATCH 15/15] rk3399: rockpro64: Enable bootcount Jagan Teki 2019-07-29 7:47 ` [U-Boot] " Jagan Teki 2019-08-05 12:18 ` [PATCH 00/15] rk3399: Add redundant boot support Kever Yang 2019-08-05 12:18 ` [U-Boot] " Kever Yang
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=f6c49feb-c7f6-71e6-33e1-67bb47618ecc@rock-chips.com \ --to=kever.yang-tnx95d0mmh7dzftrwevzcw@public.gmane.org \ --cc=akash-oRp2ZoJdM/RWk0Htik3J/w@public.gmane.org \ --cc=jagan-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org \ --cc=linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org \ --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=philipp.tomsich-SN7IsUiht6C/RdPyistoZJqQE7yCjDx5@public.gmane.org \ --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \ --cc=u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org \ /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: linkBe 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.