[U-Boot] [PATCH 8/8] dm: core: abolish u-boot, dm-pre-reloc property

Stephen Warren swarren at wwwdotorg.org
Thu Nov 20 18:16:01 CET 2014


On 11/20/2014 09:44 AM, Simon Glass wrote:
> Hi Masahiro,
>
> On 19 November 2014 09:21, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
>> Hi Simon,
>>
>>
>>
>> On Tue, 18 Nov 2014 14:37:33 +0000
>> Simon Glass <sjg at chromium.org> wrote:
>>
>>> Hi Masahiro,
>>>
>>> On 18 November 2014 12:51, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
>>>> Hi Simon,
>>>>
>>>>
>>>>
>>>> On Mon, 17 Nov 2014 18:17:43 +0000
>>>> Simon Glass <sjg at chromium.org> wrote:
>>>>
>>>>> Hi Masahiro,
>>>>>
>>>>> On 17 November 2014 08:19, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
>>>>>> The driver model provides two ways to pass the device information,
>>>>>> platform data and device tree.  Either way works to bind devices and
>>>>>> drivers, but there is inconsistency in terms of how to pass the
>>>>>> pre-reloc flag.
>>>>>>
>>>>>> In the platform data way, the pre-reloc DM scan checks if each driver
>>>>>> has DM_FLAG_PRE_RELOC flag (this was changed to use U_BOOT_DRIVER_F
>>>>>> just before).  That is, each **driver** has the pre-reloc attribute.
>>>>>>
>>>>>> In the device tree control, the existence of "u-boot,dm-pre-reloc" is
>>>>>> checked for each device node.  The driver flag "DM_FLAG_PRE_RELOC" is
>>>>>> never checked.  That is, each **device** owns the pre-reloc attribute.
>>>>>>
>>>>>> Drivers should generally work both with platform data and device tree,
>>>>>> but this inconsistency has made our life difficult.
>>>>>
>>>>> I feel we should use device tree where available, and only fall back
>>>>> to platform data when necessary (no device tree available for
>>>>> platform, for example).
>>>>
>>>> No, it is true that device tree is a useful tool, but it should be optional.
>>>>
>>>> All the infrastructures of drivers must work perfectly without device tree.
>>>>
>>>> The device tree is just one choice of how to give device information.
>>>>
>>>
>>> Which platform(s) are we talking about here?
>>
>>
>> I am talking about the general design policy of drivers
>> in U-Boot and Linux.
>
> Well Linux has moved away from platform data, right?

As a blanket statement, that isn't true.

Some architectures (e.g. ARM) have moved to DT. That move is something 
done by the ARM maintainers, not something that's necessarily being 
forced upon every single architecture. I know of no move to force 
everyone to convert to DT.

What makes sense for Linux doesn't always make sense for everything else 
anyway.

In my opinion, DT in Linux isn't actually doing much that's useful, and 
DT in a boot loader is likely to be even less useful.


More information about the U-Boot mailing list