commit 787f04bb6a - imx: add USB2_BOOT type

Peng Fan peng.fan at oss.nxp.com
Tue Oct 18 02:43:56 CEST 2022


+ Stefano & Fabio

On 10/15/2022 1:53 AM, Rasmus Villemoes wrote:
> On 14/10/2022 02.55, Peng Fan wrote:
>> Hi Rasmus
>>
>> On 10/7/2022 4:08 PM, Rasmus Villemoes wrote:
>>> Hi Peng
>>>
>>> It seems that commit 787f04bb6a (imx: add USB2_BOOT type) broke our
>>> board logic which relies on whether get_boot_device() returns USB_BOOT
>>> or not. Instrumenting get_boot_device() shows that on our imx8mp board,
>>> boot_instance is 3 when we're booting over USB, so boot_dev becomes 20
>>> instead of 17 aka USB_BOOT.
>>>
>>> I assume that for the boards/socs you mentioned in the commit message,
>>> boot_instance could be 0 or 1. However, I don't see anywhere that uses
>>> that USB2_BOOT define.

It is for i.MX8ULP, i.MX93. The i.MX usb feature upstream is a bit slow
in my side, so the macro defined that, but not used for now.

>>>
>>> Short-term, I'll probably just revert 787f04bb6a locally. A bit longer
>>> term, I'm thinking I should be doing rom_api_query_boot_infor() and
>>> "decoding" the return value myself.

You no need to do that, the ROM API is common logic.

>>>
>>> Is there any chance you could make some information on that ROM API
>>> public so it's possible for outsiders to understand what's going on?

What could only help is to ask the ROM team to see whether they have 
plan to public the ROM API details and when. Otherwise you could only
read the code to understand how it works.

>>
>> Could you please try below changes to check whether it fixes your issue?
> 
> Well, it seems very likely it would, but could you _please_ answer the
> real question so we as a community has a chance of evaluating whether
> that's the proper fix or something else entirely is needed. And so that
> in the future we as a community would have a chance of objecting to
> including 787f04bb6a in the first place.

You could help reviewing if you have time.

Thanks,
Peng.
> 
> Is there any chance you could make some information on that ROM API
> public so it's possible for outsiders to understand what's going on?
> 
> Rasmus


More information about the U-Boot mailing list