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

Masahiro YAMADA yamada.m at jp.panasonic.com
Wed Oct 15 23:41:28 CEST 2014


Hi Simon,


2014-10-14 13:50 GMT+09:00 Simon Glass <sjg at chromium.org>:
> 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.
>
> 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.


Well, I believe we should allow to use platform data
on Normal as well as SPL.

Device Tree is costly in terms of the binary size
(it needs to build lib/libfdt and some other files),
so we should keep it optional.

I see no benefits of using device tree on U-boot
for architectures that do not support it in Linux.


-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list