aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/phy/Kconfig2
-rw-r--r--drivers/usb/phy/phy-msm-usb.c18
-rw-r--r--include/linux/usb/msm_hsusb.h4
3 files changed, 3 insertions, 21 deletions
diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
index 52d3d58252e1..2fb3828b5089 100644
--- a/drivers/usb/phy/Kconfig
+++ b/drivers/usb/phy/Kconfig
@@ -139,7 +139,7 @@ config USB_ISP1301
139 139
140config USB_MSM_OTG 140config USB_MSM_OTG
141 tristate "Qualcomm on-chip USB OTG controller support" 141 tristate "Qualcomm on-chip USB OTG controller support"
142 depends on (USB || USB_GADGET) && (ARCH_MSM || ARCH_QCOM || COMPILE_TEST) 142 depends on (USB || USB_GADGET) && (ARCH_QCOM || COMPILE_TEST)
143 depends on RESET_CONTROLLER 143 depends on RESET_CONTROLLER
144 select USB_PHY 144 select USB_PHY
145 help 145 help
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 000fd892455f..b50c45c62da7 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -263,9 +263,7 @@ static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)
263{ 263{
264 int ret; 264 int ret;
265 265
266 if (motg->pdata->link_clk_reset) 266 if (assert)
267 ret = motg->pdata->link_clk_reset(motg->clk, assert);
268 else if (assert)
269 ret = reset_control_assert(motg->link_rst); 267 ret = reset_control_assert(motg->link_rst);
270 else 268 else
271 ret = reset_control_deassert(motg->link_rst); 269 ret = reset_control_deassert(motg->link_rst);
@@ -281,9 +279,7 @@ static int msm_otg_phy_clk_reset(struct msm_otg *motg)
281{ 279{
282 int ret = 0; 280 int ret = 0;
283 281
284 if (motg->pdata->phy_clk_reset) 282 if (motg->phy_rst)
285 ret = motg->pdata->phy_clk_reset(motg->phy_reset_clk);
286 else if (motg->phy_rst)
287 ret = reset_control_reset(motg->phy_rst); 283 ret = reset_control_reset(motg->phy_rst);
288 284
289 if (ret) 285 if (ret)
@@ -1551,16 +1547,6 @@ static int msm_otg_probe(struct platform_device *pdev)
1551 phy = &motg->phy; 1547 phy = &motg->phy;
1552 phy->dev = &pdev->dev; 1548 phy->dev = &pdev->dev;
1553 1549
1554 if (motg->pdata->phy_clk_reset) {
1555 motg->phy_reset_clk = devm_clk_get(&pdev->dev,
1556 np ? "phy" : "usb_phy_clk");
1557
1558 if (IS_ERR(motg->phy_reset_clk)) {
1559 dev_err(&pdev->dev, "failed to get usb_phy_clk\n");
1560 return PTR_ERR(motg->phy_reset_clk);
1561 }
1562 }
1563
1564 motg->clk = devm_clk_get(&pdev->dev, np ? "core" : "usb_hs_clk"); 1550 motg->clk = devm_clk_get(&pdev->dev, np ? "core" : "usb_hs_clk");
1565 if (IS_ERR(motg->clk)) { 1551 if (IS_ERR(motg->clk)) {
1566 dev_err(&pdev->dev, "failed to get usb_hs_clk\n"); 1552 dev_err(&pdev->dev, "failed to get usb_hs_clk\n");
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h
index b0a39243295a..7dbecf9a4656 100644
--- a/include/linux/usb/msm_hsusb.h
+++ b/include/linux/usb/msm_hsusb.h
@@ -117,8 +117,6 @@ struct msm_otg_platform_data {
117 enum otg_control_type otg_control; 117 enum otg_control_type otg_control;
118 enum msm_usb_phy_type phy_type; 118 enum msm_usb_phy_type phy_type;
119 void (*setup_gpio)(enum usb_otg_state state); 119 void (*setup_gpio)(enum usb_otg_state state);
120 int (*link_clk_reset)(struct clk *link_clk, bool assert);
121 int (*phy_clk_reset)(struct clk *phy_clk);
122}; 120};
123 121
124/** 122/**
@@ -128,7 +126,6 @@ struct msm_otg_platform_data {
128 * @irq: IRQ number assigned for HSUSB controller. 126 * @irq: IRQ number assigned for HSUSB controller.
129 * @clk: clock struct of usb_hs_clk. 127 * @clk: clock struct of usb_hs_clk.
130 * @pclk: clock struct of usb_hs_pclk. 128 * @pclk: clock struct of usb_hs_pclk.
131 * @phy_reset_clk: clock struct of usb_phy_clk.
132 * @core_clk: clock struct of usb_hs_core_clk. 129 * @core_clk: clock struct of usb_hs_core_clk.
133 * @regs: ioremapped register base address. 130 * @regs: ioremapped register base address.
134 * @inputs: OTG state machine inputs(Id, SessValid etc). 131 * @inputs: OTG state machine inputs(Id, SessValid etc).
@@ -148,7 +145,6 @@ struct msm_otg {
148 int irq; 145 int irq;
149 struct clk *clk; 146 struct clk *clk;
150 struct clk *pclk; 147 struct clk *pclk;
151 struct clk *phy_reset_clk;
152 struct clk *core_clk; 148 struct clk *core_clk;
153 void __iomem *regs; 149 void __iomem *regs;
154#define ID 0 150#define ID 0