linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manu Gautam <mgautam@codeaurora.org>
To: Can Guo <cang@codeaurora.org>,
	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
Subject: Re: [PATCH v7 3/4] phy: Add QMP phy based UFS phy support for sdm845
Date: Thu, 28 Jun 2018 09:16:11 +0530	[thread overview]
Message-ID: <996e8b41-9090-7961-45c0-fdf6fc83c30a@codeaurora.org> (raw)
In-Reply-To: <20180619083647.10116-4-cang@codeaurora.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

  parent reply	other threads:[~2018-06-28  3:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19  8:36 [PATCH v7 0/4] Support for Qualcomm UFS QMP PHY on SDM845 Can Guo
2018-06-19  8:36 ` [PATCH v7 1/4] phy: Update PHY power control sequence Can Guo
2018-06-28  3:49   ` Manu Gautam
2018-07-02 17:00   ` Vivek Gautam
2018-07-25 20:26     ` Evan Green
2018-06-19  8:36 ` [PATCH v7 2/4] phy: General struct and field cleanup Can Guo
2018-06-27 20:17   ` Evan Green
2018-06-28  3:48   ` Manu Gautam
2018-07-02  6:42   ` Vivek Gautam
2018-06-19  8:36 ` [PATCH v7 3/4] phy: Add QMP phy based UFS phy support for sdm845 Can Guo
2018-06-27 20:17   ` Evan Green
2018-07-06  8:01     ` cang
2018-06-28  3:46   ` Manu Gautam [this message]
2018-06-19  8:36 ` [PATCH v7 4/4] dt-bindings: phy-qcom-qmp: Add UFS phy compatible string " Can Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=996e8b41-9090-7961-45c0-fdf6fc83c30a@codeaurora.org \
    --to=mgautam@codeaurora.org \
    --cc=asutoshd@codeaurora.org \
    --cc=cang@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kishon@ti.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=subhashj@codeaurora.org \
    --cc=vivek.gautam@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).