[PATCH 1/2] DM_USB: allow building without OF_CONTROL

Marek Vasut marex at denx.de
Sun Jun 20 21:43:43 CEST 2021


On 6/20/21 5:54 PM, Tom Rini wrote:

[...]

>> As far as I understand, the RX51 has gigabytes of eMMC storage, so it can
>> use SPL just like any other OMAP3 board.
> 
> U-Boot is being called by the old vendor X-Loader fork and needs to take
> up the existing flash spot.

So, why not place SPL in those 256 kiB and load U-Boot proper from the 
eMMC ?

>>> So we need to make
>>> changes in subsystems they use so that they can continue to work.
>>>
>>> So, are the changes being proposed to the generic USB code, such that
>>> DM_USB can be enabled, and when DM_USB_GADGET gets a deadline (Note,
>>> that's not set yet, but that's not to say never, it's just not been set,
>>> so getting ahead of problems here would be appreciated) that can also be
>>> enabled, OK?
>>
>> I am confused by this reply. I noticed a lot of boards were removed over
>> time because they were not converted to DM/DT, and to get rid of all the
>> ifdefs, but now it seems the direction has been completely reversed and we
>> should start adding back all the ifdefs to cater for boards which are not
>> converted instead of fixing the boards ?
> 
> A lot of boards are being removed because no one wants to update and
> maintain them and they have likely not been run-time tested in years.
> Trying to clean up the code in those cases is best done by removing the
> platform, as no one using it.   That is not the case here.

Note that there have been boards which had to be switched to SPL to even 
permit converting them to DM/DT, and thus prevent removal.

> If your only
> concern about the approach taken is some #ifdef's in the code, do you
> want to see them converted to use some wrapper macro like we do in a few
> other cases and __maybe_unused some functions as needed?

I think there is a better option which does not add any ifdefs at all 
_and_ is future-proof -- place SPL in those 256 kiB, load U-Boot from 
eMMC and then enable all the functionality you might need in U-Boot. 
That would free you from dealing with the size limitations basically 
indefinitely.


More information about the U-Boot mailing list