[U-Boot] [PATCH 2/2] tegra: convert gpio_config_uart to weak	symbol
    Stephen Warren 
    swarren at wwwdotorg.org
       
    Tue Aug  7 19:09:48 CEST 2012
    
    
  
On 08/06/2012 07:18 PM, Lucas Stach wrote:
> Most boards don't need this fixup hook. To avoid a lot of empty
> implementations in board files convert it to a weak symbol.
This seems OK on the surface, but I think there may be more opportunity
for cleanup here.
In board/nvidia/common/board.c, I see both of the following:
board_init:
#ifdef CONFIG_SPI_UART_SWITCH
        gpio_config_uart();
#endif
board_early_init_f:
        /* Initialize periph GPIOs */
        gpio_early_init();
#ifdef CONFIG_SPI_UART_SWITCH
        gpio_early_init_uart();
#else
        gpio_config_uart();
#endif
and in arch/arm/cpu/arm720t/tegra20/spl.c:
board_init_f:
#ifdef CONFIG_SPI_UART_SWITCH
        gpio_early_init_uart();
#else
        gpio_config_uart();
#endif
It sure seems like we don't need to call those two init function all
those times. Perhaps we can clarify which of the functions are actually
needed at all, and when they should be called.
    
    
More information about the U-Boot
mailing list