]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-i2c
authorTom Rini <trini@ti.com>
Tue, 6 Aug 2013 13:49:06 +0000 (09:49 -0400)
committerTom Rini <trini@ti.com>
Tue, 6 Aug 2013 13:49:06 +0000 (09:49 -0400)
18 files changed:
.gitignore
Makefile
arch/arm/cpu/armv7/tegra114/config.mk [deleted file]
arch/arm/cpu/armv7/tegra20/config.mk [deleted file]
arch/arm/cpu/armv7/tegra30/config.mk [deleted file]
arch/microblaze/config.mk
arch/x86/cpu/coreboot/config.mk [deleted file]
board/chromebook-x86/dts/link.dts
board/samsung/dts/exynos5250-smdk5250.dts
board/samsung/dts/exynos5250-snow.dts
board/xilinx/dts/microblaze-generic.dts [moved from board/xilinx/microblaze-generic/dts/microblaze.dts with 100% similarity]
board/xilinx/dts/microblaze.dts [deleted file]
config.mk
doc/README.fdt-control
dts/Makefile
include/configs/exynos5250-dt.h
include/configs/microblaze-generic.h
tools/dtc-version.sh [new file with mode: 0755]

index 771b860ee8ef86f50e66b9e16c9c9ede2a2bcba2..43e957ac0b79a97f52992c2af8c2032b59242cb2 100644 (file)
@@ -16,6 +16,7 @@
 *.patch
 *.bin
 *.cfgtmp
+*.dts.tmp
 
 # Build tree
 /build-*
index 7206abac1f3dc1d65fc0eda03fdd5a8a96506cee..d545d306fde14faae567cb65c7706933ee04fe93 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -413,7 +413,7 @@ endif
 
 all:           $(ALL-y) $(SUBDIR_EXAMPLES)
 
-$(obj)u-boot.dtb:      $(obj)u-boot
+$(obj)u-boot.dtb:      checkdtc $(obj)u-boot
                $(MAKE) -C dts binary
                mv $(obj)dts/dt.dtb $@
 
@@ -667,6 +667,12 @@ checkgcc4:
                false; \
        fi
 
+checkdtc:
+       @if test $(call dtc-version) -lt 0104; then \
+               echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \
+               false; \
+       fi
+
 #
 # Auto-generate the autoconf.mk file (which is included by all makefiles)
 #
diff --git a/arch/arm/cpu/armv7/tegra114/config.mk b/arch/arm/cpu/armv7/tegra114/config.mk
deleted file mode 100644 (file)
index cb1a19d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (c) 2010-2013, NVIDIA CORPORATION.  All rights reserved.
-#
-# (C) Copyright 2002
-# Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms and conditions of the GNU General Public License,
-# version 2, as published by the Free Software Foundation.
-#
-# This program is distributed in the hope it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-# more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-CONFIG_ARCH_DEVICE_TREE := tegra114
diff --git a/arch/arm/cpu/armv7/tegra20/config.mk b/arch/arm/cpu/armv7/tegra20/config.mk
deleted file mode 100644 (file)
index 3cac79b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# (C) Copyright 2010,2011
-# NVIDIA Corporation <www.nvidia.com>
-#
-# (C) Copyright 2002
-# Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-CONFIG_ARCH_DEVICE_TREE := tegra20
diff --git a/arch/arm/cpu/armv7/tegra30/config.mk b/arch/arm/cpu/armv7/tegra30/config.mk
deleted file mode 100644 (file)
index 719ca81..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (c) 2010-2012, NVIDIA CORPORATION.  All rights reserved.
-#
-# (C) Copyright 2002
-# Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms and conditions of the GNU General Public License,
-# version 2, as published by the Free Software Foundation.
-#
-# This program is distributed in the hope it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-# more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-CONFIG_ARCH_DEVICE_TREE := tegra30
index 6692f24a0be43f2b1d95ba060be8485ce9211cd5..fc545a9ee6fbd89495ac7d23765be831ffd5d471 100644 (file)
@@ -15,5 +15,3 @@ CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000
 PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__
 
 LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds
-
-CONFIG_ARCH_DEVICE_TREE := microblaze
diff --git a/arch/x86/cpu/coreboot/config.mk b/arch/x86/cpu/coreboot/config.mk
deleted file mode 100644 (file)
index 0bbd2ff..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# Copyright (c) 2012 The Chromium OS Authors.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-CONFIG_ARCH_DEVICE_TREE := coreboot
index d0738cbf46cd9f2f1d5ce5fbdc492817305a50de..c95ee8a108937cf2d3eb2d4e294cff1586817421 100644 (file)
@@ -1,6 +1,6 @@
 /dts-v1/;
 
-/include/ ARCH_CPU_DTS
+/include/ "coreboot.dtsi"
 
 / {
         #address-cells = <1>;
index 80ffe3047ab88a3666dfc394d552db6b8e678023..1e94c7f82c5010a5efbb4985fdc0dc223db9ca91 100644 (file)
@@ -10,7 +10,7 @@
 */
 
 /dts-v1/;
-/include/ ARCH_CPU_DTS
+/include/ "exynos5250.dtsi"
 
 / {
        model = "SAMSUNG SMDK5250 board based on EXYNOS5250";
index dca3386cf2835c869b45d0fedb0b7a9c26952411..7832e4edda0b756e224ab223e43652dadc48eafe 100644 (file)
@@ -10,7 +10,7 @@
 */
 
 /dts-v1/;
-/include/ ARCH_CPU_DTS
+/include/ "exynos5250.dtsi"
 
 / {
        model = "Google Snow";
diff --git a/board/xilinx/dts/microblaze.dts b/board/xilinx/dts/microblaze.dts
deleted file mode 100644 (file)
index bf984b0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/include/ BOARD_DTS
index 499eed134868d1494e2f40fa6a46719d45eda71f..3e84f36d836e96b2e732590395d57e7a39decaab 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -119,6 +119,7 @@ endif
 # Usage gcc-ver := $(call cc-version)
 cc-version = $(shell $(SHELL) $(SRCTREE)/tools/gcc-version.sh $(CC))
 binutils-version = $(shell $(SHELL) $(SRCTREE)/tools/binutils-version.sh $(AS))
+dtc-version = $(shell $(SHELL) $(SRCTREE)/tools/dtc-version.sh $(DTC))
 
 #
 # Include the make variables (CC, etc...)
index 4b290609fcb26efcffe5082b7f897fd2337ee366..86bae6816d8a34714da246bfcfae7561d8e25055 100644 (file)
@@ -119,8 +119,7 @@ file into
        board/<vendor>/dts/<name>.dts
 
 This should include your CPU or SOC's device tree file, placed in
-arch/<arch>/dts, and then make any adjustments required. The name of this
-is CONFIG_ARCH_DEVICE_TREE.dts.
+arch/<arch>/dts, and then make any adjustments required.
 
 If CONFIG_OF_EMBED is defined, then it will be picked up and built into
 the U-Boot image (including u-boot.bin).
index 35303f7c5a8fdab0e5391c09d3a2bd9acb232c56..3cf991eaf2f801b1f3886a9627d927296aa239ea 100644 (file)
@@ -17,15 +17,15 @@ $(error Please define CONFIG_DEFAULT_DEVICE_TREE in your board header file))
 DEVICE_TREE = $(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE))
 endif
 
-$(if $(CONFIG_ARCH_DEVICE_TREE),,\
-$(error Your architecture does not have device tree support enabled. \
-Please define CONFIG_ARCH_DEVICE_TREE))
+DTS_INCDIRS =  $(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts
+DTS_INCDIRS += $(SRCTREE)/board/$(VENDOR)/dts
+DTS_INCDIRS += $(SRCTREE)/arch/$(ARCH)/dts
 
-# We preprocess the device tree file provide a useful define
-DTS_CPPFLAGS := -x assembler-with-cpp \
-               -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\" \
-               -DBOARD_DTS=\"$(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts/$(DEVICE_TREE).dts\" \
-               -I$(SRCTREE)/board/$(VENDOR)/dts -I$(SRCTREE)/arch/$(ARCH)/dts
+DTS_CPPFLAGS := -x assembler-with-cpp -undef -D__DTS__ \
+               -nostdinc $(addprefix -I,$(DTS_INCDIRS))
+
+DTC_FLAGS := -R 4 -p 0x1000 \
+       $(addprefix -i ,$(DTS_INCDIRS))
 
 all:   $(obj).depend $(LIB)
 
@@ -35,13 +35,8 @@ all: $(obj).depend $(LIB)
 DT_BIN := $(obj)dt.dtb
 
 $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
-       rc=$$( \
-               cat $< | $(CPP) -P $(DTS_CPPFLAGS) - | \
-               { { $(DTC) -R 4 -p 0x1000 -O dtb -o ${DT_BIN} - 2>&1 ; \
-                   echo $$? >&3 ; } | \
-                 grep -v '^DTC: dts->dtb  on file' ; \
-               } 3>&1 1>&2 ) ; \
-       exit $$rc
+       $(CPP) $(DTS_CPPFLAGS) $< -o $(DT_BIN).dts.tmp
+       $(DTC) $(DTC_FLAGS) -O dtb -o ${DT_BIN} $(DT_BIN).dts.tmp
 
 process_lds = \
        $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p'
index 2ce5a7810c7ac894750411010fda58a5beb08687..8f8f85f4403ae71c3717a4e37cdba3bcb1cdc364 100644 (file)
@@ -23,7 +23,6 @@
 #define CONFIG_DISPLAY_BOARDINFO
 
 /* Enable fdt support for Exynos5250 */
-#define CONFIG_ARCH_DEVICE_TREE                exynos5250
 #define CONFIG_OF_CONTROL
 #define CONFIG_OF_SEPARATE
 
index 87f3d132a88c767875f26c0fe44b6fc64b92c83d..0e3de777b25eec15371a209b20f5875ea14a60a9 100644 (file)
@@ -18,7 +18,7 @@
 /* Open Firmware DTS */
 #define CONFIG_OF_CONTROL      1
 #define CONFIG_OF_EMBED                1
-#define CONFIG_DEFAULT_DEVICE_TREE microblaze
+#define CONFIG_DEFAULT_DEVICE_TREE microblaze-generic
 
 /* linear and spi flash memory */
 #ifdef XILINX_FLASH_START
diff --git a/tools/dtc-version.sh b/tools/dtc-version.sh
new file mode 100755 (executable)
index 0000000..e8c94d3
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# dtc-version dtc-command
+#
+# Prints the dtc version of `dtc-command' in a canonical 4-digit form
+# such as `0222' for binutils 2.22
+#
+
+dtc="$*"
+
+if [ ${#dtc} -eq 0 ]; then
+       echo "Error: No dtc command specified."
+       printf "Usage:\n\t$0 <dtc-command>\n"
+       exit 1
+fi
+
+MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1)
+MINOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 2)
+
+printf "%02d%02d\\n" $MAJOR $MINOR