aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivek Gautam <vivek.gautam@codeaurora.org>2018-09-04 06:17:17 -0400
committerKishon Vijay Abraham I <kishon@ti.com>2018-09-26 03:39:36 -0400
commit2ba3c43f09c50eb1c0472decdfba71010d8694dc (patch)
tree70751bae3b7d526431e5ea767083c5d0c364cdf9
parent99c7c7364b714e1de54a25c3642d991de1675e27 (diff)
phy: qcom-ufs: Remove stale methods that handle ref clk
Remove ufs_qcom_phy_enable/(disable)_dev_ref_clk() that are not being used by any code. Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
-rw-r--r--drivers/phy/qualcomm/phy-qcom-ufs.c50
-rw-r--r--include/linux/phy/phy-qcom-ufs.h14
2 files changed, 0 insertions, 64 deletions
diff --git a/drivers/phy/qualcomm/phy-qcom-ufs.c b/drivers/phy/qualcomm/phy-qcom-ufs.c
index c5493ea51282..f2979ccad00a 100644
--- a/drivers/phy/qualcomm/phy-qcom-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-ufs.c
@@ -431,56 +431,6 @@ static void ufs_qcom_phy_disable_ref_clk(struct ufs_qcom_phy *phy)
431 } 431 }
432} 432}
433 433
434#define UFS_REF_CLK_EN (1 << 5)
435
436static void ufs_qcom_phy_dev_ref_clk_ctrl(struct phy *generic_phy, bool enable)
437{
438 struct ufs_qcom_phy *phy = get_ufs_qcom_phy(generic_phy);
439
440 if (phy->dev_ref_clk_ctrl_mmio &&
441 (enable ^ phy->is_dev_ref_clk_enabled)) {
442 u32 temp = readl_relaxed(phy->dev_ref_clk_ctrl_mmio);
443
444 if (enable)
445 temp |= UFS_REF_CLK_EN;
446 else
447 temp &= ~UFS_REF_CLK_EN;
448
449 /*
450 * If we are here to disable this clock immediately after
451 * entering into hibern8, we need to make sure that device
452 * ref_clk is active atleast 1us after the hibern8 enter.
453 */
454 if (!enable)
455 udelay(1);
456
457 writel_relaxed(temp, phy->dev_ref_clk_ctrl_mmio);
458 /* ensure that ref_clk is enabled/disabled before we return */
459 wmb();
460 /*
461 * If we call hibern8 exit after this, we need to make sure that
462 * device ref_clk is stable for atleast 1us before the hibern8
463 * exit command.
464 */
465 if (enable)
466 udelay(1);
467
468 phy->is_dev_ref_clk_enabled = enable;
469 }
470}
471
472void ufs_qcom_phy_enable_dev_ref_clk(struct phy *generic_phy)
473{
474 ufs_qcom_phy_dev_ref_clk_ctrl(generic_phy, true);
475}
476EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_dev_ref_clk);
477
478void ufs_qcom_phy_disable_dev_ref_clk(struct phy *generic_phy)
479{
480 ufs_qcom_phy_dev_ref_clk_ctrl(generic_phy, false);
481}
482EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_dev_ref_clk);
483
484/* Turn ON M-PHY RMMI interface clocks */ 434/* Turn ON M-PHY RMMI interface clocks */
485static int ufs_qcom_phy_enable_iface_clk(struct ufs_qcom_phy *phy) 435static int ufs_qcom_phy_enable_iface_clk(struct ufs_qcom_phy *phy)
486{ 436{
diff --git a/include/linux/phy/phy-qcom-ufs.h b/include/linux/phy/phy-qcom-ufs.h
index 0a2c18a9771d..9dd85071bcce 100644
--- a/include/linux/phy/phy-qcom-ufs.h
+++ b/include/linux/phy/phy-qcom-ufs.h
@@ -17,20 +17,6 @@
17 17
18#include "phy.h" 18#include "phy.h"
19 19
20/**
21 * ufs_qcom_phy_enable_dev_ref_clk() - Enable the device
22 * ref clock.
23 * @phy: reference to a generic phy.
24 */
25void ufs_qcom_phy_enable_dev_ref_clk(struct phy *phy);
26
27/**
28 * ufs_qcom_phy_disable_dev_ref_clk() - Disable the device
29 * ref clock.
30 * @phy: reference to a generic phy.
31 */
32void ufs_qcom_phy_disable_dev_ref_clk(struct phy *phy);
33
34int ufs_qcom_phy_set_tx_lane_enable(struct phy *phy, u32 tx_lanes); 20int ufs_qcom_phy_set_tx_lane_enable(struct phy *phy, u32 tx_lanes);
35void ufs_qcom_phy_save_controller_version(struct phy *phy, 21void ufs_qcom_phy_save_controller_version(struct phy *phy,
36 u8 major, u16 minor, u16 step); 22 u8 major, u16 minor, u16 step);