diff options
author | Subhash Jadavani <subhashj@codeaurora.org> | 2015-01-23 18:21:52 -0800 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:01:14 -0700 |
commit | 10ad03a4d89c64584d790a8b58c5d271f6cb28fa (patch) | |
tree | 0338cdb936d4f599274908fb9cfa71002e8133f0 | |
parent | a3baab3d3fdc6898982609af6b537ba6ece74988 (diff) |
phy: qcom-ufs-qmp-14nm: fix analog power collapse handling
To power collapse UFS PHY, we need to write 0 to
UFS_PHY_POWER_DOWN_CONTROL register but instead we are writing 1 to
it. This change fixes this issue.
Change-Id: Ib12226bd3adefb2d5848aa6e7c20ae0263865148
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
-rw-r--r-- | drivers/phy/phy-qcom-ufs-qmp-14nm.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/phy/phy-qcom-ufs-qmp-14nm.c b/drivers/phy/phy-qcom-ufs-qmp-14nm.c index c6cf41964d8d..ea7387c43263 100644 --- a/drivers/phy/phy-qcom-ufs-qmp-14nm.c +++ b/drivers/phy/phy-qcom-ufs-qmp-14nm.c @@ -100,7 +100,7 @@ out: static void ufs_qcom_phy_qmp_14nm_power_control(struct ufs_qcom_phy *phy, - bool is_pwr_collapse) + bool power_ctrl) { bool is_workaround_req = false; @@ -108,7 +108,8 @@ void ufs_qcom_phy_qmp_14nm_power_control(struct ufs_qcom_phy *phy, UFS_QCOM_PHY_QUIRK_HIBERN8_EXIT_AFTER_PHY_PWR_COLLAPSE) is_workaround_req = true; - if (is_pwr_collapse) { + if (!power_ctrl) { + /* apply PHY analog power collapse */ if (is_workaround_req) { /* assert common reset before analog power collapse */ writel_relaxed(0x1, phy->mmio + QSERDES_COM_SW_RESET); @@ -119,7 +120,7 @@ void ufs_qcom_phy_qmp_14nm_power_control(struct ufs_qcom_phy *phy, mb(); } /* apply analog power collapse */ - writel_relaxed(0x1, phy->mmio + UFS_PHY_POWER_DOWN_CONTROL); + writel_relaxed(0x0, phy->mmio + UFS_PHY_POWER_DOWN_CONTROL); /* * Make sure that PHY knows its analog rail is going to be * powered OFF. @@ -127,7 +128,7 @@ void ufs_qcom_phy_qmp_14nm_power_control(struct ufs_qcom_phy *phy, mb(); } else { /* bring PHY out of analog power collapse */ - writel_relaxed(0x0, phy->mmio + UFS_PHY_POWER_DOWN_CONTROL); + writel_relaxed(0x1, phy->mmio + UFS_PHY_POWER_DOWN_CONTROL); /* * Before any transactions involving PHY, ensure PHY knows * that it's analog rail is powered ON. |