From mboxrd@z Thu Jan 1 00:00:00 1970 From: Przemyslaw Marczak Date: Fri, 04 Sep 2015 17:04:22 +0200 Subject: [U-Boot] [PATCH 1/7] s5p: cpu_info: use defined CPU name if available In-Reply-To: References: <1440770374-11501-1-git-send-email-p.marczak@samsung.com> <1440770374-11501-2-git-send-email-p.marczak@samsung.com> Message-ID: <55E9B2F6.4010709@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Simon, On 09/01/2015 02:33 AM, Simon Glass wrote: > Hi Przemyslaw, > > On 28 August 2015 at 07:59, Przemyslaw Marczak wrote: >> The CPU name for Exynos was concatenated with cpu id, >> but for new Exynos platforms, like Chromebook Peach Pi >> based on Exynos5800, the name of SoC variant does not >> include the real SoC cpu id (0x5422). >> >> For such case, the CPU name should be defined by the >> config file. >> >> This commit introduces new config: >> - CONFIG_CPU_NAME - with cpu name string >> >> If defined, then the cpu id is not printed. >> >> Signed-off-by: Przemyslaw Marczak >> --- >> arch/arm/cpu/armv7/s5p-common/cpu_info.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/arch/arm/cpu/armv7/s5p-common/cpu_info.c b/arch/arm/cpu/armv7/s5p-common/cpu_info.c >> index 154d674..9b125a3 100644 >> --- a/arch/arm/cpu/armv7/s5p-common/cpu_info.c >> +++ b/arch/arm/cpu/armv7/s5p-common/cpu_info.c >> @@ -30,7 +30,12 @@ u32 get_device_type(void) >> #ifdef CONFIG_DISPLAY_CPUINFO >> int print_cpuinfo(void) >> { >> +/* For SoC with no real CPU ID in naming convention. */ >> +#ifdef CONFIG_CPU_NAME >> + printf("CPU: %s @ ", CONFIG_CPU_NAME); >> +#else >> printf("CPU: %s%X @ ", s5p_get_cpu_name(), s5p_cpu_id); >> +#endif > > This adds a new CONFIG option - we should be trying to keep the code > common. Does it print 5422 instead of 5800? Yes, it does. > > I'd suggest, either: > > a) we don't care, 5422 is fine > b) we grab it from the device tree model or compatible string > Ok, the second one seem to be good. >> print_freq(get_arm_clk(), "\n"); >> >> return 0; >> -- >> 1.9.1 >> > > Regards, > Simon > Best regards, -- Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com