summaryrefslogtreecommitdiff
path: root/board/renesas/common
diff options
context:
space:
mode:
Diffstat (limited to 'board/renesas/common')
-rw-r--r--board/renesas/common/Makefile47
-rw-r--r--board/renesas/common/common.c4
-rw-r--r--board/renesas/common/gen3-common.c3
3 files changed, 47 insertions, 7 deletions
diff --git a/board/renesas/common/Makefile b/board/renesas/common/Makefile
index e69de29bb2d..c531738b22e 100644
--- a/board/renesas/common/Makefile
+++ b/board/renesas/common/Makefile
@@ -0,0 +1,47 @@
+#
+# 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
diff --git a/board/renesas/common/common.c b/board/renesas/common/common.c
index 7fba8d10ff5..74ec0a46e6f 100644
--- a/board/renesas/common/common.c
+++ b/board/renesas/common/common.c
@@ -18,8 +18,6 @@
#include <asm/system.h>
#include <linux/libfdt.h>
-#ifdef CONFIG_RCAR_64
-
DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
@@ -67,5 +65,3 @@ int __weak board_init(void)
{
return 0;
}
-
-#endif
diff --git a/board/renesas/common/gen3-common.c b/board/renesas/common/gen3-common.c
index 05b01c846c6..94da00985d3 100644
--- a/board/renesas/common/gen3-common.c
+++ b/board/renesas/common/gen3-common.c
@@ -18,8 +18,6 @@
#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. */
@@ -178,4 +176,3 @@ int ft_board_setup(void *blob, struct bd_info *bd)
return 0;
}
#endif
-#endif