Boot on am33xx without CONFIG_USB will currently fail, as we error-out
of arch_misc_init() if no UCLASS_MISC device is found. This requirement
was introduced in commit
3aec2648698d ("am33xx: board: probe misc
drivers to register musb devices").
Instead, only attempt the UCLASS_MISC init if we would expect the MUSB
TI device to be present. Add a comment to explain why we're doing the
device lookup (which we immediately discard).
Fixes: 3aec2648698d ("am33xx: board: probe misc drivers to register musb devices")
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Reviewed-by: Tom Rini <trini@konsulko.com>
struct udevice *dev;
int ret;
- ret = uclass_first_device_err(UCLASS_MISC, &dev);
- if (ret)
- return ret;
+ /*
+ * The MUSB wrapper driver is bound as a MISC device, so probe here
+ * to register the musb device early.
+ */
+ if (IS_ENABLED(CONFIG_USB_MUSB_TI)) {
+ ret = uclass_first_device_err(UCLASS_MISC, &dev);
+ if (ret)
+ return ret;
+ }
#if defined(CONFIG_DM_ETH) && defined(CONFIG_USB_ETHER)
usb_ether_init();