From patchwork Thu Oct 12 06:19:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 10001103 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 109CF60216 for ; Thu, 12 Oct 2017 06:22:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0504A28CF4 for ; Thu, 12 Oct 2017 06:22:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E80DC28CF9; Thu, 12 Oct 2017 06:22:10 +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=unavailable 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 DFBF028D50 for ; Thu, 12 Oct 2017 06:21:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752972AbdJLGU2 (ORCPT ); Thu, 12 Oct 2017 02:20:28 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:58504 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173AbdJLGU0 (ORCPT ); Thu, 12 Oct 2017 02:20:26 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9C32A6084B; Thu, 12 Oct 2017 06:20:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1507789225; bh=pdLz2wK45cMtwiqgf6/+3hiG2zE1oelo9ZpaZbCY77o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T84AZVxy+aqAZrUHXnNxi31/0E3QTm9HwOLM35agyaRVxQAa8vEm099zlSkkUlnpF jQ4Smc10U71Zt/9296qVojNy4boejpNHrVZSbDTN7Ug8+nLQe0PqOFPM+JbqtWj5mO 2Zezo4Ip5N3GBNP6y7dQZwrbYh3bdTLdr1vbpwh8= Received: from blr-ubuntu-41.ap.qualcomm.com (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (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 ADF2060849; Thu, 12 Oct 2017 06:20:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1507789210; bh=pdLz2wK45cMtwiqgf6/+3hiG2zE1oelo9ZpaZbCY77o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S/uAN8zPvr+7Vg9NIqvAnnOOPuu/tFD3lgh4hKZh1borKppjLN5M7kvttkNPPBaRc dXxbZhlH5Z6f4KwAtkNNYWeQ3BZriM/KaFJ+vr/MnJD1OfWT8T8vZS7oGiwBZSqFev y1siJkMdt4YQk9ImZ7kmgM5JFowFNqRBQIjys0t4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org ADF2060849 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=vivek.gautam@codeaurora.org From: Vivek Gautam To: kishon@ti.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: subhashj@codeaurora.org, robh+dt@kernel.org, bjorn.andersson@linaro.org, devicetree@vger.kernel.org, Vivek Gautam Subject: [PATCH v2 4/5] scsi/ufs: qcom: Set phy mode based on the controllers HS MODE Date: Thu, 12 Oct 2017 11:49:35 +0530 Message-Id: <1507789176-2760-5-git-send-email-vivek.gautam@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507789176-2760-1-git-send-email-vivek.gautam@codeaurora.org> References: <1507789176-2760-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 Set the phy mode based on the UFS HS PA mode. This lets the controller let phy know the mode in which the PHY Adapter is running and set the phy rates accordingly. Signed-off-by: Vivek Gautam Reviewed-by: Subhash Jadavani --- Changes since v1: - none. drivers/scsi/ufs/ufs-qcom.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index 6a548e74d704..942e40c9eaf7 100644 --- a/drivers/scsi/ufs/ufs-qcom.c +++ b/drivers/scsi/ufs/ufs-qcom.c @@ -273,6 +273,9 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba) bool is_rate_B = (UFS_QCOM_LIMIT_HS_RATE == PA_HS_MODE_B) ? true : false; + if (is_rate_B) + phy_set_mode(phy, PHY_MODE_UFS_HS_B); + /* Assert PHY reset and apply PHY calibration values */ ufs_qcom_assert_reset(hba); /* provide 1ms delay to let the reset pulse propagate */