[U-Boot] [PATCH 11/13] arm: zynq: dts: Add U-Boot device tree additions

Simon Glass
2015-08-31T13:54:34Z

Hi Masahiro,

On 31 August 2015 at 04:01, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Simon,
>
>
> 2015-08-30 0:10 GMT+09:00 Simon Glass <sjg@chromium.org>:
>> We need to mark some device tree nodes so that they are available before
>> relocation. This enables driver model to find these automatically. In the
>> case of SPL it ensures that these nodes will be retained in SPL.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>> arch/arm/dts/zynq-7000.dtsi | 1 +
>> arch/arm/dts/zynq-microzed.dts | 5 +++++
>> arch/arm/dts/zynq-picozed.dts | 5 +++++
>> arch/arm/dts/zynq-zc702.dts | 1 +
>> arch/arm/dts/zynq-zc706.dts | 1 +
>> arch/arm/dts/zynq-zc770-xm010.dts | 1 +
>> arch/arm/dts/zynq-zc770-xm011.dts | 1 +
>> arch/arm/dts/zynq-zc770-xm012.dts | 1 +
>> arch/arm/dts/zynq-zc770-xm013.dts | 1 +
>> arch/arm/dts/zynq-zed.dts | 1 +
>> arch/arm/dts/zynq-zybo.dts | 1 +
>> 11 files changed, 19 insertions(+)
>>
>> diff --git a/arch/arm/dts/zynq-7000.dtsi b/arch/arm/dts/zynq-7000.dtsi
>> index 0b62cb0..12614f2 100644
>> --- a/arch/arm/dts/zynq-7000.dtsi
>> +++ b/arch/arm/dts/zynq-7000.dtsi
>> @@ -54,6 +54,7 @@
>> };
>>
>> amba: amba {
>> + u-boot,dm-pre-reloc;
>> compatible = "simple-bus";
>> #address-cells = <1>;
>> #size-cells = <1>;
>
>
> You are adding "u-boot,dm-pre-reloc" to a simple-bus node.
>
> With this commit, all the children are bound before relocation.

That should not happen unless you put the property in each child.

>
> simple_bus_post_bind() calls dm_scan_fdt_node() with false for 'pre_reloc_only'.
> I guess, this implementation is a problem.

Yes, that is wrong. I remember noticing this at the time but not
having it as a parameter so I wasn't sure how to best regenerate it.

>
>
> Currently, 'pre_reloc_only' can be specified for the first-level nodes.
>
> For example, assume node structure like this:
>
> amba {
> uart0 {
>
> };
>
> pinctrl {
>
> };
>
> usb {
>
> };
>
> eth {
>
> };
> };
>
>
>
> Please tell me:
> how to bind "uart0" and "pinctrl", but not "usb", "eth"
> before relocation.
>
>
> Any idea to propagate 'pre_reloc_only' downwards?

Checking the GD_FLG_RELOC is the only thing I can think of. We don't
want to add parameter to the bind() method I think.

Regards,
Simon