0130-usb-xhci-mtk-remove-dummy-wakeup-debounce-clocks.patch 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. From 25adaf94e0fcbf6c1b47cb610edb7f5c23c53139 Mon Sep 17 00:00:00 2001
  2. From: Chunfeng Yun <[email protected]>
  3. Date: Fri, 13 Oct 2017 16:26:37 +0800
  4. Subject: [PATCH 130/224] usb: xhci-mtk: remove dummy wakeup debounce clocks
  5. The wakeup debounce clocks for each ports in fact are not
  6. needed, so remove them.
  7. Signed-off-by: Chunfeng Yun <[email protected]>
  8. Acked-by: Mathias Nyman <[email protected]>
  9. Reviewed-by: Matthias Brugger <[email protected]>
  10. Signed-off-by: Greg Kroah-Hartman <[email protected]>
  11. ---
  12. drivers/usb/host/xhci-mtk.c | 33 ---------------------------------
  13. drivers/usb/host/xhci-mtk.h | 2 --
  14. 2 files changed, 35 deletions(-)
  15. --- a/drivers/usb/host/xhci-mtk.c
  16. +++ b/drivers/usb/host/xhci-mtk.c
  17. @@ -237,25 +237,8 @@ static int xhci_mtk_clks_enable(struct x
  18. goto sys_clk_err;
  19. }
  20. - if (mtk->wakeup_src) {
  21. - ret = clk_prepare_enable(mtk->wk_deb_p0);
  22. - if (ret) {
  23. - dev_err(mtk->dev, "failed to enable wk_deb_p0\n");
  24. - goto usb_p0_err;
  25. - }
  26. -
  27. - ret = clk_prepare_enable(mtk->wk_deb_p1);
  28. - if (ret) {
  29. - dev_err(mtk->dev, "failed to enable wk_deb_p1\n");
  30. - goto usb_p1_err;
  31. - }
  32. - }
  33. return 0;
  34. -usb_p1_err:
  35. - clk_disable_unprepare(mtk->wk_deb_p0);
  36. -usb_p0_err:
  37. - clk_disable_unprepare(mtk->sys_clk);
  38. sys_clk_err:
  39. clk_disable_unprepare(mtk->ref_clk);
  40. ref_clk_err:
  41. @@ -264,10 +247,6 @@ ref_clk_err:
  42. static void xhci_mtk_clks_disable(struct xhci_hcd_mtk *mtk)
  43. {
  44. - if (mtk->wakeup_src) {
  45. - clk_disable_unprepare(mtk->wk_deb_p1);
  46. - clk_disable_unprepare(mtk->wk_deb_p0);
  47. - }
  48. clk_disable_unprepare(mtk->sys_clk);
  49. clk_disable_unprepare(mtk->ref_clk);
  50. }
  51. @@ -371,18 +350,6 @@ static int usb_wakeup_of_property_parse(
  52. if (!mtk->wakeup_src)
  53. return 0;
  54. - mtk->wk_deb_p0 = devm_clk_get(dev, "wakeup_deb_p0");
  55. - if (IS_ERR(mtk->wk_deb_p0)) {
  56. - dev_err(dev, "fail to get wakeup_deb_p0\n");
  57. - return PTR_ERR(mtk->wk_deb_p0);
  58. - }
  59. -
  60. - mtk->wk_deb_p1 = devm_clk_get(dev, "wakeup_deb_p1");
  61. - if (IS_ERR(mtk->wk_deb_p1)) {
  62. - dev_err(dev, "fail to get wakeup_deb_p1\n");
  63. - return PTR_ERR(mtk->wk_deb_p1);
  64. - }
  65. -
  66. mtk->pericfg = syscon_regmap_lookup_by_phandle(dn,
  67. "mediatek,syscon-wakeup");
  68. if (IS_ERR(mtk->pericfg)) {
  69. --- a/drivers/usb/host/xhci-mtk.h
  70. +++ b/drivers/usb/host/xhci-mtk.h
  71. @@ -126,8 +126,6 @@ struct xhci_hcd_mtk {
  72. struct regulator *vbus;
  73. struct clk *sys_clk; /* sys and mac clock */
  74. struct clk *ref_clk;
  75. - struct clk *wk_deb_p0; /* port0's wakeup debounce clock */
  76. - struct clk *wk_deb_p1;
  77. struct regmap *pericfg;
  78. struct phy **phys;
  79. int num_phys;