[PATCH v2 1/2] usb: ehci-mx6: move mode set/detect to probe

Marek Vasut marex at denx.de
Fri Jul 2 21:53:39 CEST 2021


On 7/2/21 9:43 PM, Tim Harvey wrote:
> On Fri, Jul 2, 2021 at 12:17 PM Marek Vasut <marex at denx.de> wrote:
>>
>> On 7/2/21 2:15 AM, Tim Harvey wrote:
>>> There is no need to set and/or detect mode in of_to_plat
>>
>> Are you absolutely sure of that ?
>>
>> It used to be necessary to know the core mode early to determine which
>> driver (the gadget or host) to probe, that's why this code was in
>> of_to_plat.
>>
> 
> Marek,
> 
> I can't find a reason for the core mode to be known early and have
> tested it both with host and gadget mode on IMX6 and IMX8MM. Fabio has
> tested this change also (from another thread) with SPL SDP on IMX8MM
> (granted the SPL is not using DM_USB for that).
> 
> It appears I accidentally forgot to cc the uboot list so I'll need to
> resend this at any rate.

If I recall it correctly, the mode determination happened early because 
it was necessary to find out which driver to probe (this one, or the 
samsung gadget one) before it actually probed. I'm not sure myself if 
this is still even applicable.


More information about the U-Boot mailing list