* [PATCH] renesas: rcar: Apply ATF overlay for reserved-memory
@ 2022-12-06 15:34 Detlev Casanova
2022-12-06 15:41 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Detlev Casanova @ 2022-12-06 15:34 UTC (permalink / raw)
To: u-boot; +Cc: Geert Uytterhoeven, Detlev Casanova
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@collabora.com>
---
board/renesas/rcar-common/common.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/board/renesas/rcar-common/common.c b/board/renesas/rcar-common/common.c
index daa1beb14f..6eaa0d1a65 100644
--- 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@ee200000"
-int fdtdec_board_setup(const void *fdt_blob)
+void apply_atf_overlay(void *fdt_blob)
{
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);
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] renesas: rcar: Apply ATF overlay for reserved-memory
2022-12-06 15:34 [PATCH] renesas: rcar: Apply ATF overlay for reserved-memory Detlev Casanova
@ 2022-12-06 15:41 ` Geert Uytterhoeven
2022-12-06 16:06 ` [PATCH v2] " Detlev Casanova
0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2022-12-06 15:41 UTC (permalink / raw)
To: Detlev Casanova; +Cc: u-boot
Hi Detlev,
On Tue, Dec 6, 2022 at 4:35 PM Detlev Casanova
<detlev.casanova@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@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@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@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
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH v2] renesas: rcar: Apply ATF overlay for reserved-memory
2022-12-06 15:41 ` Geert Uytterhoeven
@ 2022-12-06 16:06 ` Detlev Casanova
2023-03-23 15:29 ` Detlev Casanova
0 siblings, 1 reply; 4+ messages in thread
From: Detlev Casanova @ 2022-12-06 16:06 UTC (permalink / raw)
To: u-boot; +Cc: Geert Uytterhoeven, Detlev Casanova
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@collabora.com>
---
board/renesas/rcar-common/common.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/board/renesas/rcar-common/common.c b/board/renesas/rcar-common/common.c
index daa1beb14f..c50d09ef8b 100644
--- a/board/renesas/rcar-common/common.c
+++ b/board/renesas/rcar-common/common.c
@@ -25,16 +25,6 @@ extern u64 rcar_atf_boot_args[];
#define FDT_RPC_PATH "/soc/spi@ee200000"
-int fdtdec_board_setup(const void *fdt_blob)
-{
- 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;
-}
-
int dram_init(void)
{
return fdtdec_setup_mem_size_base();
@@ -48,6 +38,14 @@ int dram_init_banksize(void)
}
#if defined(CONFIG_OF_BOARD_SETUP)
+static void apply_atf_overlay(void *fdt_blob)
+{
+ void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
+
+ if (fdt_magic(atf_fdt_blob) == FDT_MAGIC)
+ fdt_overlay_apply_node(fdt_blob, 0, atf_fdt_blob, 0);
+}
+
static int is_mem_overlap(void *blob, int first_mem_node, int curr_mem_node)
{
struct fdt_resource first_mem_res, curr_mem_res;
@@ -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);
--
2.38.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] renesas: rcar: Apply ATF overlay for reserved-memory
2022-12-06 16:06 ` [PATCH v2] " Detlev Casanova
@ 2023-03-23 15:29 ` Detlev Casanova
0 siblings, 0 replies; 4+ messages in thread
From: Detlev Casanova @ 2023-03-23 15:29 UTC (permalink / raw)
To: u-boot; +Cc: Geert Uytterhoeven
Hi! !
Just bumping up this patch.
On Tuesday, December 6, 2022 11:06:48 A.M. EDT Detlev Casanova 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@collabora.com>
> ---
> board/renesas/rcar-common/common.c | 19 +++++++++----------
> 1 file changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/board/renesas/rcar-common/common.c
> b/board/renesas/rcar-common/common.c index daa1beb14f..c50d09ef8b 100644
> --- a/board/renesas/rcar-common/common.c
> +++ b/board/renesas/rcar-common/common.c
> @@ -25,16 +25,6 @@ extern u64 rcar_atf_boot_args[];
>
> #define FDT_RPC_PATH "/soc/spi@ee200000"
>
> -int fdtdec_board_setup(const void *fdt_blob)
> -{
> - 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;
> -}
> -
> int dram_init(void)
> {
> return fdtdec_setup_mem_size_base();
> @@ -48,6 +38,14 @@ int dram_init_banksize(void)
> }
>
> #if defined(CONFIG_OF_BOARD_SETUP)
> +static void apply_atf_overlay(void *fdt_blob)
> +{
> + void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
> +
> + if (fdt_magic(atf_fdt_blob) == FDT_MAGIC)
> + fdt_overlay_apply_node(fdt_blob, 0, atf_fdt_blob, 0);
> +}
> +
> static int is_mem_overlap(void *blob, int first_mem_node, int
> curr_mem_node) {
> struct fdt_resource first_mem_res, curr_mem_res;
> @@ -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);
Regards,
Detlev.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-23 15:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06 15:34 [PATCH] renesas: rcar: Apply ATF overlay for reserved-memory Detlev Casanova
2022-12-06 15:41 ` Geert Uytterhoeven
2022-12-06 16:06 ` [PATCH v2] " Detlev Casanova
2023-03-23 15:29 ` Detlev Casanova
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox