diff options
author | Stephen Boyd <stephen.boyd@linaro.org> | 2016-12-29 01:56:52 +0300 |
---|---|---|
committer | Peter Chen <peter.chen@nxp.com> | 2017-01-20 06:25:02 +0300 |
commit | 8feb3680bd0363a8d784fa0d065e0a6cdc9e0cff (patch) | |
tree | 1d925c424f253e280b2d21f42e78a79dd0e6fac0 /drivers/usb/chipidea/core.c | |
parent | a89b94b53371bbfa582787c2fa3378000ea4263d (diff) | |
download | linux-8feb3680bd0363a8d784fa0d065e0a6cdc9e0cff.tar.xz |
usb: chipidea: Add platform flag for wrapper phy management
The ULPI phy on qcom platforms needs to be initialized and
powered on after a USB reset and before we toggle the run/stop
bit. Otherwise, the phy locks up and doesn't work properly.
Therefore, add a flag to skip any phy power management in the
core layer, leaving it up to the glue driver to manage.
Acked-by: Peter Chen <peter.chen@nxp.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'drivers/usb/chipidea/core.c')
-rw-r--r-- | drivers/usb/chipidea/core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 24859b44c45c..b399326db08f 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -361,6 +361,9 @@ static int _ci_usb_phy_init(struct ci_hdrc *ci) */ static void ci_usb_phy_exit(struct ci_hdrc *ci) { + if (ci->platdata->flags & CI_HDRC_OVERRIDE_PHY_CONTROL) + return; + if (ci->phy) { phy_power_off(ci->phy); phy_exit(ci->phy); @@ -379,6 +382,9 @@ static int ci_usb_phy_init(struct ci_hdrc *ci) { int ret; + if (ci->platdata->flags & CI_HDRC_OVERRIDE_PHY_CONTROL) + return 0; + switch (ci->platdata->phy_mode) { case USBPHY_INTERFACE_MODE_UTMI: case USBPHY_INTERFACE_MODE_UTMIW: |