From patchwork Tue Oct 18 04:48:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 9381283 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1213B600CA for ; Tue, 18 Oct 2016 04:51:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 033DB291F2 for ; Tue, 18 Oct 2016 04:51:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC11029227; Tue, 18 Oct 2016 04:51:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 969A0291F2 for ; Tue, 18 Oct 2016 04:51:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755659AbcJREtc (ORCPT ); Tue, 18 Oct 2016 00:49:32 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35929 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754732AbcJREtU (ORCPT ); Tue, 18 Oct 2016 00:49:20 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 963C661818; Tue, 18 Oct 2016 04:49:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1476766159; bh=y+poTSpYHOAikl7fHrRdJPXYS2RNdMEwNPy8FTuIKKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JrCXZwkb59ZE1v3QXCyQ4Os4nwIHtGYCR/WsNkB/AQ51U4y32SPk8zD7m0ISvF1Lb sIVE2zz/DKBnjLFWw1XPZk3Q05vRpuRmUKdKml29Oqt8GAMHpOp4L+x/I95n5XJpaY O/B9s/LCCkERbOV7JLo3kUycLjQp97bsMu/at4UE= Received: from blr-ubuntu-41.ap.qualcomm.com (unknown [202.46.23.61]) (using TLSv1.1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek.gautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6D8F261810; Tue, 18 Oct 2016 04:49:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1476766158; bh=y+poTSpYHOAikl7fHrRdJPXYS2RNdMEwNPy8FTuIKKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mcmPTXFVAhQD23mMYn+iomXDPdQkIpcL+h5fTIlmdJenHDE9WWCxyTLIPu7dnqlaK uS+vcgpwicC4Bx28Fyo3CnmdOfU7yGcFUVe7of6fV9cO/nmcw9w71cC2eHbEWR8eXs wsVPcPqY4lra0oZ3KP7NKCy6k9cyRAqVbDU7d82I= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 6D8F261810 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 1/7] phy: qcom-ufs: remove failure when rx/tx_iface_clk are absent Date: Tue, 18 Oct 2016 10:18:59 +0530 Message-Id: <1476766145-27583-2-git-send-email-vivek.gautam@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1476766145-27583-1-git-send-email-vivek.gautam@codeaurora.org> References: <1476766145-27583-1-git-send-email-vivek.gautam@codeaurora.org> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);