diff options
| author | Yaniv Gardi <ygardi@codeaurora.org> | 2015-07-09 15:01:15 +0300 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:01:21 -0700 |
| commit | 38a427e8703f0561da4f5ffc3190e365ca8a8fb9 (patch) | |
| tree | b977eccfd574c82b0859e3f0fb477540f97085dd /drivers/phy | |
| parent | 918a0229433b500ff065c49ee91f272bb2ac5b90 (diff) | |
phy: qcom-ufs: remove failure when rx/tx_iface_clk are absence
Since in future UFS Phy's the tx_iface_clk and rx_iface_clk
are no longer exist, we should not fail when their initialization
fail, but rather just report with debug message.
Change-Id: I87e4deca632d4d4ee9e35a03f2fc9c22987255b3
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Diffstat (limited to 'drivers/phy')
| -rw-r--r-- | drivers/phy/phy-qcom-ufs.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c index 058617daaa94..33fa3727b850 100644 --- a/drivers/phy/phy-qcom-ufs.c +++ b/drivers/phy/phy-qcom-ufs.c @@ -192,16 +192,27 @@ ufs_qcom_phy_init_clks(struct phy *generic_phy, struct ufs_qcom_phy *phy_common) { int err; + struct ufs_qcom_phy *phy = get_ufs_qcom_phy(generic_phy); err = ufs_qcom_phy_clk_get(generic_phy, "tx_iface_clk", &phy_common->tx_iface_clk); + /* + * tx_iface_clk does not exist in newer version of ufs-phy HW, + * so don't return error if it is not found + */ if (err) - goto out; + dev_dbg(phy->dev, "%s: failed to get tx_iface_clk\n", + __func__); err = ufs_qcom_phy_clk_get(generic_phy, "rx_iface_clk", &phy_common->rx_iface_clk); + /* + * rx_iface_clk does not exist in newer version of ufs-phy HW, + * so don't return error if it is not found + */ if (err) - goto out; + dev_dbg(phy->dev, "%s: failed to get rx_iface_clk\n", + __func__); err = ufs_qcom_phy_clk_get(generic_phy, "ref_clk_src", &phy_common->ref_clk_src); @@ -492,6 +503,9 @@ int ufs_qcom_phy_enable_iface_clk(struct phy *generic_phy) if (phy->is_iface_clk_enabled) goto out; + if (!phy->tx_iface_clk) + goto out; + ret = clk_prepare_enable(phy->tx_iface_clk); if (ret) { dev_err(phy->dev, "%s: tx_iface_clk enable failed %d\n", @@ -517,6 +531,9 @@ void ufs_qcom_phy_disable_iface_clk(struct phy *generic_phy) { struct ufs_qcom_phy *phy = get_ufs_qcom_phy(generic_phy); + if (!phy->tx_iface_clk) + return; + if (phy->is_iface_clk_enabled) { clk_disable_unprepare(phy->tx_iface_clk); clk_disable_unprepare(phy->rx_iface_clk); |
