
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.
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.
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?
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.
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