[U-Boot] [PATCH 3/5] sh: r2dplus: Enable OF control
Marek Vasut
marek.vasut at gmail.com
Sun Sep 1 16:30:39 UTC 2019
Enable OF control for SH4 R2Dplus board. This is necessary, because
the PCI uclass is designed in a way that makes it depend on DT and
disallows instanciating devices without DT (e.g. with platdata).
Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
---
arch/Kconfig | 1 +
arch/sh/dts/Makefile | 12 ++++++++++++
arch/sh/dts/sh7751-r2dplus.dts | 12 ++++++++++++
arch/sh/include/asm/config.h | 2 ++
configs/r2dplus_defconfig | 2 ++
5 files changed, 29 insertions(+)
create mode 100644 arch/sh/dts/Makefile
create mode 100644 arch/sh/dts/sh7751-r2dplus.dts
diff --git a/arch/Kconfig b/arch/Kconfig
index f4ada57909..141e48bc43 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -137,6 +137,7 @@ config SANDBOX
config SH
bool "SuperH architecture"
select HAVE_PRIVATE_LIBGCC
+ select SUPPORT_OF_CONTROL
config X86
bool "x86 architecture"
diff --git a/arch/sh/dts/Makefile b/arch/sh/dts/Makefile
new file mode 100644
index 0000000000..e423bfd566
--- /dev/null
+++ b/arch/sh/dts/Makefile
@@ -0,0 +1,12 @@
+dtb-y += sh7751-r2dplus.dtb
+
+targets += $(dtb-y)
+
+# Add any required device tree compiler flags here
+DTC_FLAGS +=
+
+PHONY += dtbs
+dtbs: $(addprefix $(obj)/, $(dtb-y))
+ @:
+
+clean-files := *.dtb *_HS
diff --git a/arch/sh/dts/sh7751-r2dplus.dts b/arch/sh/dts/sh7751-r2dplus.dts
new file mode 100644
index 0000000000..2d291bf1ee
--- /dev/null
+++ b/arch/sh/dts/sh7751-r2dplus.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the SH7751 R2Dplus
+ *
+ * Copyright (C) 2019 Marek Vasut <marek.vasut at gmail.com>
+ */
+
+/dts-v1/;
+/ {
+ model = "R2D";
+ compatible = "renesas,r2d", "renesas,sh7751";
+};
diff --git a/arch/sh/include/asm/config.h b/arch/sh/include/asm/config.h
index 406156dff5..e1cd322152 100644
--- a/arch/sh/include/asm/config.h
+++ b/arch/sh/include/asm/config.h
@@ -8,6 +8,8 @@
#include <asm/processor.h>
+#define CONFIG_LMB
+
/* Timer */
#define CONFIG_SYS_TIMER_COUNTS_DOWN
#define CONFIG_SYS_TIMER_COUNTER (TMU_BASE + 0xc) /* TCNT0 */
diff --git a/configs/r2dplus_defconfig b/configs/r2dplus_defconfig
index 43bf97cb77..51a8587b61 100644
--- a/configs/r2dplus_defconfig
+++ b/configs/r2dplus_defconfig
@@ -16,6 +16,8 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_DOS_PARTITION=y
+CONFIG_OF_CONTROL=y
+CONFIG_DEFAULT_DEVICE_TREE="sh7751-r2dplus"
CONFIG_ENV_IS_IN_FLASH=y
CONFIG_DM=y
CONFIG_MTD_NOR_FLASH=y
--
2.23.0.rc1
More information about the U-Boot
mailing list