diff options
Diffstat (limited to 'target/linux/ipq806x/patches-4.14/0074-ipq806x-usb-Control-USB-master-reset.patch')
-rw-r--r-- | target/linux/ipq806x/patches-4.14/0074-ipq806x-usb-Control-USB-master-reset.patch | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/target/linux/ipq806x/patches-4.14/0074-ipq806x-usb-Control-USB-master-reset.patch b/target/linux/ipq806x/patches-4.14/0074-ipq806x-usb-Control-USB-master-reset.patch index fd208e4ffa..24cfd18020 100644 --- a/target/linux/ipq806x/patches-4.14/0074-ipq806x-usb-Control-USB-master-reset.patch +++ b/target/linux/ipq806x/patches-4.14/0074-ipq806x-usb-Control-USB-master-reset.patch @@ -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); |