Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7117519imm; Wed, 27 Jun 2018 20:48:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ68x3kS1IMtb5epYrCmCrlV19nT1OZgPX5NvGpWA4cX78swRAGpOFP69P5nm3enZriEidl X-Received: by 2002:a17:902:b494:: with SMTP id y20-v6mr8644943plr.136.1530157698214; Wed, 27 Jun 2018 20:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530157698; cv=none; d=google.com; s=arc-20160816; b=eM4vTEL37W5eNX/lH9VMzFG6hbrZzs7b+4j3VivzbIghyCz+nVqK0BQ8lpne3uyhqQ 2lIVa7QzhLMbjJA6+V5jo2FMgwYg9WuXEqbrnxQ+ffmEcD2eBuTf7a8oblUZ247qiHLn apiHgglXOqU9vyhJ7TDOjlIxMB7a62YWMfd2yXSWiIpIY8R5MhyfbxnEf4whGHkfsoBk y/9SAlUMcruLd65GHrL9F1bhvQcoFGoALIwTI1kURLD+ptmpABTVG81ZRdkszEuB51EC swfpq39Bi+vj+Y9oQQ4FLXeeQgV5nljSTiqipk9hv9Z2QilAPa2i6zr9OoW+ajrDYgKU pJTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=Z68JCXySMi366WFsxcH3h4260fCE07uPlWfQRzg4eFA=; b=xw5o49QYsbgCd2Oe17oQQMXwsuP75Gc7yC77v+o4qq+1q2xgHx3x3maAvNUwXEH8xV 72oA3lY/9+CKT45ELAxmLqVA/oHEn78T6WfexBezswQkupsnHC8NJmzHC0vrR65UgD3O eADe95ZNXr98Qi+9yYd7GUaT5izPq9+y1o5hhR3AGwlLxNvYkgLOdOQ09CN5GeRn4Z2t op1QjfXorDtrqF1zu4sT1eFoxfdExc9xFUxLtuR3se/QZyEueh4kZ/MOkB51+x+v6RlH UbND0XAkMB0bqmbcUtVVapO46Yj/cYn6Ilr71BS8fW6GRP1/JZ8zeBBPj+Pvxi3tCx2h flYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=HTydpI44; dkim=pass header.i=@codeaurora.org header.s=default header.b=CVBMSXbC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3-v6si5473200plk.321.2018.06.27.20.48.03; Wed, 27 Jun 2018 20:48:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=HTydpI44; dkim=pass header.i=@codeaurora.org header.s=default header.b=CVBMSXbC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753251AbeF1DqX (ORCPT + 99 others); Wed, 27 Jun 2018 23:46:23 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:48110 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057AbeF1DqU (ORCPT ); Wed, 27 Jun 2018 23:46:20 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2963E60B6B; Thu, 28 Jun 2018 03:46:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530157580; bh=Z4LOTTo8aSEEVRpqfRal8HcZDzCfC9iTsc6Mx6N9KfQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=HTydpI44cI/HEv0I3lroQ5RAVcpSm/AOi/6ItAyUwZjsdAqUuIgRHt5lrtr5NqRaK ASVBbNwC7rGlh3VVn6uT1Oy/WasotGPvl3H2QVFlXY/Y4CtXNddmistDaRkZyTpq6n ZVZ95v3SGb+vEsc7JlXJn6qAGp67m48qL4pB5c90= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.206.25.22] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id CF8C860B19; Thu, 28 Jun 2018 03:46:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530157576; bh=Z4LOTTo8aSEEVRpqfRal8HcZDzCfC9iTsc6Mx6N9KfQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=CVBMSXbCg2wmxtpY0HvJ/VULIK7eaKDfsmfYNPiCLj132RJdMJYoDUJlDj2n1R1m8 Dwuom/TXGHW07yyPYJG/aKFci9Daid4p5pSThCsE92GdlrFsNDqcrv+R+lXUosgK3H m9VcYl9MYNU+7HadltQdPgtmVWTKNJw7tvf2Vt3Q= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org CF8C860B19 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=mgautam@codeaurora.org Subject: Re: [PATCH v7 3/4] phy: Add QMP phy based UFS phy support for sdm845 To: Can Guo , subhashj@codeaurora.org, asutoshd@codeaurora.org, vivek.gautam@codeaurora.org, kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20180619083647.10116-1-cang@codeaurora.org> <20180619083647.10116-4-cang@codeaurora.org> From: Manu Gautam Message-ID: <996e8b41-9090-7961-45c0-fdf6fc83c30a@codeaurora.org> Date: Thu, 28 Jun 2018 09:16:11 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180619083647.10116-4-cang@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 6/19/2018 2:06 PM, Can Guo wrote: > +static int qcom_qmp_phy_poweron(struct phy *phy) > +{ > + struct qmp_phy *qphy = phy_get_drvdata(phy); > + struct qcom_qmp *qmp = qphy->qmp; > + const struct qmp_phy_cfg *cfg = qmp->cfg; > + void __iomem *pcs = qphy->pcs; > + void __iomem *status; > + unsigned int mask, val; > + int ret = 0; > + > + if (cfg->type != PHY_TYPE_UFS) > + return 0; > + > + /* > + * For UFS PHY that has not software reset control, serdes start > + * should only happen when UFS driver explicitly calls phy_power_on > + * after it deasserts software reset. > + */ Instead of relying on UFS glue driver to assert/de-assert PHY which requires UFS PHY initialization to be split in init() and poweron(), we can rather register reset_controller from ufs-qcom driver. PHY driver can then assert/de-assert as per UFS PHY requirement in init() function itself and there won't be any need to have poweron() routine for UFS as init can perform complete PHY initialization without any dependency on ufs-qcom glue driver. -Manu -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation