[U-Boot] [PATCH v2 2/3] dts: move device tree sources to arch/$(ARCH)/dts/

Simon Glass sjg at chromium.org
Wed Feb 5 22:47:44 CET 2014


Hi Masahiro,

On 4 February 2014 02:38, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
> Unlike Linux Kernel, U-Boot historically had *.dts files under
> board/$(VENDOR)/dts/ and *.dtsi files under arch/$(ARCH)/dts/.
>
> I think arch/$(ARCH)/dts dicretory is a better location
> to store both *.dts and *.dtsi files.
>
> For example, before this commit, board/xilinx/dts directory
> had both MicroBlaze dts (microblaze-generic.dts) and
> ARM dts (zynq-*.dts), which are totally unrelated.
>
> This commit moves *.dts to arch/$(ARCH)/dts/ directories,
> allowing us to describe nicely mutiple DTBs generation in the next commit.

What is the motivation for this? I worry that we might end up with a
lot of files in one directory. One benefit of the current approach is
that .dts files are split up by vendor. Even if we put the SoC .dtsi
files in arch/arm, perhaps there is a benefit in leaving the board
.dts files in board/<vendor>?

I don't have strong feelings, just questing this...

Regards,
Simon

>
> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
> ---
>
> Changes in v2:
>   - Newly added
>
>  {board/samsung => arch/arm}/dts/exynos5250-arndale.dts         | 0
>  {board/samsung => arch/arm}/dts/exynos5250-smdk5250.dts        | 0
>  {board/samsung => arch/arm}/dts/exynos5250-snow.dts            | 0
>  {board/samsung => arch/arm}/dts/exynos5420-smdk5420.dts        | 0
>  {board/nvidia => arch/arm}/dts/tegra114-dalmore.dts            | 0
>  {board/toradex => arch/arm}/dts/tegra20-colibri_t20_iris.dts   | 0
>  {board/nvidia => arch/arm}/dts/tegra20-harmony.dts             | 0
>  {board/avionic-design => arch/arm}/dts/tegra20-medcom-wide.dts | 0
>  {board/compal => arch/arm}/dts/tegra20-paz00.dts               | 0
>  {board/avionic-design => arch/arm}/dts/tegra20-plutux.dts      | 0
>  {board/nvidia => arch/arm}/dts/tegra20-seaboard.dts            | 0
>  {board/avionic-design => arch/arm}/dts/tegra20-tamonten.dtsi   | 0
>  {board/avionic-design => arch/arm}/dts/tegra20-tec.dts         | 0
>  {board/compulab => arch/arm}/dts/tegra20-trimslice.dts         | 0
>  {board/nvidia => arch/arm}/dts/tegra20-ventana.dts             | 0
>  {board/nvidia => arch/arm}/dts/tegra20-whistler.dts            | 0
>  {board/nvidia => arch/arm}/dts/tegra30-beaver.dts              | 0
>  {board/nvidia => arch/arm}/dts/tegra30-cardhu.dts              | 0
>  {board/avionic-design => arch/arm}/dts/tegra30-tamonten.dtsi   | 0
>  {board/avionic-design => arch/arm}/dts/tegra30-tec-ng.dts      | 0
>  {board/xilinx => arch/arm}/dts/zynq-microzed.dts               | 0
>  {board/xilinx => arch/arm}/dts/zynq-zc702.dts                  | 0
>  {board/xilinx => arch/arm}/dts/zynq-zc706.dts                  | 0
>  {board/xilinx => arch/arm}/dts/zynq-zc770-xm010.dts            | 0
>  {board/xilinx => arch/arm}/dts/zynq-zc770-xm012.dts            | 0
>  {board/xilinx => arch/arm}/dts/zynq-zc770-xm013.dts            | 0
>  {board/xilinx => arch/arm}/dts/zynq-zed.dts                    | 0
>  {board/xilinx => arch/microblaze}/dts/microblaze-generic.dts   | 0
>  {board/chromebook-x86 => arch/x86}/dts/alex.dts                | 0
>  {board/chromebook-x86 => arch/x86}/dts/link.dts                | 0
>  dts/Makefile                                                   | 4 ++--
>  scripts/Makefile.lib                                           | 1 -
>  32 files changed, 2 insertions(+), 3 deletions(-)
>  rename {board/samsung => arch/arm}/dts/exynos5250-arndale.dts (100%)
>  rename {board/samsung => arch/arm}/dts/exynos5250-smdk5250.dts (100%)
>  rename {board/samsung => arch/arm}/dts/exynos5250-snow.dts (100%)
>  rename {board/samsung => arch/arm}/dts/exynos5420-smdk5420.dts (100%)
>  rename {board/nvidia => arch/arm}/dts/tegra114-dalmore.dts (100%)
>  rename {board/toradex => arch/arm}/dts/tegra20-colibri_t20_iris.dts (100%)
>  rename {board/nvidia => arch/arm}/dts/tegra20-harmony.dts (100%)
>  rename {board/avionic-design => arch/arm}/dts/tegra20-medcom-wide.dts (100%)
>  rename {board/compal => arch/arm}/dts/tegra20-paz00.dts (100%)
>  rename {board/avionic-design => arch/arm}/dts/tegra20-plutux.dts (100%)
>  rename {board/nvidia => arch/arm}/dts/tegra20-seaboard.dts (100%)
>  rename {board/avionic-design => arch/arm}/dts/tegra20-tamonten.dtsi (100%)
>  rename {board/avionic-design => arch/arm}/dts/tegra20-tec.dts (100%)
>  rename {board/compulab => arch/arm}/dts/tegra20-trimslice.dts (100%)
>  rename {board/nvidia => arch/arm}/dts/tegra20-ventana.dts (100%)
>  rename {board/nvidia => arch/arm}/dts/tegra20-whistler.dts (100%)
>  rename {board/nvidia => arch/arm}/dts/tegra30-beaver.dts (100%)
>  rename {board/nvidia => arch/arm}/dts/tegra30-cardhu.dts (100%)
>  rename {board/avionic-design => arch/arm}/dts/tegra30-tamonten.dtsi (100%)
>  rename {board/avionic-design => arch/arm}/dts/tegra30-tec-ng.dts (100%)
>  rename {board/xilinx => arch/arm}/dts/zynq-microzed.dts (100%)
>  rename {board/xilinx => arch/arm}/dts/zynq-zc702.dts (100%)
>  rename {board/xilinx => arch/arm}/dts/zynq-zc706.dts (100%)
>  rename {board/xilinx => arch/arm}/dts/zynq-zc770-xm010.dts (100%)
>  rename {board/xilinx => arch/arm}/dts/zynq-zc770-xm012.dts (100%)
>  rename {board/xilinx => arch/arm}/dts/zynq-zc770-xm013.dts (100%)
>  rename {board/xilinx => arch/arm}/dts/zynq-zed.dts (100%)
>  rename {board/xilinx => arch/microblaze}/dts/microblaze-generic.dts (100%)
>  rename {board/chromebook-x86 => arch/x86}/dts/alex.dts (100%)
>  rename {board/chromebook-x86 => arch/x86}/dts/link.dts (100%)
>
> diff --git a/board/samsung/dts/exynos5250-arndale.dts b/arch/arm/dts/exynos5250-arndale.dts
> similarity index 100%
> rename from board/samsung/dts/exynos5250-arndale.dts
> rename to arch/arm/dts/exynos5250-arndale.dts
> diff --git a/board/samsung/dts/exynos5250-smdk5250.dts b/arch/arm/dts/exynos5250-smdk5250.dts
> similarity index 100%
> rename from board/samsung/dts/exynos5250-smdk5250.dts
> rename to arch/arm/dts/exynos5250-smdk5250.dts
> diff --git a/board/samsung/dts/exynos5250-snow.dts b/arch/arm/dts/exynos5250-snow.dts
> similarity index 100%
> rename from board/samsung/dts/exynos5250-snow.dts
> rename to arch/arm/dts/exynos5250-snow.dts
> diff --git a/board/samsung/dts/exynos5420-smdk5420.dts b/arch/arm/dts/exynos5420-smdk5420.dts
> similarity index 100%
> rename from board/samsung/dts/exynos5420-smdk5420.dts
> rename to arch/arm/dts/exynos5420-smdk5420.dts
> diff --git a/board/nvidia/dts/tegra114-dalmore.dts b/arch/arm/dts/tegra114-dalmore.dts
> similarity index 100%
> rename from board/nvidia/dts/tegra114-dalmore.dts
> rename to arch/arm/dts/tegra114-dalmore.dts
> diff --git a/board/toradex/dts/tegra20-colibri_t20_iris.dts b/arch/arm/dts/tegra20-colibri_t20_iris.dts
> similarity index 100%
> rename from board/toradex/dts/tegra20-colibri_t20_iris.dts
> rename to arch/arm/dts/tegra20-colibri_t20_iris.dts
> diff --git a/board/nvidia/dts/tegra20-harmony.dts b/arch/arm/dts/tegra20-harmony.dts
> similarity index 100%
> rename from board/nvidia/dts/tegra20-harmony.dts
> rename to arch/arm/dts/tegra20-harmony.dts
> diff --git a/board/avionic-design/dts/tegra20-medcom-wide.dts b/arch/arm/dts/tegra20-medcom-wide.dts
> similarity index 100%
> rename from board/avionic-design/dts/tegra20-medcom-wide.dts
> rename to arch/arm/dts/tegra20-medcom-wide.dts
> diff --git a/board/compal/dts/tegra20-paz00.dts b/arch/arm/dts/tegra20-paz00.dts
> similarity index 100%
> rename from board/compal/dts/tegra20-paz00.dts
> rename to arch/arm/dts/tegra20-paz00.dts
> diff --git a/board/avionic-design/dts/tegra20-plutux.dts b/arch/arm/dts/tegra20-plutux.dts
> similarity index 100%
> rename from board/avionic-design/dts/tegra20-plutux.dts
> rename to arch/arm/dts/tegra20-plutux.dts
> diff --git a/board/nvidia/dts/tegra20-seaboard.dts b/arch/arm/dts/tegra20-seaboard.dts
> similarity index 100%
> rename from board/nvidia/dts/tegra20-seaboard.dts
> rename to arch/arm/dts/tegra20-seaboard.dts
> diff --git a/board/avionic-design/dts/tegra20-tamonten.dtsi b/arch/arm/dts/tegra20-tamonten.dtsi
> similarity index 100%
> rename from board/avionic-design/dts/tegra20-tamonten.dtsi
> rename to arch/arm/dts/tegra20-tamonten.dtsi
> diff --git a/board/avionic-design/dts/tegra20-tec.dts b/arch/arm/dts/tegra20-tec.dts
> similarity index 100%
> rename from board/avionic-design/dts/tegra20-tec.dts
> rename to arch/arm/dts/tegra20-tec.dts
> diff --git a/board/compulab/dts/tegra20-trimslice.dts b/arch/arm/dts/tegra20-trimslice.dts
> similarity index 100%
> rename from board/compulab/dts/tegra20-trimslice.dts
> rename to arch/arm/dts/tegra20-trimslice.dts
> diff --git a/board/nvidia/dts/tegra20-ventana.dts b/arch/arm/dts/tegra20-ventana.dts
> similarity index 100%
> rename from board/nvidia/dts/tegra20-ventana.dts
> rename to arch/arm/dts/tegra20-ventana.dts
> diff --git a/board/nvidia/dts/tegra20-whistler.dts b/arch/arm/dts/tegra20-whistler.dts
> similarity index 100%
> rename from board/nvidia/dts/tegra20-whistler.dts
> rename to arch/arm/dts/tegra20-whistler.dts
> diff --git a/board/nvidia/dts/tegra30-beaver.dts b/arch/arm/dts/tegra30-beaver.dts
> similarity index 100%
> rename from board/nvidia/dts/tegra30-beaver.dts
> rename to arch/arm/dts/tegra30-beaver.dts
> diff --git a/board/nvidia/dts/tegra30-cardhu.dts b/arch/arm/dts/tegra30-cardhu.dts
> similarity index 100%
> rename from board/nvidia/dts/tegra30-cardhu.dts
> rename to arch/arm/dts/tegra30-cardhu.dts
> diff --git a/board/avionic-design/dts/tegra30-tamonten.dtsi b/arch/arm/dts/tegra30-tamonten.dtsi
> similarity index 100%
> rename from board/avionic-design/dts/tegra30-tamonten.dtsi
> rename to arch/arm/dts/tegra30-tamonten.dtsi
> diff --git a/board/avionic-design/dts/tegra30-tec-ng.dts b/arch/arm/dts/tegra30-tec-ng.dts
> similarity index 100%
> rename from board/avionic-design/dts/tegra30-tec-ng.dts
> rename to arch/arm/dts/tegra30-tec-ng.dts
> diff --git a/board/xilinx/dts/zynq-microzed.dts b/arch/arm/dts/zynq-microzed.dts
> similarity index 100%
> rename from board/xilinx/dts/zynq-microzed.dts
> rename to arch/arm/dts/zynq-microzed.dts
> diff --git a/board/xilinx/dts/zynq-zc702.dts b/arch/arm/dts/zynq-zc702.dts
> similarity index 100%
> rename from board/xilinx/dts/zynq-zc702.dts
> rename to arch/arm/dts/zynq-zc702.dts
> diff --git a/board/xilinx/dts/zynq-zc706.dts b/arch/arm/dts/zynq-zc706.dts
> similarity index 100%
> rename from board/xilinx/dts/zynq-zc706.dts
> rename to arch/arm/dts/zynq-zc706.dts
> diff --git a/board/xilinx/dts/zynq-zc770-xm010.dts b/arch/arm/dts/zynq-zc770-xm010.dts
> similarity index 100%
> rename from board/xilinx/dts/zynq-zc770-xm010.dts
> rename to arch/arm/dts/zynq-zc770-xm010.dts
> diff --git a/board/xilinx/dts/zynq-zc770-xm012.dts b/arch/arm/dts/zynq-zc770-xm012.dts
> similarity index 100%
> rename from board/xilinx/dts/zynq-zc770-xm012.dts
> rename to arch/arm/dts/zynq-zc770-xm012.dts
> diff --git a/board/xilinx/dts/zynq-zc770-xm013.dts b/arch/arm/dts/zynq-zc770-xm013.dts
> similarity index 100%
> rename from board/xilinx/dts/zynq-zc770-xm013.dts
> rename to arch/arm/dts/zynq-zc770-xm013.dts
> diff --git a/board/xilinx/dts/zynq-zed.dts b/arch/arm/dts/zynq-zed.dts
> similarity index 100%
> rename from board/xilinx/dts/zynq-zed.dts
> rename to arch/arm/dts/zynq-zed.dts
> diff --git a/board/xilinx/dts/microblaze-generic.dts b/arch/microblaze/dts/microblaze-generic.dts
> similarity index 100%
> rename from board/xilinx/dts/microblaze-generic.dts
> rename to arch/microblaze/dts/microblaze-generic.dts
> diff --git a/board/chromebook-x86/dts/alex.dts b/arch/x86/dts/alex.dts
> similarity index 100%
> rename from board/chromebook-x86/dts/alex.dts
> rename to arch/x86/dts/alex.dts
> diff --git a/board/chromebook-x86/dts/link.dts b/arch/x86/dts/link.dts
> similarity index 100%
> rename from board/chromebook-x86/dts/link.dts
> rename to arch/x86/dts/link.dts
> diff --git a/dts/Makefile b/dts/Makefile
> index c47fba7..5d2abd9 100644
> --- a/dts/Makefile
> +++ b/dts/Makefile
> @@ -12,9 +12,9 @@ ifeq ($(DEVICE_TREE),)
>  DEVICE_TREE := notfound
>  endif
>
> -DTS := $(srctree)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts
> +DTS := $(srctree)/arch/$(ARCH)/dts/$(DEVICE_TREE).dts
>
> -DTC_FLAGS += -i $(srctree)/arch/$(ARCH)/dts -R 4 -p 0x1000
> +DTC_FLAGS += -R 4 -p 0x1000
>
>  $(obj)/dt.dtb: $(DTS) FORCE
>         $(call if_changed_dep,dtc)
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index ee3ceac..02b17b1 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -153,7 +153,6 @@ ld_flags       = $(LDFLAGS) $(ldflags-y)
>
>  # Modified for U-Boot
>  dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
> -                -I$(srctree)/board/$(VENDOR)/dts/                       \
>                  -I$(srctree)/arch/$(ARCH)/dts                           \
>                  -undef -D__DTS__
>
> --
> 1.8.3.2
>


More information about the U-Boot mailing list