diff mbox series

[RFC] common: board_f: add print_archinfo to display arch information

Message ID 20210115044654.3085-1-jh80.chung@samsung.com
State RFC
Delegated to: Tom Rini
Headers show
Series [RFC] common: board_f: add print_archinfo to display arch information | expand

Commit Message

Jaehoon Chung Jan. 15, 2021, 4:46 a.m. UTC
Current U-boot doesn't display a message about which architecture is
used. So Developer is difficult to know it by intuition.
This patch is displaying to CPU information with CONFIG_SYS_CPU.

CPU: armv8
DARM:  3.9 GiB

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 common/board_f.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Tom Rini Jan. 15, 2021, 6:11 p.m. UTC | #1
On Fri, Jan 15, 2021 at 01:46:54PM +0900, Jaehoon Chung wrote:

> Current U-boot doesn't display a message about which architecture is
> used. So Developer is difficult to know it by intuition.
> This patch is displaying to CPU information with CONFIG_SYS_CPU.
> 
> CPU: armv8
> DARM:  3.9 GiB
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

We have a large number of "CPU: " prints today, under
CONFIG_DISPLAY_CPUINFO which is what I think you're looking for.
Jaehoon Chung Jan. 17, 2021, 10:10 p.m. UTC | #2
Hi Tom,

On 1/16/21 3:11 AM, Tom Rini wrote:
> On Fri, Jan 15, 2021 at 01:46:54PM +0900, Jaehoon Chung wrote:
> 
>> Current U-boot doesn't display a message about which architecture is
>> used. So Developer is difficult to know it by intuition.
>> This patch is displaying to CPU information with CONFIG_SYS_CPU.
>>
>> CPU: armv8
>> DARM:  3.9 GiB
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> 
> We have a large number of "CPU: " prints today, under
> CONFIG_DISPLAY_CPUINFO which is what I think you're looking for.

Thanks for sharing it. 
Frankly, i had found CONFIG_DISPLAY_CPUINFO, but i have misunderstood about it.
So That's why i sent RFC patch. 

Thanks!

Best Regards,
Jaehoon Chung

>
Simon Glass Jan. 19, 2021, 6:06 p.m. UTC | #3
Hi Jaehoon,

On Sun, 17 Jan 2021 at 15:10, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>
> Hi Tom,
>
> On 1/16/21 3:11 AM, Tom Rini wrote:
> > On Fri, Jan 15, 2021 at 01:46:54PM +0900, Jaehoon Chung wrote:
> >
> >> Current U-boot doesn't display a message about which architecture is
> >> used. So Developer is difficult to know it by intuition.
> >> This patch is displaying to CPU information with CONFIG_SYS_CPU.
> >>
> >> CPU: armv8
> >> DARM:  3.9 GiB
> >>
> >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> >
> > We have a large number of "CPU: " prints today, under
> > CONFIG_DISPLAY_CPUINFO which is what I think you're looking for.
>
> Thanks for sharing it.
> Frankly, i had found CONFIG_DISPLAY_CPUINFO, but i have misunderstood about it.
> So That's why i sent RFC patch.

Also in case it is useful, I sent a patch to allow the model name to
come from a sysinfo driver:

https://patchwork.ozlabs.org/project/uboot/patch/20210116145343.11.I93d883230fabc88c1e9fd95d72d497069b2c60e9@changeid/

Regards,
Simon
Jaehoon Chung Jan. 20, 2021, 10:44 a.m. UTC | #4
Hi Simon,

On 1/20/21 3:06 AM, Simon Glass wrote:
> Hi Jaehoon,
> 
> On Sun, 17 Jan 2021 at 15:10, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>>
>> Hi Tom,
>>
>> On 1/16/21 3:11 AM, Tom Rini wrote:
>>> On Fri, Jan 15, 2021 at 01:46:54PM +0900, Jaehoon Chung wrote:
>>>
>>>> Current U-boot doesn't display a message about which architecture is
>>>> used. So Developer is difficult to know it by intuition.
>>>> This patch is displaying to CPU information with CONFIG_SYS_CPU.
>>>>
>>>> CPU: armv8
>>>> DARM:  3.9 GiB
>>>>
>>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>>>
>>> We have a large number of "CPU: " prints today, under
>>> CONFIG_DISPLAY_CPUINFO which is what I think you're looking for.
>>
>> Thanks for sharing it.
>> Frankly, i had found CONFIG_DISPLAY_CPUINFO, but i have misunderstood about it.
>> So That's why i sent RFC patch.
> 
> Also in case it is useful, I sent a patch to allow the model name to
> come from a sysinfo driver:
> 
> https://protect2.fireeye.com/v1/url?k=187ced84-47e7d4e1-187d66cb-000babff32e3-3872eb836621c517&q=1&e=a8e94ada-7963-490c-bcde-520a25e22603&u=https%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Fuboot%2Fpatch%2F20210116145343.11.I93d883230fabc88c1e9fd95d72d497069b2c60e9%40changeid%2F

Thanks for sharing it. I didn't know about it. :)

Best Regards,
Jaehoon Chung

> 
> Regards,
> Simon
>
diff mbox series

Patch

diff --git a/common/board_f.c b/common/board_f.c
index 9f441c44f1..f42c062602 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -206,6 +206,14 @@  static int print_cpuinfo(void)
 }
 #endif
 
+#if defined(CONFIG_SYS_CPU)
+static int print_archinfo(void)
+{
+	printf("CPU: %s\n", CONFIG_SYS_CPU);
+	return 0;
+}
+#endif
+
 static int announce_dram_init(void)
 {
 	puts("DRAM:  ");
@@ -880,6 +888,9 @@  static const init_fnc_t init_sequence_f[] = {
 #endif
 #if defined(CONFIG_VID) && !defined(CONFIG_SPL)
 	init_func_vid,
+#endif
+#if defined(CONFIG_SYS_CPU)
+	print_archinfo,
 #endif
 	announce_dram_init,
 	dram_init,		/* configure available RAM banks */