For now we won't want to mess with the existing configurations. Create a
new one which will enable device tree and driver model. Note that this
brings the device tree binary into u-boot-sunxi-with-spl.bin.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 Makefile                                  | 3 ++-
 arch/arm/dts/Makefile                     | 1 +
 board/sunxi/MAINTAINERS                   | 1 +
 configs/Linksprite_pcDuino3_fdt_defconfig | 8 ++++++++
 include/configs/sun7i.h                   | 4 ++++
 5 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 configs/Linksprite_pcDuino3_fdt_defconfig

diff --git a/Makefile b/Makefile
index 6221113..85b90b7 100644
--- a/Makefile
+++ b/Makefile
@@ -941,7 +941,8 @@ u-boot-nand.gph: u-boot.bin FORCE
 ifneq ($(CONFIG_SUNXI),)
 OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \
                                   --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff
-u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img FORCE
+u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin \
+                       u-boot$(if $(CONFIG_OF_CONTROL),-dtb,).img FORCE
        $(call if_changed,pad_cat)
 endif
 
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 3299817..564eb76 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1,3 +1,4 @@
+dtb-$(CONFIG_SUN7I) +=  sun7i-a20-pcduino3.dtb
 dtb-$(CONFIG_S5PC100) += s5pc1xx-smdkc100.dtb
 dtb-$(CONFIG_S5PC110) += s5pc1xx-goni.dtb
 dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS
index 4f32195..3dbfe15 100644
--- a/board/sunxi/MAINTAINERS
+++ b/board/sunxi/MAINTAINERS
@@ -21,6 +21,7 @@ F:    configs/A20-OLinuXino_MICRO_defconfig
 F:     configs/Bananapi_defconfig
 F:     configs/i12-tvbox_defconfig
 F:     configs/Linksprite_pcDuino3_defconfig
+F:     configs/Linksprite_pcDuino3_fdt_defconfig
 F:     configs/qt840a_defconfig
 
 CUBIEBOARD2 BOARD
diff --git a/configs/Linksprite_pcDuino3_fdt_defconfig 
b/configs/Linksprite_pcDuino3_fdt_defconfig
new file mode 100644
index 0000000..e5f6236
--- /dev/null
+++ b/configs/Linksprite_pcDuino3_fdt_defconfig
@@ -0,0 +1,8 @@
+CONFIG_SPL=y
+CONFIG_SYS_EXTRA_OPTIONS="PCDUINO3,AXP209_POWER,SUNXI_GMAC,AHCI,SATAPWR=SUNXI_GPH(2),USB_EHCI,DM"
+CONFIG_FDTFILE="sun7i-a20-pcduino3.dtb"
+CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-pcduino3"
+CONFIG_OF_CONTROL=y
+CONFIG_OF_SEPARATE=y
++S:CONFIG_ARM=y
++S:CONFIG_TARGET_SUN7I=y
diff --git a/include/configs/sun7i.h b/include/configs/sun7i.h
index a902b84..500d0e3 100644
--- a/include/configs/sun7i.h
+++ b/include/configs/sun7i.h
@@ -36,6 +36,10 @@
 #define CONFIG_ARMV7_SECURE_BASE       SUNXI_SRAM_B_BASE
 #define CONFIG_SYS_CLK_FREQ            24000000
 
+#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_DM)
+# define CONFIG_CMD_DM
+#endif
+
 /*
  * Include common sunxi configuration where most the settings are
  */
-- 
2.1.0.rc2.206.gedb03e5

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to