diff mbox series

[v4,15/17] common/board_r: Remove initr_serial wrapper

Message ID 20200724111225.12513-15-ovidiu.panait@windriver.com
State Accepted
Commit bf2fb81ad363e63b4695104a2cf554de9e4f141a
Delegated to: Tom Rini
Headers show
Series [v4,01/17] Kconfig: Introduce CONFIG_SYS_HAS_SRAM | expand

Commit Message

Ovidiu Panait July 24, 2020, 11:12 a.m. UTC
Remove the initr_serial->serial_initialize indirection and call
serial_initialize directly.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
---

 common/board_r.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Tom Rini Aug. 7, 2020, 2:16 a.m. UTC | #1
On Fri, Jul 24, 2020 at 02:12:23PM +0300, Ovidiu Panait wrote:

> Remove the initr_serial->serial_initialize indirection and call
> serial_initialize directly.
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>

Applied to u-boot/master, thanks!
Sean Anderson Aug. 14, 2020, 1:50 a.m. UTC | #2
On 7/24/20 7:12 AM, Ovidiu Panait wrote:
> Remove the initr_serial->serial_initialize indirection and call
> serial_initialize directly.
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
> ---
> 
>  common/board_r.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/common/board_r.c b/common/board_r.c
> index 67dc25c7d2..79772135a4 100644
> --- a/common/board_r.c
> +++ b/common/board_r.c
> @@ -187,12 +187,6 @@ static int initr_reloc_global_data(void)
>  	return 0;
>  }
>  
> -static int initr_serial(void)
> -{
> -	serial_initialize();
> -	return 0;
> -}
> -
>  #if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_MIPS)
>  static int initr_trap(void)
>  {
> @@ -705,7 +699,7 @@ static init_fnc_t init_sequence_r[] = {
>  #endif
>  	initr_dm_devices,
>  	stdio_init_tables,
> -	initr_serial,
> +	serial_initialize,
>  	initr_announce,
>  #if CONFIG_IS_ENABLED(WDT)
>  	initr_watchdog,
> 

This commit breaks my patch series [1]. I suspect it is the previous
patch which does the breaking. Here are two versions of my series,
with the only difference being that one is applied before this patch and
the other after [2, 3]. As a few additional notes, this patch does *not*
break booting without my series applied. In addition, setting
CONFIG_LOGLEVEL to 5 or higher causes the board to start booting again.

I am pretty confused by all this, as I never directly touch any serial
code in my series. Further, I have no idea why it would start working
again just by changing the loglevel.

--Sean

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=185489
[2] https://github.com/Forty-Bot/u-boot/tree/maix_gpio_good
[2] https://github.com/Forty-Bot/u-boot/tree/maix_gpio_bad
Sean Anderson Aug. 14, 2020, 1:54 a.m. UTC | #3
On 8/13/20 9:50 PM, Sean Anderson wrote:
> On 7/24/20 7:12 AM, Ovidiu Panait wrote:
>> Remove the initr_serial->serial_initialize indirection and call
>> serial_initialize directly.
>>
>> Reviewed-by: Simon Glass <sjg@chromium.org>
>> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
>> ---
>>
>>  common/board_r.c | 8 +-------
>>  1 file changed, 1 insertion(+), 7 deletions(-)
>>
>> diff --git a/common/board_r.c b/common/board_r.c
>> index 67dc25c7d2..79772135a4 100644
>> --- a/common/board_r.c
>> +++ b/common/board_r.c
>> @@ -187,12 +187,6 @@ static int initr_reloc_global_data(void)
>>  	return 0;
>>  }
>>  
>> -static int initr_serial(void)
>> -{
>> -	serial_initialize();
>> -	return 0;
>> -}
>> -
>>  #if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_MIPS)
>>  static int initr_trap(void)
>>  {
>> @@ -705,7 +699,7 @@ static init_fnc_t init_sequence_r[] = {
>>  #endif
>>  	initr_dm_devices,
>>  	stdio_init_tables,
>> -	initr_serial,
>> +	serial_initialize,
>>  	initr_announce,
>>  #if CONFIG_IS_ENABLED(WDT)
>>  	initr_watchdog,
>>
> 
> This commit breaks my patch series [1]. I suspect it is the previous
> patch which does the breaking. Here are two versions of my series,
> with the only difference being that one is applied before this patch and
> the other after [2, 3]. As a few additional notes, this patch does *not*
> break booting without my series applied. In addition, setting
> CONFIG_LOGLEVEL to 5 or higher causes the board to start booting again.
> 
> I am pretty confused by all this, as I never directly touch any serial
> code in my series. Further, I have no idea why it would start working
> again just by changing the loglevel.
> 
> --Sean
> 
> [1] https://patchwork.ozlabs.org/project/uboot/list/?series=185489
> [2] https://github.com/Forty-Bot/u-boot/tree/maix_gpio_good
> [2] https://github.com/Forty-Bot/u-boot/tree/maix_gpio_bad
> 

+Heinrich can you verify this behavior?

--Sean
diff mbox series

Patch

diff --git a/common/board_r.c b/common/board_r.c
index 67dc25c7d2..79772135a4 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -187,12 +187,6 @@  static int initr_reloc_global_data(void)
 	return 0;
 }
 
-static int initr_serial(void)
-{
-	serial_initialize();
-	return 0;
-}
-
 #if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_MIPS)
 static int initr_trap(void)
 {
@@ -705,7 +699,7 @@  static init_fnc_t init_sequence_r[] = {
 #endif
 	initr_dm_devices,
 	stdio_init_tables,
-	initr_serial,
+	serial_initialize,
 	initr_announce,
 #if CONFIG_IS_ENABLED(WDT)
 	initr_watchdog,