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

Simon Glass sjg at chromium.org
Tue Oct 14 06:50:49 CEST 2014


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.

Regards,
Simon


More information about the U-Boot mailing list