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

Tom Rini trini at konsulko.com
Fri Jun 25 14:38:47 CEST 2021


On Sun, Jun 20, 2021 at 09:43:43PM +0200, Marek Vasut wrote:
> 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.

So, at this point I'm waiting for either of:
- A response to Marek's questions about using SPL, from the Nokia NX51
  folks.
- A patch to rework things so that USB gadget support more cleanly
  removes from the code paths non-gadget code, so there's no #if's being
  added here.  Or some similar clean-up.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210625/04a1819c/attachment.sig>


More information about the U-Boot mailing list