[PATCH] renesas: rcar: Apply ATF overlay for reserved-memory

Geert Uytterhoeven geert at linux-m68k.org
Tue Dec 6 16:41:14 CET 2022


Hi Detlev,

On Tue, Dec 6, 2022 at 4:35 PM Detlev Casanova
<detlev.casanova at collabora.com> wrote:
> The function fdtdec_board_setup() is only called by fdtdec_setup() which
> needs to be called by the board file.
>
> This is not the case for the renesas boards so rename the
> fdtdec_board_setup() function to a local name and call it directly from
> ft_board_setup(), before cleaning up the memory nodes.
>
> Signed-off-by: Detlev Casanova <detlev.casanova at collabora.com>

Thanks for your patch!

> --- a/board/renesas/rcar-common/common.c
> +++ b/board/renesas/rcar-common/common.c
> @@ -25,14 +25,12 @@ extern u64 rcar_atf_boot_args[];
>
>  #define FDT_RPC_PATH   "/soc/spi at ee200000"
>
> -int fdtdec_board_setup(const void *fdt_blob)
> +void apply_atf_overlay(void *fdt_blob)

static?

>  {
>         void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
>
>         if (fdt_magic(atf_fdt_blob) == FDT_MAGIC)
> -               fdt_overlay_apply_node((void *)fdt_blob, 0, atf_fdt_blob, 0);
> -
> -       return 0;
> +               fdt_overlay_apply_node(fdt_blob, 0, atf_fdt_blob, 0);
>  }
>
>  int dram_init(void)
> @@ -159,6 +157,7 @@ static void update_rpc_status(void *blob)
>
>  int ft_board_setup(void *blob, struct bd_info *bd)
>  {
> +       apply_atf_overlay(blob);
>         scrub_duplicate_memory(blob);
>         update_rpc_status(blob);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


More information about the U-Boot mailing list