
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.
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 :)
Andrew
Alex
Andrew
Signed-off-by: Alexandru Gagniuc alex.g@adaptrum.com
include/configs/am335x_evm.h | 1 - 1 file changed, 1 deletion(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 85c0728..cd42601 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -282,7 +282,6 @@ #ifdef CONFIG_SPL_BUILD #undef CONFIG_DM_MMC #undef CONFIG_TIMER -#undef CONFIG_DM_USB #endif
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)