[U-Boot] [PATCH 2/5] Revert "configs: am335x: usb: do not define CONFIG_DM_USB for spl"
Grygorii Strashko
grygorii.strashko at ti.com
Mon Feb 6 21:30:31 UTC 2017
On 02/06/2017 01:43 PM, Andrew F. Davis wrote:
> On 02/06/2017 12:47 PM, Alex wrote:
>>
>>
>> On 02/06/2017 07:52 AM, Andrew F. Davis wrote:
>>> On 02/03/2017 05:42 PM, Alexandru Gagniuc wrote:
>>>> This reverts commit 4623f974a585b59bd07fb60a326a096290aa4c53.
>>>> This confuses the #ifdef logic in am33xx/board.c. This results in
>>>> undefined symbols when USB gadget mode is disabled in .config.
>>>>
>>>
>>> The #ifdef logic is a bit of a nightmare right now while we migrate to
>>> Kconfig from header defines, and so I agree this commit is a bit
>>> confused. But how do you fix the problem the commit you are reverting
>>> intended to fix?
>>
>> While I fully agree that the requisite parts should be moved to Kconfig,
>> what I am trying to do is re-use as much of the existing infrastructure
>> as possible. Unfortunately, I don't have the answer to the question of
>> how to fix the underlying problem. Please see below.
>>
>>> SPL uses the same USB code as regular U-Boot, but DM_USB is not yet
>>> compatible with SPL, and so when CONFIG_DM_USB is enabled when SPL is
>>> being built, well, bad things happen.
>>
>> At the end of this patch series, I add a defconfig with both
>> CONFIG_DM_USB and CONFIG_SPL selected. We see undefined symbols and bad
>> things happen when this revert is not applied, not the other way around.
The CONFIG_DM_USB seems has nothing common with issue you're trying to fix here.
problem you saw depends on
# CONFIG_USB_MUSB_HOST is not set
# CONFIG_USB_MUSB_GADGET is not set
sry, but NACK.
And Could you add error output from your log to the commit message next time, please?
Smth. like this:
arch/arm/mach-omap2/am33xx/board.c: In function 'arch_misc_init':
arch/arm/mach-omap2/am33xx/board.c:199:17: error: 'otg0_plat' undeclared (first use in this function)
musb_register(&otg0_plat, &otg0_board_data,
^
arch/arm/mach-omap2/am33xx/board.c:199:17: note: each undeclared identifier is reported only once for each function it appears in
arch/arm/mach-omap2/am33xx/board.c:199:29: error: 'otg0_board_data' undeclared (first use in this function)
musb_register(&otg0_plat, &otg0_board_data,
^
arch/arm/mach-omap2/am33xx/board.c:203:17: error: 'otg1_plat' undeclared (first use in this function)
musb_register(&otg1_plat, &otg1_board_data,
^
arch/arm/mach-omap2/am33xx/board.c:203:29: error: 'otg1_board_data' undeclared (first use in this function)
musb_register(&otg1_plat, &otg1_board_data,
>>
>>> Undefined symbols will happen until the Kconfig conversion is finished
>>> and some proper kconfig dependencies are defined. In the meantime, the
>>> only other fix for this commit will be to convert DM_USB code to work
>>> with SPL.
>>
>> Of course! And as you noticed this patch is a "lesser of two evils" fix.
>> I do not have the bandwidth to rework the USB/SPL code, though I would
>> like to avoid blocking ACRS2 support on SPL refactoring. Is this
>> reasonable?
>>
>
> Absolutely reasonable to me, because I too do not have spare bandwidth
> for this, I just like pointing it out every-time someone messes with SPL
> and DM, maybe someday someone will find the time actually fix it, then I
> can at least feel like I helped :)
--
regards,
-grygorii
More information about the U-Boot
mailing list