aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mfd/omap-usb-host.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 3ab9ffa00aa..55c5d4732f5 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -994,22 +994,33 @@ static void usbhs_disable(struct device *dev)
994 dev_dbg(dev, "operation timed out\n"); 994 dev_dbg(dev, "operation timed out\n");
995 } 995 }
996 996
997 if (pdata->ehci_data->phy_reset) { 997 if (is_omap_usbhs_rev2(omap)) {
998 if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0])) 998 if (is_ehci_tll_mode(pdata->port_mode[0]))
999 gpio_free(pdata->ehci_data->reset_gpio_port[0]); 999 clk_enable(omap->usbtll_p1_fck);
1000 1000 if (is_ehci_tll_mode(pdata->port_mode[1]))
1001 if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1])) 1001 clk_enable(omap->usbtll_p2_fck);
1002 gpio_free(pdata->ehci_data->reset_gpio_port[1]); 1002 clk_disable(omap->utmi_p2_fck);
1003 clk_disable(omap->utmi_p1_fck);
1003 } 1004 }
1004 1005
1005 clk_disable(omap->utmi_p2_fck);
1006 clk_disable(omap->utmi_p1_fck);
1007 clk_disable(omap->usbtll_ick); 1006 clk_disable(omap->usbtll_ick);
1008 clk_disable(omap->usbtll_fck); 1007 clk_disable(omap->usbtll_fck);
1009 clk_disable(omap->usbhost_fs_fck); 1008 clk_disable(omap->usbhost_fs_fck);
1010 clk_disable(omap->usbhost_hs_fck); 1009 clk_disable(omap->usbhost_hs_fck);
1011 clk_disable(omap->usbhost_ick); 1010 clk_disable(omap->usbhost_ick);
1012 1011
1012 /* The gpio_free migh sleep; so unlock the spinlock */
1013 spin_unlock_irqrestore(&omap->lock, flags);
1014
1015 if (pdata->ehci_data->phy_reset) {
1016 if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[0]))
1017 gpio_free(pdata->ehci_data->reset_gpio_port[0]);
1018
1019 if (gpio_is_valid(pdata->ehci_data->reset_gpio_port[1]))
1020 gpio_free(pdata->ehci_data->reset_gpio_port[1]);
1021 }
1022 return;
1023
1013end_disble: 1024end_disble:
1014 spin_unlock_irqrestore(&omap->lock, flags); 1025 spin_unlock_irqrestore(&omap->lock, flags);
1015} 1026}