|
@@ -40,8 +40,6 @@
|
|
#include <linux/usb/msm_hsusb_hw.h>
|
|
#include <linux/usb/msm_hsusb_hw.h>
|
|
#include <linux/regulator/consumer.h>
|
|
#include <linux/regulator/consumer.h>
|
|
|
|
|
|
-#include <mach/clk.h>
|
|
|
|
-
|
|
|
|
#define MSM_USB_BASE (motg->regs)
|
|
#define MSM_USB_BASE (motg->regs)
|
|
#define DRIVER_NAME "msm_otg"
|
|
#define DRIVER_NAME "msm_otg"
|
|
|
|
|
|
@@ -308,33 +306,30 @@ static void ulpi_init(struct msm_otg *motg)
|
|
|
|
|
|
static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)
|
|
static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)
|
|
{
|
|
{
|
|
- int ret;
|
|
|
|
|
|
+ int ret = 0;
|
|
|
|
+
|
|
|
|
+ if (!motg->pdata->link_clk_reset)
|
|
|
|
+ return ret;
|
|
|
|
+
|
|
|
|
+ ret = motg->pdata->link_clk_reset(motg->clk, assert);
|
|
|
|
+ if (ret)
|
|
|
|
+ dev_err(motg->phy.dev, "usb link clk reset %s failed\n",
|
|
|
|
+ assert ? "assert" : "deassert");
|
|
|
|
|
|
- if (assert) {
|
|
|
|
- ret = clk_reset(motg->clk, CLK_RESET_ASSERT);
|
|
|
|
- if (ret)
|
|
|
|
- dev_err(motg->phy.dev, "usb hs_clk assert failed\n");
|
|
|
|
- } else {
|
|
|
|
- ret = clk_reset(motg->clk, CLK_RESET_DEASSERT);
|
|
|
|
- if (ret)
|
|
|
|
- dev_err(motg->phy.dev, "usb hs_clk deassert failed\n");
|
|
|
|
- }
|
|
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
static int msm_otg_phy_clk_reset(struct msm_otg *motg)
|
|
static int msm_otg_phy_clk_reset(struct msm_otg *motg)
|
|
{
|
|
{
|
|
- int ret;
|
|
|
|
|
|
+ int ret = 0;
|
|
|
|
|
|
- ret = clk_reset(motg->phy_reset_clk, CLK_RESET_ASSERT);
|
|
|
|
- if (ret) {
|
|
|
|
- dev_err(motg->phy.dev, "usb phy clk assert failed\n");
|
|
|
|
|
|
+ if (!motg->pdata->phy_clk_reset)
|
|
return ret;
|
|
return ret;
|
|
- }
|
|
|
|
- usleep_range(10000, 12000);
|
|
|
|
- ret = clk_reset(motg->phy_reset_clk, CLK_RESET_DEASSERT);
|
|
|
|
|
|
+
|
|
|
|
+ ret = motg->pdata->phy_clk_reset(motg->phy_reset_clk);
|
|
if (ret)
|
|
if (ret)
|
|
- dev_err(motg->phy.dev, "usb phy clk deassert failed\n");
|
|
|
|
|
|
+ dev_err(motg->phy.dev, "usb phy clk reset failed\n");
|
|
|
|
+
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|