From: Alexandru Gagniuc <alex.g@adaptrum.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] Revert "configs: am335x: usb: do not define CONFIG_DM_USB for spl"
Date: Mon, 6 Feb 2017 14:02:56 -0800 [thread overview]
Message-ID: <4d7c4ce9-0ff9-779d-70eb-123dbce452f1@adaptrum.com> (raw)
In-Reply-To: <b59b2f3a-230d-f7c8-711b-2ae9e3a5790d@ti.com>
On 02/06/2017 01:30 PM, Grygorii Strashko wrote:
>
>
> 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 CONFIG_DM_USB seems has nothing common with issue you're trying to fix here.
> problem you saw depends on
It seems that arch_misc_init() is not properly guarded with
CONFIG_MUSB_* (see Appendix A).
> # CONFIG_USB_MUSB_HOST is not set
> # CONFIG_USB_MUSB_GADGET is not set
Yeah, it's a nightmare.
> sry, but NACK.
>
> And Could you add error output from your log to the commit message next time, please?
I got grilled for doing this in other projects, so I generally avoid it,
but sure, I can do it when requested.
Alex
APPENDIX A:
if (!CONFIG_DM_USB && CONFIG_MUSB* && CONFIG_AM335X_USB*) {
if(CONFIG_AM335X_USB0) {
declare otg0_board_data
declare otg0_plat
}
if(CONFIG_AM335X_USB1) {
declare otg1_board_data
declare otg1_plat
}
}
if (!CONFIG_DM_USB) {
if(CONFIG_AM335X_USB0) {
use otg0_board_data
use otg0_plat
}
if(CONFIG_AM335X_USB1) {
use otg1_board_data
use otg1_plat
}
} else {
/* Don't care */
}
> 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 :)
>
>
>
>
>
next prev parent reply other threads:[~2017-02-06 22:02 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 23:42 [U-Boot] [PATCH 0/5] Add support for Adaptrum ACRS2 mainboard Alexandru Gagniuc
2017-02-03 23:42 ` [U-Boot] [PATCH 1/5] configs: am335x_evm: Enable FASTBOOT based on kconfig Alexandru Gagniuc
2017-02-06 15:15 ` Andrew F. Davis
2017-02-06 18:32 ` Alex
2017-02-03 23:42 ` [U-Boot] [PATCH 2/5] Revert "configs: am335x: usb: do not define CONFIG_DM_USB for spl" Alexandru Gagniuc
2017-02-06 15:52 ` Andrew F. Davis
2017-02-06 18:47 ` Alex
2017-02-06 19:43 ` Andrew F. Davis
2017-02-06 21:30 ` Grygorii Strashko
2017-02-06 22:02 ` Alexandru Gagniuc [this message]
2017-02-06 22:30 ` [U-Boot] [PATCH] am33xx: board: Refactor USB initialization into separate function Alexandru Gagniuc
2017-02-12 13:55 ` Andreas Färber
2017-02-13 17:18 ` Alex
2017-02-03 23:42 ` [U-Boot] [PATCH 3/5] ARM: DTS: Add devicetree for Adaptrum ACRS2 mainboard Alexandru Gagniuc
2017-02-03 23:42 ` [U-Boot] [PATCH 4/5] configs: am335x: Enable PHY_VITESSE Alexandru Gagniuc
2017-02-06 15:56 ` Andrew F. Davis
2017-02-06 19:02 ` Alex G.
2017-02-06 19:47 ` Andrew F. Davis
2017-02-06 20:30 ` Alex G.
2017-02-06 20:38 ` Andrew F. Davis
2017-02-06 20:54 ` Alex G.
2017-02-06 21:03 ` Andrew F. Davis
2017-02-06 21:05 ` [U-Boot] [PATCH] drivers: net: Provide Kconfig menu for PHYLIB Alexandru Gagniuc
2017-02-06 21:45 ` [U-Boot] [PATCH] drivers: net: Move PHYLIB to Kconfig Andrew F. Davis
2017-02-07 16:28 ` Joe Hershberger
2017-02-03 23:42 ` [U-Boot] [PATCH 5/5] configs: Add defconfig for Adaptrum ACRS2 Alexandru Gagniuc
2017-02-07 3:17 ` [U-Boot] [PATCH v2 0/6] Add support for Adaptrum ACRS2 board Alexandru Gagniuc
2017-02-07 3:17 ` [U-Boot] [PATCH v2 1/6] configs: am335x_evm: Enable FASTBOOT based on kconfig Alexandru Gagniuc
2017-02-07 18:23 ` Tom Rini
2017-07-12 12:14 ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-02-07 3:17 ` [U-Boot] [PATCH v2 2/6] am33xx: board: Refactor USB initialization into separate function Alexandru Gagniuc
2017-02-07 18:23 ` Tom Rini
2017-07-12 12:14 ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-02-07 3:17 ` [U-Boot] [PATCH v2 3/6] drivers: net: Provide Kconfig menu for PHYLIB Alexandru Gagniuc
2017-02-07 16:28 ` Joe Hershberger
2017-02-07 18:23 ` Tom Rini
2017-02-09 16:28 ` [U-Boot] " Joe Hershberger
2017-02-09 18:18 ` Alexandru Gagniuc
2017-02-09 22:19 ` Joe Hershberger
2017-02-09 22:45 ` Tom Rini
2017-02-07 3:17 ` [U-Boot] [PATCH v2 4/6] drivers: net: Move PHYLIB to Kconfig Alexandru Gagniuc
2017-02-07 16:55 ` Andrew F. Davis
2017-02-07 17:15 ` Joe Hershberger
2017-02-07 17:49 ` Tom Rini
2017-02-07 17:52 ` Tom Rini
2017-02-08 22:45 ` Joe Hershberger
2017-02-07 3:17 ` [U-Boot] [PATCH v2 5/6] ARM: DTS: Add devicetree for Adaptrum ACRS2 mainboard Alexandru Gagniuc
2017-02-07 3:17 ` [U-Boot] [PATCH v2 6/6] configs: Add defconfig for Adaptrum ACRS2 Alexandru Gagniuc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4d7c4ce9-0ff9-779d-70eb-123dbce452f1@adaptrum.com \
--to=alex.g@adaptrum.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox