[PATCH 4/5] dm: Avoid initing built-in devices when chain loading

Bin Meng bmeng.cn at gmail.com
Mon Feb 3 12:17:42 CET 2020


Hi Simon,

On Sun, Dec 22, 2019 at 12:13 AM Simon Glass <sjg at chromium.org> wrote:
>
> When U-Boot is not the first-stage bootloader we don't want to init
> devices early during boot. Add a check to avoid this.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  common/board_r.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/common/board_r.c b/common/board_r.c
> index e711de64b5..4e0dfac4fc 100644
> --- a/common/board_r.c
> +++ b/common/board_r.c
> @@ -320,6 +320,9 @@ static int initr_dm_devices(void)
>  {
>         int ret;
>
> +       if (!ll_boot_init())
> +               return 0;
> +

I can't think of a reason why dm_timer_init() cannot be called in this case.

>         if (IS_ENABLED(CONFIG_TIMER_EARLY)) {
>                 ret = dm_timer_init();
>                 if (ret)
> --

Regards,
Bin


More information about the U-Boot mailing list