diff mbox series

[U-Boot,1/2] rockchip: Fix TPL build without CONFIG_TPL_SERIAL_SUPPORT

Message ID 20190719132310.GB20880@arachsys.com
State Accepted
Commit 58fcb03e671fbe847a0007171d4d54dad5af8139
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
If CONFIG_DEBUG_UART is set but CONFIG_TPL_SERIAL_SUPPORT is not, the
serial output should be available in SPL and full U-Boot, but not built
in TPL. However, the rockchip tpl.c instead fails to compile with
undefined references to the debug UART.

Instead, initialise the debug UART and print the TPL banner only if both
CONFIG_DEBUG_UART and CONFIG_TPL_SERIAL_SUPPORT are set.

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

Comments

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


On 2019/7/19 下午9:23, Chris Webb wrote:
> If CONFIG_DEBUG_UART is set but CONFIG_TPL_SERIAL_SUPPORT is not, the
> serial output should be available in SPL and full U-Boot, but not built
> in TPL. However, the rockchip tpl.c instead fails to compile with
> undefined references to the debug UART.
>
> Instead, initialise the debug UART and print the TPL banner only if both
> CONFIG_DEBUG_UART and CONFIG_TPL_SERIAL_SUPPORT are set.
>
> 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, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c
> index 0ff2a197ed..5df88bddeb 100644
> --- a/arch/arm/mach-rockchip/tpl.c
> +++ b/arch/arm/mach-rockchip/tpl.c
> @@ -44,7 +44,7 @@ void board_init_f(ulong dummy)
>   	struct udevice *dev;
>   	int ret;
>   
> -#ifdef CONFIG_DEBUG_UART
> +#if defined(CONFIG_DEBUG_UART) && defined(CONFIG_TPL_SERIAL_SUPPORT)
>   	/*
>   	 * Debug UART can be used from here if required:
>   	 *
>
Kever Yang July 23, 2019, 8:02 a.m. UTC | #2
On 2019/7/21 上午11:30, Kever Yang wrote:
> Hi Chris,
>
>
> On 2019/7/19 下午9:23, Chris Webb wrote:
>> If CONFIG_DEBUG_UART is set but CONFIG_TPL_SERIAL_SUPPORT is not, the
>> serial output should be available in SPL and full U-Boot, but not built
>> in TPL. However, the rockchip tpl.c instead fails to compile with
>> undefined references to the debug UART.
>>
>> Instead, initialise the debug UART and print the TPL banner only if both
>> CONFIG_DEBUG_UART and CONFIG_TPL_SERIAL_SUPPORT are set.
>>
>> 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, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c
>> index 0ff2a197ed..5df88bddeb 100644
>> --- a/arch/arm/mach-rockchip/tpl.c
>> +++ b/arch/arm/mach-rockchip/tpl.c
>> @@ -44,7 +44,7 @@ void board_init_f(ulong dummy)
>>       struct udevice *dev;
>>       int ret;
>>   -#ifdef CONFIG_DEBUG_UART
>> +#if defined(CONFIG_DEBUG_UART) && defined(CONFIG_TPL_SERIAL_SUPPORT)
>>       /*
>>        * Debug UART can be used from here if required:
>>        *
>>
>
>
> _______________________________________________
> 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 0ff2a197ed..5df88bddeb 100644
--- a/arch/arm/mach-rockchip/tpl.c
+++ b/arch/arm/mach-rockchip/tpl.c
@@ -44,7 +44,7 @@  void board_init_f(ulong dummy)
 	struct udevice *dev;
 	int ret;
 
-#ifdef CONFIG_DEBUG_UART
+#if defined(CONFIG_DEBUG_UART) && defined(CONFIG_TPL_SERIAL_SUPPORT)
 	/*
 	 * Debug UART can be used from here if required:
 	 *