[U-Boot] [PATCH 4/6] mx6cuboxi: Avoid calling setup_display() from SPL code

Stefano Babic sbabic at denx.de
Sat Sep 23 08:07:46 UTC 2017



On 23/09/2017 04:45, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam at nxp.com>
> 
> There is no need call setup_display() from SPL code, so move it to
> board_init(), which executes only in U-Boot proper.
> 
> Reported-by: Stefano Babic <sbabic at denx.de>
> Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
> ---
>  board/solidrun/mx6cuboxi/mx6cuboxi.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c
> index 1e4da4a..ee9e4f7 100644
> --- a/board/solidrun/mx6cuboxi/mx6cuboxi.c
> +++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c
> @@ -308,13 +308,8 @@ int board_ehci_hcd_init(int port)
>  
>  int board_early_init_f(void)
>  {
> -	int ret = 0;
>  	setup_iomux_uart();
>  
> -#ifdef CONFIG_VIDEO_IPUV3
> -	ret = setup_display();
> -#endif
> -
>  #ifdef CONFIG_CMD_SATA
>  	setup_sata();
>  #endif
> @@ -322,15 +317,21 @@ int board_early_init_f(void)
>  #ifdef CONFIG_USB_EHCI_MX6
>  	setup_usb();
>  #endif
> -	return ret;
> +	return 0;
>  }
>  
>  int board_init(void)
>  {
> +	int ret = 0;
> +
>  	/* address of boot parameters */
>  	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
>  
> -	return 0;
> +#ifdef CONFIG_VIDEO_IPUV3
> +	ret = setup_display();
> +#endif
> +
> +	return ret;
>  }
>  
>  static bool is_hummingboard(void)
> 

Reviewed-by: Stefano Babic <sbabic at denx.de>

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list