diff mbox series

[U-Boot,2/2] rockchip: TPL banner should depend on CONFIG_TPL_BANNER_PRINT

Message ID 20190719132355.GC20880@arachsys.com
State Accepted
Commit 89e39172301f15b29f663baf704bf2163a0cfa46
Delegated to: Kever Yang
Headers show
Series rockchip: tpl.c #ifdef fixes | expand

Commit Message

Chris Webb July 19, 2019, 1:23 p.m. UTC
The generic code in common/spl/spl.c allows TPL/SPL banners to be
silenced by unsetting CONFIG_TPL_BANNER_PRINT or CONFIG_SPL_BANNER_PRINT
respectively. However, arch/arm/mach-rockchip/tpl.c prints this banner
unconditionally.

Fix the rockchip-specific tpl.c so that the TPL banner depends on
CONFIG_TPL_BANNER_PRINT in the same way as the generic code.

Signed-off-by: <chris@arachsys.com>
---
 arch/arm/mach-rockchip/tpl.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Kever Yang July 21, 2019, 3:30 a.m. UTC | #1
Hi Chris,


On 2019/7/19 下午9:23, Chris Webb wrote:
> The generic code in common/spl/spl.c allows TPL/SPL banners to be
> silenced by unsetting CONFIG_TPL_BANNER_PRINT or CONFIG_SPL_BANNER_PRINT
> respectively. However, arch/arm/mach-rockchip/tpl.c prints this banner
> unconditionally.
>
> Fix the rockchip-specific tpl.c so that the TPL banner depends on
> CONFIG_TPL_BANNER_PRINT in the same way as the generic code.
>
> Signed-off-by: <chris@arachsys.com>


Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>

Thanks,
  - Kever

> ---
>   arch/arm/mach-rockchip/tpl.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c
> index 5df88bddeb..55f6e922d0 100644
> --- a/arch/arm/mach-rockchip/tpl.c
> +++ b/arch/arm/mach-rockchip/tpl.c
> @@ -54,8 +54,10 @@ void board_init_f(ulong dummy)
>   	 * printascii("string");
>   	 */
>   	debug_uart_init();
> +#ifdef CONFIG_TPL_BANNER_PRINT
>   	printascii("\nU-Boot TPL " PLAIN_VERSION " (" U_BOOT_DATE " - " \
>   				U_BOOT_TIME ")\n");
> +#endif
>   #endif
>   	ret = spl_early_init();
>   	if (ret) {
>
Kever Yang July 23, 2019, 8:03 a.m. UTC | #2
On 2019/7/21 上午11:30, Kever Yang wrote:
> Hi Chris,
>
>
> On 2019/7/19 下午9:23, Chris Webb wrote:
>> The generic code in common/spl/spl.c allows TPL/SPL banners to be
>> silenced by unsetting CONFIG_TPL_BANNER_PRINT or CONFIG_SPL_BANNER_PRINT
>> respectively. However, arch/arm/mach-rockchip/tpl.c prints this banner
>> unconditionally.
>>
>> Fix the rockchip-specific tpl.c so that the TPL banner depends on
>> CONFIG_TPL_BANNER_PRINT in the same way as the generic code.
>>
>> Signed-off-by: <chris@arachsys.com>
>

Applied to u-boot-rockchip, thanks!
>
> Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>
>
> Thanks,
>  - Kever
>
>> ---
>>   arch/arm/mach-rockchip/tpl.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c
>> index 5df88bddeb..55f6e922d0 100644
>> --- a/arch/arm/mach-rockchip/tpl.c
>> +++ b/arch/arm/mach-rockchip/tpl.c
>> @@ -54,8 +54,10 @@ void board_init_f(ulong dummy)
>>        * printascii("string");
>>        */
>>       debug_uart_init();
>> +#ifdef CONFIG_TPL_BANNER_PRINT
>>       printascii("\nU-Boot TPL " PLAIN_VERSION " (" U_BOOT_DATE " - " \
>>                   U_BOOT_TIME ")\n");
>> +#endif
>>   #endif
>>       ret = spl_early_init();
>>       if (ret) {
>>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
diff mbox series

Patch

diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c
index 5df88bddeb..55f6e922d0 100644
--- a/arch/arm/mach-rockchip/tpl.c
+++ b/arch/arm/mach-rockchip/tpl.c
@@ -54,8 +54,10 @@  void board_init_f(ulong dummy)
 	 * printascii("string");
 	 */
 	debug_uart_init();
+#ifdef CONFIG_TPL_BANNER_PRINT
 	printascii("\nU-Boot TPL " PLAIN_VERSION " (" U_BOOT_DATE " - " \
 				U_BOOT_TIME ")\n");
+#endif
 #endif
 	ret = spl_early_init();
 	if (ret) {