diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-27 21:42:20 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-27 21:42:20 -0700 |
commit | 53971a86d2db89f32859dc26bd6594b5bc665d5b (patch) | |
tree | 350ee9f3d53494036308cd123054dac3ba86ff91 /drivers/usb/phy | |
parent | d5dbd3f7d82223b59dc2200c0e9f4f95665a21a4 (diff) | |
parent | d1db0eea852497762cab43b905b879dfcd3b8987 (diff) | |
download | linux-53971a86d2db89f32859dc26bd6594b5bc665d5b.tar.bz2 |
Merge 3.15-rc3 into usb-next
Diffstat (limited to 'drivers/usb/phy')
-rw-r--r-- | drivers/usb/phy/phy-am335x-control.c | 9 | ||||
-rw-r--r-- | drivers/usb/phy/phy.c | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-am335x-control.c b/drivers/usb/phy/phy-am335x-control.c index d75196ad5f2f..35b6083b7999 100644 --- a/drivers/usb/phy/phy-am335x-control.c +++ b/drivers/usb/phy/phy-am335x-control.c @@ -3,6 +3,7 @@ #include <linux/err.h> #include <linux/of.h> #include <linux/io.h> +#include <linux/delay.h> #include "am35x-phy-control.h" struct am335x_control_usb { @@ -86,6 +87,14 @@ static void am335x_phy_power(struct phy_control *phy_ctrl, u32 id, bool on) } writel(val, usb_ctrl->phy_reg + reg); + + /* + * Give the PHY ~1ms to complete the power up operation. + * Tests have shown unstable behaviour if other USB PHY related + * registers are written too shortly after such a transition. + */ + if (on) + mdelay(1); } static const struct phy_control ctrl_am335x = { diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index 8afa813d690b..36b6bce33b20 100644 --- a/drivers/usb/phy/phy.c +++ b/drivers/usb/phy/phy.c @@ -132,6 +132,9 @@ struct usb_phy *usb_get_phy(enum usb_phy_type type) if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) { pr_debug("PHY: unable to find transceiver of type %s\n", usb_phy_type_string(type)); + if (!IS_ERR(phy)) + phy = ERR_PTR(-ENODEV); + goto err0; } |