[PATCH 8/8] arm64: renesas: Deduplicate R-Car Gen3 and Gen4 SPL
Quentin Schulz
quentin.schulz at cherry.de
Wed Jan 15 11:34:44 CET 2025
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 at mailbox.org>
This is just factoring code and looks fine to me,
Reviewed-by: Quentin Schulz <quentin.schulz at cherry.de>
> ---
> Cc: Adam Ford <aford173 at gmail.com>
> Cc: Biju Das <biju.das.jz at bp.renesas.com>
> Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj at bp.renesas.com>
> Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
> Cc: Paul Barker <paul.barker.ct at bp.renesas.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: u-boot at 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
More information about the U-Boot
mailing list