
Hi Marek,
On 1/12/25 11:34 PM, Marek Vasut wrote:
Move R-Car Gen3 and Gen4 jump_to_image_no_args() into dedicated rcar64-spl.c file. The implementation of jump_to_image_no_args() is identical. No functional change.
Signed-off-by: Marek Vasut marek.vasut+renesas@mailbox.org
This is just factoring code and looks fine to me,
Reviewed-by: Quentin Schulz quentin.schulz@cherry.de
Cc: Adam Ford aford173@gmail.com Cc: Biju Das biju.das.jz@bp.renesas.com Cc: Lad Prabhakar prabhakar.mahadev-lad.rj@bp.renesas.com Cc: Nobuhiro Iwamatsu iwamatsu@nigauri.org Cc: Paul Barker paul.barker.ct@bp.renesas.com Cc: Simon Glass sjg@chromium.org Cc: Tom Rini trini@konsulko.com Cc: u-boot@lists.denx.de
board/renesas/common/Makefile | 4 +++- board/renesas/common/gen3-spl.c | 21 --------------------- board/renesas/common/gen4-spl.c | 17 ----------------- board/renesas/common/rcar64-spl.c | 24 ++++++++++++++++++++++++ 4 files changed, 27 insertions(+), 39 deletions(-) create mode 100644 board/renesas/common/rcar64-spl.c
diff --git a/board/renesas/common/Makefile b/board/renesas/common/Makefile index e6dde3c2597..7a9f3a25440 100644 --- a/board/renesas/common/Makefile +++ b/board/renesas/common/Makefile @@ -15,7 +15,9 @@ endif
# 64 bit SoCs ifdef CONFIG_RCAR_64 -ifndef CONFIG_XPL_BUILD +ifdef CONFIG_XPL_BUILD +obj-y += rcar64-spl.o +else obj-y += rcar64-common.o endif
Wondering if we couldn't use variables to make the Makefile a bit easier on the eye (though not necessarily more readable)?
Something like
ifdef CONFIG_XPL_BUILD SPL_COMMON := spl else SPL_COMMON := common endif
obj-y += rcar64-$(SPL_COMMON).o
Then we could use it for gen3 and gen4 object files as well for example.
I really struggle to parse Makefile/C code when there are a lot of ifdefs especially once they get nested, but maybe that's just me :)
Thanks! Quentin