All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Wesley Cheng <quic_wcheng@quicinc.com>
Cc: Melody Olvera <melody.olvera@oss.qualcomm.com>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 06/10] phy: qcom: Add M31 based eUSB2 PHY driver
Date: Wed, 14 May 2025 09:33:44 +0100	[thread overview]
Message-ID: <aCRVaNDQP/PdAXPR@vaman> (raw)
In-Reply-To: <0517c37d-b1ba-466e-bffd-9f47b0d458d5@quicinc.com>

On 16-04-25, 15:45, Wesley Cheng wrote:
> Hi Vinod,
> 
> On 4/10/2025 4:53 AM, Vinod Koul wrote:
> > On 09-04-25, 10:48, Melody Olvera wrote:
> > 
> >> +static int m31eusb2_phy_write_readback(void __iomem *base, u32 offset,
> >> +					const u32 mask, u32 val)
> >> +{
> >> +	u32 write_val;
> >> +	u32 tmp;
> >> +
> >> +	tmp = readl_relaxed(base + offset);
> >> +	tmp &= ~mask;
> >> +	write_val = tmp | val;
> >> +
> >> +	writel_relaxed(write_val, base + offset);
> >> +
> >> +	tmp = readl_relaxed(base + offset);
> > 
> > Why are you using _relaxed version here?
> > 
> 
> No particular reason.  I think someone pointed this out previously, and I
> was open to use the non-relaxed variants, but I assume using the relaxed vs
> non-relaxed apis comes down to preference in this case.

Nope you cant! There _needs_ to be a specific reasons!
When you are doing read, modify, write, it is very important to know the
right version to use...

-- 
~Vinod


WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vkoul@kernel.org>
To: Wesley Cheng <quic_wcheng@quicinc.com>
Cc: Melody Olvera <melody.olvera@oss.qualcomm.com>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 06/10] phy: qcom: Add M31 based eUSB2 PHY driver
Date: Wed, 14 May 2025 09:33:44 +0100	[thread overview]
Message-ID: <aCRVaNDQP/PdAXPR@vaman> (raw)
In-Reply-To: <0517c37d-b1ba-466e-bffd-9f47b0d458d5@quicinc.com>

On 16-04-25, 15:45, Wesley Cheng wrote:
> Hi Vinod,
> 
> On 4/10/2025 4:53 AM, Vinod Koul wrote:
> > On 09-04-25, 10:48, Melody Olvera wrote:
> > 
> >> +static int m31eusb2_phy_write_readback(void __iomem *base, u32 offset,
> >> +					const u32 mask, u32 val)
> >> +{
> >> +	u32 write_val;
> >> +	u32 tmp;
> >> +
> >> +	tmp = readl_relaxed(base + offset);
> >> +	tmp &= ~mask;
> >> +	write_val = tmp | val;
> >> +
> >> +	writel_relaxed(write_val, base + offset);
> >> +
> >> +	tmp = readl_relaxed(base + offset);
> > 
> > Why are you using _relaxed version here?
> > 
> 
> No particular reason.  I think someone pointed this out previously, and I
> was open to use the non-relaxed variants, but I assume using the relaxed vs
> non-relaxed apis comes down to preference in this case.

Nope you cant! There _needs_ to be a specific reasons!
When you are doing read, modify, write, it is very important to know the
right version to use...

-- 
~Vinod

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2025-05-14  9:28 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09 17:48 [PATCH v4 00/10] phy: qcom: Introduce USB support for SM8750 Melody Olvera
2025-04-09 17:48 ` Melody Olvera
2025-04-09 17:48 ` [PATCH v4 01/10] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Add SM8750 to QMP PHY Melody Olvera
2025-04-09 17:48   ` Melody Olvera
2025-04-09 17:48 ` [PATCH v4 02/10] dt-bindings: phy: Add the M31 based eUSB2 PHY bindings Melody Olvera
2025-04-09 17:48   ` Melody Olvera
2025-04-09 17:48 ` [PATCH v4 03/10] dt-bindings: usb: qcom,dwc3: Add SM8750 compatible Melody Olvera
2025-04-09 17:48   ` Melody Olvera
2025-04-09 17:48 ` [PATCH v4 04/10] phy: qcom: qmp-combo: Add new PHY sequences for SM8750 Melody Olvera
2025-04-09 17:48   ` Melody Olvera
2025-04-10  3:21   ` Dmitry Baryshkov
2025-04-10  3:21     ` Dmitry Baryshkov
2025-04-09 17:48 ` [PATCH v4 05/10] phy: qcom: Update description for QCOM based eUSB2 repeater Melody Olvera
2025-04-09 17:48   ` Melody Olvera
2025-04-09 17:48 ` [PATCH v4 06/10] phy: qcom: Add M31 based eUSB2 PHY driver Melody Olvera
2025-04-09 17:48   ` Melody Olvera
2025-04-10  3:22   ` Dmitry Baryshkov
2025-04-10  3:22     ` Dmitry Baryshkov
2025-04-10 11:53   ` Vinod Koul
2025-04-10 11:53     ` Vinod Koul
2025-04-16 22:45     ` Wesley Cheng
2025-04-16 22:45       ` Wesley Cheng
2025-05-14  8:33       ` Vinod Koul [this message]
2025-05-14  8:33         ` Vinod Koul
2025-05-14 18:24         ` Wesley Cheng
2025-05-14 18:24           ` Wesley Cheng
2025-05-17 18:28           ` Konrad Dybcio
2025-05-17 18:28             ` Konrad Dybcio
2025-05-19 22:04             ` Wesley Cheng
2025-05-19 22:04               ` Wesley Cheng
2025-05-19 22:43               ` Konrad Dybcio
2025-05-19 22:43                 ` Konrad Dybcio
2025-04-09 17:48 ` [PATCH v4 07/10] arm64: dts: qcom: sm8750: Add USB support to SM8750 SoCs Melody Olvera
2025-04-09 17:48   ` Melody Olvera
2025-04-09 17:48 ` [PATCH v4 08/10] arm64: dts: qcom: sm8750: Add USB support for SM8750 MTP platform Melody Olvera
2025-04-09 17:48   ` Melody Olvera
2025-04-09 17:48 ` [PATCH v4 09/10] arm64: dts: qcom: sm8750: Add USB support for SM8750 QRD platform Melody Olvera
2025-04-09 17:48   ` Melody Olvera
2025-04-09 17:48 ` [PATCH v4 10/10] arm64: defconfig: Add M31 eUSB2 PHY config for SM8750 Melody Olvera
2025-04-09 17:48   ` Melody Olvera
2025-04-10  2:38 ` [PATCH v4 00/10] phy: qcom: Introduce USB support " Rob Herring (Arm)
2025-04-10  2:38   ` Rob Herring (Arm)
2025-04-10  3:22 ` Dmitry Baryshkov
2025-04-10  3:22   ` Dmitry Baryshkov

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=aCRVaNDQP/PdAXPR@vaman \
    --to=vkoul@kernel.org \
    --cc=andersson@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=melody.olvera@oss.qualcomm.com \
    --cc=p.zabel@pengutronix.de \
    --cc=quic_wcheng@quicinc.com \
    --cc=robh@kernel.org \
    --cc=will@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.