During the init, the driver will use the mode to configure
the controller mode and the phy mode.
The PHY of DA8xx has some issues when the phy is forced in host or device.
Add way to skip the set mode and let the da8xx glue manage the phy mode.[...]
Signed-off-by: Alexandre Bailon <abailon@xxxxxxxxxxxx>
---
drivers/usb/musb/musb_core.c | 15 ++++++++++-----
drivers/usb/musb/musb_core.h | 1 +
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 27dadc0..6f5f039 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2278,15 +2279,19 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)[...]
- if (status < 0)
- goto fail3;
+ if (mode != MUSB_UNDEFINED &&
+ !(musb->io.quirks & MUSB_SKIP_SET_MODE)) {
+ status = musb_platform_set_mode(musb, mode);[...]
+ if (status < 0)
+ goto fail3;
+ }
status = musb_init_debugfs(musb);
if (status < 0)