]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sh: r2dplus: Enable OF control
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Sat, 31 Aug 2019 16:27:58 +0000 (18:27 +0200)
committerMarek Vasut <marex@denx.de>
Mon, 2 Sep 2019 15:38:43 +0000 (17:38 +0200)
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@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
arch/Kconfig
arch/sh/dts/Makefile [new file with mode: 0644]
arch/sh/dts/sh7751-r2dplus.dts [new file with mode: 0644]
arch/sh/include/asm/config.h
configs/r2dplus_defconfig

index f4ada57909abb37058a02ceb746288ea25fae13b..141e48bc439f87a04d0960d2f503c3a2d22eea00 100644 (file)
@@ -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 (file)
index 0000000..e423bfd
--- /dev/null
@@ -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 (file)
index 0000000..2d291bf
--- /dev/null
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the SH7751 R2Dplus
+ *
+ * Copyright (C) 2019 Marek Vasut <marek.vasut@gmail.com>
+ */
+
+/dts-v1/;
+/ {
+       model = "R2D";
+       compatible = "renesas,r2d", "renesas,sh7751";
+};
index 406156dff51d612ba30d43a68b2c0e12ed33085e..e1cd322152a62ed7fbcc8eb8c72093e0712b7c9d 100644 (file)
@@ -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 */
index 43bf97cb7718680c02862f6c08bcb78aba650141..51a8587b61a2d3db8ef8cd2b80caa805b7cb667b 100644 (file)
@@ -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