aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/patches-4.14/0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2018-05-07 12:07:32 +0200
committerJohn Crispin <john@phrozen.org>2018-05-24 22:11:55 +0200
commit050da2107a7eb2a571a8a3d0cee21cc6a44b72b8 (patch)
tree147c3b85ccae12e4b1659acd86ac93b13ecfa15d /target/linux/mediatek/patches-4.14/0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch
parent4f67c1522d92bc4512c3ecf58c38ff9886530b48 (diff)
downloadupstream-050da2107a7eb2a571a8a3d0cee21cc6a44b72b8.tar.gz
upstream-050da2107a7eb2a571a8a3d0cee21cc6a44b72b8.tar.bz2
upstream-050da2107a7eb2a571a8a3d0cee21cc6a44b72b8.zip
mediatek: backport upstream mediatek patches
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/mediatek/patches-4.14/0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch')
-rw-r--r--target/linux/mediatek/patches-4.14/0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch93
1 files changed, 93 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches-4.14/0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch b/target/linux/mediatek/patches-4.14/0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch
new file mode 100644
index 0000000000..cb595ff7de
--- /dev/null
+++ b/target/linux/mediatek/patches-4.14/0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch
@@ -0,0 +1,93 @@
+From 25adaf94e0fcbf6c1b47cb610edb7f5c23c53139 Mon Sep 17 00:00:00 2001
+From: Chunfeng Yun <chunfeng.yun@mediatek.com>
+Date: Fri, 13 Oct 2017 16:26:37 +0800
+Subject: [PATCH 130/224] usb: xhci-mtk: remove dummy wakeup debounce clocks
+
+The wakeup debounce clocks for each ports in fact are not
+needed, so remove them.
+
+Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
+Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/host/xhci-mtk.c | 33 ---------------------------------
+ drivers/usb/host/xhci-mtk.h | 2 --
+ 2 files changed, 35 deletions(-)
+
+diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
+index 97ba51e4e149..d60463c07c54 100644
+--- a/drivers/usb/host/xhci-mtk.c
++++ b/drivers/usb/host/xhci-mtk.c
+@@ -237,25 +237,8 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
+ goto sys_clk_err;
+ }
+
+- if (mtk->wakeup_src) {
+- ret = clk_prepare_enable(mtk->wk_deb_p0);
+- if (ret) {
+- dev_err(mtk->dev, "failed to enable wk_deb_p0\n");
+- goto usb_p0_err;
+- }
+-
+- ret = clk_prepare_enable(mtk->wk_deb_p1);
+- if (ret) {
+- dev_err(mtk->dev, "failed to enable wk_deb_p1\n");
+- goto usb_p1_err;
+- }
+- }
+ return 0;
+
+-usb_p1_err:
+- clk_disable_unprepare(mtk->wk_deb_p0);
+-usb_p0_err:
+- clk_disable_unprepare(mtk->sys_clk);
+ sys_clk_err:
+ clk_disable_unprepare(mtk->ref_clk);
+ ref_clk_err:
+@@ -264,10 +247,6 @@ static int xhci_mtk_clks_enable(struct xhci_hcd_mtk *mtk)
+
+ static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk)
+ {
+- if (mtk->wakeup_src) {
+- clk_disable_unprepare(mtk->wk_deb_p1);
+- clk_disable_unprepare(mtk->wk_deb_p0);
+- }
+ clk_disable_unprepare(mtk->sys_clk);
+ clk_disable_unprepare(mtk->ref_clk);
+ }
+@@ -371,18 +350,6 @@ static int usb_wakeup_of_property_parse(struct xhci_hcd_mtk *mtk,
+ if (!mtk->wakeup_src)
+ return 0;
+
+- mtk->wk_deb_p0 = devm_clk_get(dev, "wakeup_deb_p0");
+- if (IS_ERR(mtk->wk_deb_p0)) {
+- dev_err(dev, "fail to get wakeup_deb_p0\n");
+- return PTR_ERR(mtk->wk_deb_p0);
+- }
+-
+- mtk->wk_deb_p1 = devm_clk_get(dev, "wakeup_deb_p1");
+- if (IS_ERR(mtk->wk_deb_p1)) {
+- dev_err(dev, "fail to get wakeup_deb_p1\n");
+- return PTR_ERR(mtk->wk_deb_p1);
+- }
+-
+ mtk->pericfg = syscon_regmap_lookup_by_phandle(dn,
+ "mediatek,syscon-wakeup");
+ if (IS_ERR(mtk->pericfg)) {
+diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h
+index db55a12f1585..67783a7af509 100644
+--- a/drivers/usb/host/xhci-mtk.h
++++ b/drivers/usb/host/xhci-mtk.h
+@@ -126,8 +126,6 @@ struct xhci_hcd_mtk {
+ struct regulator *vbus;
+ struct clk *sys_clk; /* sys and mac clock */
+ struct clk *ref_clk;
+- struct clk *wk_deb_p0; /* port0's wakeup debounce clock */
+- struct clk *wk_deb_p1;
+ struct regmap *pericfg;
+ struct phy **phys;
+ int num_phys;
+--
+2.11.0
+