Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933037AbcJRO3K (ORCPT ); Tue, 18 Oct 2016 10:29:10 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41791 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761482AbcJRO2y (ORCPT ); Tue, 18 Oct 2016 10:28:54 -0400 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 6167461818 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=vivek.gautam@codeaurora.org From: Vivek Gautam To: kishon@ti.com, jejb@linux.vnet.ibm.com, vinholikatti@gmail.com, martin.petersen@oracle.com, linux-kernel@vger.kernel.org Cc: subhashj@codeaurora.org, linux-scsi@vger.kernel.org, linux-arm-msm@vger.kernel.org, Yaniv Gardi , Vivek Gautam Subject: [PATCH v2 01/10] phy: qcom-ufs: remove failure when rx/tx_iface_clk are absent Date: Tue, 18 Oct 2016 19:58:08 +0530 Message-Id: <1476800897-19898-2-git-send-email-vivek.gautam@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1476800897-19898-1-git-send-email-vivek.gautam@codeaurora.org> References: <1476800897-19898-1-git-send-email-vivek.gautam@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1648 Lines: 52 From: Yaniv Gardi 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. Signed-off-by: Yaniv Gardi Signed-off-by: Vivek Gautam --- No change since v1. drivers/phy/phy-qcom-ufs.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c index 107cb57..183ec04 100644 --- a/drivers/phy/phy-qcom-ufs.c +++ b/drivers/phy/phy-qcom-ufs.c @@ -186,16 +186,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); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project