[U-Boot] dm: Should U-Boot driver model abandon platform data?

Jagan Teki jagannadh.teki at gmail.com
Tue Oct 14 13:18:17 CEST 2014


On 14 October 2014 10:20, Simon Glass <sjg at chromium.org> wrote:
> Hi,
>
> This question came up at the U-Boot mini-summit yesterday and I was
> tasked with starting a thread on the mailing list.
>
> There seemed to be a strong feeling in the room that permitting
> platform data in driver model is a mistake. Reasons mentioned were:
>
> - device tree is how things are done in Linux at least for most
> platforms we support
> - we can therefore import this directly in from Linux rather than
> writing new platform data
> - platform data is considered 'legacy' and we should not support
> legacy features in a new framework
> - device tree permits fully abstracting the device data from the code,
> avoiding #ifdefs
> - it is easier to change settings in device tree than in platform data
>
> The main impact is that all boards would need at least some sort of
> device tree when they move to driver model.

I'm not fully agree with the statement "platform data should not be part of
driver model".

Yes this statement is fine when we code platform data with fully functional
devicetree driven u-boot ie possible in Linux now. I think going forward,
this platform data will be part of devicetree based on u-boot devicetree
development on all possible area's till that platform data is not a legacy
for u-boot.

Comments?

>
> There is also the question of SPL, where we are sometimes
> space-constrained. If we go with this policy I wonder if we should
> permit an exception for things required by SPL for now? Typically in
> SPL for these space-constrained platforms we only need a few devices
> so we could provide platform data for SPL while still using device
> tree in U-Boot  It would be possible to enable device tree in SPL for
> many platforms but that feels like something that should not block
> progress. So perhaps platform data in SPL should be a separate
> question.
>
> Please have a think about this and reply on this thread.

thanks!
-- 
Jagan.


More information about the U-Boot mailing list