problems with boards with CONFIG_DM disabled

Marek Behun marek.behun at
Wed May 26 01:27:56 CEST 2021

Tom, Simon,

now that LTO is merged I am working on
  Support SPI NORs and OF partitions in `mtd list`

but CI fails for some boards, see

The reason is that there are still several boards which do not use

On the previous version Simon commented that I should use
  if (IS_ENABLED(...))
instead of
but this does not currently work for those boards with CONFIG_DM
disabled (struct udevice's members are not visible at all, and
functions from dm/device.h do not exist).

There are multiple possible workarounds:
- use #if (until all boards are at CONFIG_DM)
- create static inline versions of functions from dm/device.h returning
  failures when CONFIG_DM is not set (this would be rather big :( )
- wait till all those boards with CONFIG_DM disabled are removed
- ...

What should I do?



More information about the U-Boot mailing list