[PATCH 03/18] common: board_f: Move setup_machine code to setup_bdinfo

Simon Glass sjg at chromium.org
Wed Nov 18 15:37:23 CET 2020


Hi Ovidiu,

On Tue, 17 Nov 2020 at 01:00, Ovidiu Panait <ovidiu.panait at windriver.com> wrote:
>
> Hi Simon,
>
> On 14.11.2020 17:17, Simon Glass wrote:
> > [Please note this e-mail is from an EXTERNAL e-mail address]
> >
> > Hi Ovidiu
> >
> > On Thu, 5 Nov 2020 at 03:10, Ovidiu Panait <ovidiu.panait at windriver.com> wrote:
> >> setup_bdinfo is used to populate various bdinfo fields, so move
> >> setup_machine code there, as all it does is setting
> >> gd->bd->bi_arch_number.
> > But you are moving it to reserve_global_data() aren't you? I don't
> > like the sound of that.
>
> reserve_global_data() is part of context of the previous diff:
>
> @@ -503,14 +503,6 @@ static int reserve_board(void)
>          return 0;
>   }
>
> -static int setup_machine(void)
> -{
> -#ifdef CONFIG_MACH_TYPE
> -       gd->bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
> -#endif
> -       return 0;
> -}
> -
>   static int reserve_global_data(void)
>   {
>          gd->start_addr_sp = reserve_stack_aligned(sizeof(gd_t));
>
>
> setup_machine() contents get moved to setup_bdinfo() in the next diff:
>
> @@ -605,6 +597,10 @@ int setup_bdinfo(void)
>                  bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;  /* size  of SRAM */
>          }
>
> +#ifdef CONFIG_MACH_TYPE
> +       bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
> +#endif
> +
>          return arch_setup_bdinfo();
>   }

OK thanks. I misread the diff.

Reviewed-by: Simon Glass <sjg at chromium.org>

Regards,
Simon


More information about the U-Boot mailing list