+#
+# board/renesas/whitehawk/Makefile
+#
+# Copyright (C) 2024 Marek Vasut <marek.vasut+renesas@mailbox.org>
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+# R-Car SoCs
+ifndef CONFIG_RZG2L
+
+# 32 bit SoCs
+ifdef CONFIG_RCAR_32
+ifdef CONFIG_RCAR_GEN2
+endif
+endif
+
+# 64 bit SoCs
+ifdef CONFIG_RCAR_64
+ifndef CONFIG_XPL_BUILD
+obj-y += common.o
+endif
+
+ifdef CONFIG_RCAR_GEN3
+ifdef CONFIG_XPL_BUILD
+obj-y += gen3-spl.o
+else
+obj-y += gen3-common.o
+ifdef CONFIG_R8A77970
+obj-y += v3-common.o
+endif
+ifdef CONFIG_R8A77980
+obj-y += v3-common.o
+endif
+endif
+endif
+
+ifdef CONFIG_RCAR_GEN4
+ifdef CONFIG_XPL_BUILD
+obj-y += gen4-spl.o
+else
+obj-y += gen4-common.o
+endif
+endif
+endif
+
+endif
#include <asm/system.h>
#include <linux/libfdt.h>
-#ifdef CONFIG_RCAR_64
-
DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
{
return 0;
}
-
-#endif
#include <asm/arch/renesas.h>
#include <linux/libfdt.h>
-#ifdef CONFIG_RCAR_64
-
DECLARE_GLOBAL_DATA_PTR;
/* If the firmware passed a device tree use it for e.g. U-Boot DRAM setup. */
return 0;
}
#endif
-#endif
+++ /dev/null
-#
-# board/renesas/condor/Makefile
-#
-# Copyright (C) 2019 Renesas Electronics Corporation
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-ifdef CONFIG_XPL_BUILD
-obj-y := ../common/gen3-spl.o
-else
-obj-y := ../common/gen3-common.o ../common/common.o
-endif
# SPDX-License-Identifier: GPL-2.0+
#
-ifdef CONFIG_XPL_BUILD
-obj-y := ../common/gen3-spl.o
-else
-obj-y := draak.o ../common/gen3-common.o ../common/common.o
+ifndef CONFIG_XPL_BUILD
+obj-y += draak.o
endif
+++ /dev/null
-#
-# board/renesas/eagle/Makefile
-#
-# Copyright (C) 2015 Renesas Electronics Corporation
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-ifdef CONFIG_XPL_BUILD
-obj-y := ../common/gen3-spl.o
-else
-obj-y := ../common/v3-common.o ../common/gen3-common.o ../common/common.o
-endif
+++ /dev/null
-#
-# board/renesas/ebisu/Makefile
-#
-# Copyright (C) 2018 Renesas Electronics Corporation
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-ifdef CONFIG_XPL_BUILD
-obj-y := ../common/gen3-spl.o
-else
-obj-y := ../common/gen3-common.o ../common/common.o
-endif
+++ /dev/null
-#
-# board/renesas/falcon/Makefile
-#
-# Copyright (C) 2020 Renesas Electronics Corp.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-ifndef CONFIG_XPL_BUILD
-obj-y := ../common/gen4-common.o ../common/common.o
-endif
+++ /dev/null
-#
-# board/renesas/grayhawk/Makefile
-#
-# Copyright (C) 2023 Renesas Electronics Corp.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-obj-y := ../common/gen4-common.o ../common/common.o
# SPDX-License-Identifier: GPL-2.0+
#
-ifdef CONFIG_XPL_BUILD
-obj-y := ../common/gen3-spl.o
-else
-obj-y := salvator-x.o ../common/gen3-common.o ../common/common.o
+ifndef CONFIG_XPL_BUILD
+obj-y += salvator-x.o
endif
+++ /dev/null
-#
-# board/renesas/spider/Makefile
-#
-# Copyright (C) 2020 Renesas Electronics Corp.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-obj-y := ../common/gen4-common.o ../common/common.o
# SPDX-License-Identifier: GPL-2.0+
#
-ifdef CONFIG_XPL_BUILD
-obj-y := ../common/gen3-spl.o
-else
-obj-y := ulcb.o cpld.o ../common/gen3-common.o ../common/common.o
+ifndef CONFIG_XPL_BUILD
+obj-y += ulcb.o cpld.o
endif
# SPDX-License-Identifier: GPL-2.0+
#
-ifdef CONFIG_XPL_BUILD
-obj-y := ../common/gen3-spl.o
-else
-obj-y := ../common/v3-common.o ../common/gen3-common.o ../common/common.o
+ifndef CONFIG_XPL_BUILD
obj-$(CONFIG_SYSRESET) += cpld.o
endif
# SPDX-License-Identifier: GPL-2.0+
#
-ifdef CONFIG_XPL_BUILD
-obj-y := ../common/gen3-spl.o
-else
-obj-y := ../common/v3-common.o ../common/gen3-common.o ../common/common.o
+ifndef CONFIG_XPL_BUILD
obj-$(CONFIG_SYSRESET) += cpld.o
endif
+++ /dev/null
-#
-# board/renesas/whitehawk/Makefile
-#
-# Copyright (C) 2021 Renesas Electronics Corp.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-ifdef CONFIG_SPL_BUILD
-obj-y := ../common/gen4-spl.o
-else
-obj-y := ../common/gen4-common.o ../common/common.o
-endif