kernel: bump 4.14 to 4.14.48 for 18.06
[openwrt/openwrt.git] / target / linux / ipq806x / patches-4.14 / 0074-ipq806x-usb-Control-USB-master-reset.patch
index fd208e4ffacddf1d85e65c7a1b5f7c41bb70f5fd..24cfd1802044e1e2ceb84f0de2f89947d4e13b07 100644 (file)
@@ -26,19 +26,19 @@ Signed-off-by: Vasudevan Murugesan <vmuruges@codeaurora.org>
  #include <linux/of.h>
  #include <linux/of_platform.h>
  #include <linux/pm_runtime.h>
-@@ -33,6 +34,8 @@
-       struct device           *dev;
-       struct clk              **clks;
-       int                     num_clocks;
+@@ -33,6 +34,8 @@ struct dwc3_of_simple {
+       struct device           *dev;
+       struct clk              **clks;
+       int                     num_clocks;
 +      struct reset_control    *mstr_rst_30_0;
 +      struct reset_control    *mstr_rst_30_1;
  };
-
  static int dwc3_of_simple_clk_init(struct dwc3_of_simple *simple, int count)
-@@ -102,6 +105,20 @@
-       if (ret)
-               return ret;
-
+@@ -102,6 +105,20 @@ static int dwc3_of_simple_probe(struct p
+       if (ret)
+               return ret;
 +      simple->mstr_rst_30_0 = devm_reset_control_get(dev, "usb30_0_mstr_rst");
 +
 +      if (!IS_ERR(simple->mstr_rst_30_0))
@@ -53,19 +53,19 @@ Signed-off-by: Vasudevan Murugesan <vmuruges@codeaurora.org>
 +      else
 +              dev_dbg(simple->dev, "cannot get handle for USB PHY 1 master reset control\n");
 +
-       ret = of_platform_populate(np, NULL, NULL, dev);
-       if (ret) {
-               for (i = 0; i < simple->num_clocks; i++) {
-@@ -130,6 +147,12 @@
-               clk_put(simple->clks[i]);
-       }
-
+       ret = of_platform_populate(np, NULL, NULL, dev);
+       if (ret) {
+               for (i = 0; i < simple->num_clocks; i++) {
+@@ -130,6 +147,12 @@ static int dwc3_of_simple_remove(struct
+               clk_put(simple->clks[i]);
+       }
 +      if (!IS_ERR(simple->mstr_rst_30_0))
 +              reset_control_assert(simple->mstr_rst_30_0);
 +
 +      if (!IS_ERR(simple->mstr_rst_30_1))
 +              reset_control_assert(simple->mstr_rst_30_1);
 +
-       of_platform_depopulate(dev);
-
-       pm_runtime_put_sync(dev);
+       of_platform_depopulate(dev);
+       pm_runtime_put_sync(dev);