diff mbox

[U-Boot,1/3] fdt: Add board specific dts inclusion

Message ID 1341433531-18124-1-git-send-email-linz@li-pro.net
State Accepted
Delegated to: Michal Simek
Headers show

Commit Message

Stephan Linz July 4, 2012, 8:25 p.m. UTC
Some architectures, for example Microblaze, doesn't need a
splitted device tree because every Microblaze hw design is
different. The individuell Microblaze device tree will be
auto generated by FPGA design tools and could be used directly
with dtc.

The auto generated dts for Microblaze can not processed by CPP.
Unfortunately that is the default procedure in U-Boot to merge
a splitted device tree (substitution of ARCH_CPU_DTS).

Microblaze will never use the ARCH_CPU_DTS substitution and we
introduce the new board specific substitution variable BOARD_DTS
that points into vendor/board/dts subdir with the file name
of CONFIG_DEFAULT_DEVICE_TREE. The common dts file in vendor/dts
subdir (defined by CONFIG_DEFAULT_DEVICE_TREE) contain a single
include line that can processed by CPP:

    /include/ BOARD_DTS

Signed-off-by: Stephan Linz <linz@li-pro.net>
---
 dts/Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Michal Simek July 9, 2012, 7:42 a.m. UTC | #1
On 07/04/2012 10:25 PM, Stephan Linz wrote:
> Some architectures, for example Microblaze, doesn't need a
> splitted device tree because every Microblaze hw design is
> different. The individuell Microblaze device tree will be
> auto generated by FPGA design tools and could be used directly
> with dtc.
>
> The auto generated dts for Microblaze can not processed by CPP.
> Unfortunately that is the default procedure in U-Boot to merge
> a splitted device tree (substitution of ARCH_CPU_DTS).
>
> Microblaze will never use the ARCH_CPU_DTS substitution and we
> introduce the new board specific substitution variable BOARD_DTS
> that points into vendor/board/dts subdir with the file name
> of CONFIG_DEFAULT_DEVICE_TREE. The common dts file in vendor/dts
> subdir (defined by CONFIG_DEFAULT_DEVICE_TREE) contain a single
> include line that can processed by CPP:
>
>      /include/ BOARD_DTS
>
> Signed-off-by: Stephan Linz<linz@li-pro.net>
> ---
>   dts/Makefile |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/dts/Makefile b/dts/Makefile
> index 914e479..b1f47a1 100644
> --- a/dts/Makefile
> +++ b/dts/Makefile
> @@ -36,7 +36,8 @@ $(error Your architecture does not have device tree support enabled. \
>   Please define CONFIG_ARCH_DEVICE_TREE))
>
>   # We preprocess the device tree file provide a useful define
> -DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\"
> +DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\" \
> +		-DBOARD_DTS=\"$(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts/$(DEVICE_TREE).dts\"
>
>   all:	$(obj).depend $(LIB)
>

Ok. Have tested this.
Simon can you give your ACK for this patch?

Tested-by: Michal Simek <monstr@monstr.eu>

I think I can add this one to my microblaze custodian tree.

Thanks,
Michal
Simon Glass July 9, 2012, 9:37 p.m. UTC | #2
On Mon, Jul 9, 2012 at 12:42 AM, Michal Simek <monstr@monstr.eu> wrote:

> On 07/04/2012 10:25 PM, Stephan Linz wrote:
>
>> Some architectures, for example Microblaze, doesn't need a
>> splitted device tree because every Microblaze hw design is
>> different. The individuell Microblaze device tree will be
>> auto generated by FPGA design tools and could be used directly
>> with dtc.
>>
>> The auto generated dts for Microblaze can not processed by CPP.
>> Unfortunately that is the default procedure in U-Boot to merge
>> a splitted device tree (substitution of ARCH_CPU_DTS).
>>
>> Microblaze will never use the ARCH_CPU_DTS substitution and we
>> introduce the new board specific substitution variable BOARD_DTS
>> that points into vendor/board/dts subdir with the file name
>> of CONFIG_DEFAULT_DEVICE_TREE. The common dts file in vendor/dts
>> subdir (defined by CONFIG_DEFAULT_DEVICE_TREE) contain a single
>> include line that can processed by CPP:
>>
>>      /include/ BOARD_DTS
>>
>> Signed-off-by: Stephan Linz<linz@li-pro.net>
>> ---
>>   dts/Makefile |    3 ++-
>>   1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/dts/Makefile b/dts/Makefile
>> index 914e479..b1f47a1 100644
>> --- a/dts/Makefile
>> +++ b/dts/Makefile
>> @@ -36,7 +36,8 @@ $(error Your architecture does not have device tree
>> support enabled. \
>>   Please define CONFIG_ARCH_DEVICE_TREE))
>>
>>   # We preprocess the device tree file provide a useful define
>> -DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/**arch/$(ARCH)/dts/$(CONFIG_
>> **ARCH_DEVICE_TREE).dtsi\"
>> +DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/**arch/$(ARCH)/dts/$(CONFIG_
>> **ARCH_DEVICE_TREE).dtsi\" \
>> +               -DBOARD_DTS=\"$(SRCTREE)/**board/$(VENDOR)/$(BOARD)/dts/$
>> **(DEVICE_TREE).dts\"
>>
>>   all:  $(obj).depend $(LIB)
>>
>>
> Ok. Have tested this.
> Simon can you give your ACK for this patch?
>

Weill I think for now it is reasonable.

Acked-by: Simon Glass <sjg@chromium.org>


>
> Tested-by: Michal Simek <monstr@monstr.eu>
>
> I think I can add this one to my microblaze custodian tree.
>
> Thanks,
> Michal
>
>
>
> --
> Michal Simek, Ing. (M.Eng)
> w: www.monstr.eu p: +42-0-721842854
> Maintainer of Linux kernel 2.6 Microblaze Linux -
> http://www.monstr.eu/fdt/
> Microblaze U-BOOT custodian
>
Michal Simek July 10, 2012, 8:03 a.m. UTC | #3
On 07/09/2012 11:37 PM, Simon Glass wrote:
> On Mon, Jul 9, 2012 at 12:42 AM, Michal Simek <monstr@monstr.eu <mailto:monstr@monstr.eu>> wrote:
>
>     On 07/04/2012 10:25 PM, Stephan Linz wrote:
>
>         Some architectures, for example Microblaze, doesn't need a
>         splitted device tree because every Microblaze hw design is
>         different. The individuell Microblaze device tree will be
>         auto generated by FPGA design tools and could be used directly
>         with dtc.
>
>         The auto generated dts for Microblaze can not processed by CPP.
>         Unfortunately that is the default procedure in U-Boot to merge
>         a splitted device tree (substitution of ARCH_CPU_DTS).
>
>         Microblaze will never use the ARCH_CPU_DTS substitution and we
>         introduce the new board specific substitution variable BOARD_DTS
>         that points into vendor/board/dts subdir with the file name
>         of CONFIG_DEFAULT_DEVICE_TREE. The common dts file in vendor/dts
>         subdir (defined by CONFIG_DEFAULT_DEVICE_TREE) contain a single
>         include line that can processed by CPP:
>
>               /include/ BOARD_DTS
>
>         Signed-off-by: Stephan Linz<linz@li-pro.net <mailto:linz@li-pro.net>>
>         ---
>            dts/Makefile |    3 ++-
>            1 files changed, 2 insertions(+), 1 deletions(-)
>
>         diff --git a/dts/Makefile b/dts/Makefile
>         index 914e479..b1f47a1 100644
>         --- a/dts/Makefile
>         +++ b/dts/Makefile
>         @@ -36,7 +36,8 @@ $(error Your architecture does not have device tree support enabled. \
>            Please define CONFIG_ARCH_DEVICE_TREE))
>
>            # We preprocess the device tree file provide a useful define
>         -DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/__arch/$(ARCH)/dts/$(CONFIG___ARCH_DEVICE_TREE).dtsi\"
>         +DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/__arch/$(ARCH)/dts/$(CONFIG___ARCH_DEVICE_TREE).dtsi\" \
>         +               -DBOARD_DTS=\"$(SRCTREE)/__board/$(VENDOR)/$(BOARD)/dts/$__(DEVICE_TREE).dts\"
>
>            all:  $(obj).depend $(LIB)
>
>
>     Ok. Have tested this.
>     Simon can you give your ACK for this patch?
>
>
> Weill I think for now it is reasonable.
>
> Acked-by: Simon Glass <sjg@chromium.org <mailto:sjg@chromium.org>>

Thanks. Applied to microblaze custodian tree.

Michal
diff mbox

Patch

diff --git a/dts/Makefile b/dts/Makefile
index 914e479..b1f47a1 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -36,7 +36,8 @@  $(error Your architecture does not have device tree support enabled. \
 Please define CONFIG_ARCH_DEVICE_TREE))
 
 # We preprocess the device tree file provide a useful define
-DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\"
+DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\" \
+		-DBOARD_DTS=\"$(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts/$(DEVICE_TREE).dts\"
 
 all:	$(obj).depend $(LIB)