diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-04-27 16:50:04 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2015-05-04 16:51:55 +0200 |
commit | e13afeef6f5d3c9c4fc130b21ee7c885f96d55f2 (patch) | |
tree | 04dc727e522a1da35829383144c009efd92d95a7 /drivers/usb/musb-new | |
parent | 2aacc4239c32aa732621f3a432d576c68c3016d8 (diff) | |
download | u-boot-imx-e13afeef6f5d3c9c4fc130b21ee7c885f96d55f2.zip u-boot-imx-e13afeef6f5d3c9c4fc130b21ee7c885f96d55f2.tar.gz u-boot-imx-e13afeef6f5d3c9c4fc130b21ee7c885f96d55f2.tar.bz2 |
sunxi: usb: Do not call phy_probe from hcd code
The 2/3 usb-phys on the sunxi SoCs are really a single separate functional
block, and are modelled as such in devicetree. So once we've moved all the
sunxi usb code to the driver-model then phy_probe will be called once
for the entire block from the driver-model enumeration code.
Move to this now as this also avoids problems with phy_probe being called
multiple times once we introduce ohci support. This also allows us to get rid
of the sunxi_usb_phy_enabled_count variable as phy_probe now is guaranteed
to be called only once.
Since we're effectively rewriting the probe / remove functions, move them
to the end of the file while we are at it, as that is the most logical place
for them.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'drivers/usb/musb-new')
-rw-r--r-- | drivers/usb/musb-new/sunxi.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index 4f08f9f..e8a3a23 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -250,15 +250,10 @@ static int sunxi_musb_init(struct musb *musb) pr_debug("%s():\n", __func__); - err = sunxi_usb_phy_probe(0); - if (err) - return err; - if (is_host_enabled(musb)) { err = sunxi_usb_phy_vbus_detect(0); if (err) { eprintf("Error: A charger is plugged into the OTG\n"); - sunxi_usb_phy_remove(0); return -EIO; } } @@ -296,7 +291,7 @@ static int sunxi_musb_exit(struct musb *musb) sunxi_usb_phy_power_off(0); sunxi_usb_phy_exit(0); - return sunxi_usb_phy_remove(0); + return 0; } const struct musb_platform_ops sunxi_musb_ops = { |