public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Frank Li <Frank.li@nxp.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"bjorn.andersson@oss.qualcomm.com"
	<bjorn.andersson@oss.qualcomm.com>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	Ze Huang <huang.ze@linux.dev>
Subject: Re: [PATCH v4 3/4] usb: dwc3: dwc3-generic-plat: Add layerscape dwc3 support
Date: Fri, 26 Sep 2025 23:52:48 +0000	[thread overview]
Message-ID: <20250926235247.c6zof6meqaxe24ll@synopsys.com> (raw)
In-Reply-To: <aNcim7GUT0/1rDb8@lizhi-Precision-Tower-5810>

On Fri, Sep 26, 2025, Frank Li wrote:
> On Fri, Sep 26, 2025 at 10:43:03PM +0000, Thinh Nguyen wrote:
> > On Fri, Sep 26, 2025, Frank Li via B4 Relay wrote:
> > > From: Frank Li <Frank.Li@nxp.com>
> > >
> > > Add layerscape dwc3 support by using flatten dwc3 core library. Layerscape
> > > dwc3 need set gsbuscfg0-reqinfo as 0x2222 when dma-coherence set.
> > >
> > > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > > ---
> > > chagne in v4
> > > - rename gsbuscfg0 to gsbuscfg0_reqinfo
> > > - use flatten core's properties.
> > >
> > > change in v3 (skipped)
> > > ---
> > >  drivers/usb/dwc3/dwc3-generic-plat.c | 15 ++++++++++++++-
> > >  1 file changed, 14 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/usb/dwc3/dwc3-generic-plat.c b/drivers/usb/dwc3/dwc3-generic-plat.c
> > > index af95a527dcc27a7a14d38dcc887f74a888ed91e6..cfcefeffd7ad6c0a21ccc9aaa4483b9acb9dc4e0 100644
> > > --- a/drivers/usb/dwc3/dwc3-generic-plat.c
> > > +++ b/drivers/usb/dwc3/dwc3-generic-plat.c
> > > @@ -8,6 +8,7 @@
> > >   */
> > >
> > >  #include <linux/clk.h>
> > > +#include <linux/of_address.h>
> > >  #include <linux/platform_device.h>
> > >  #include <linux/reset.h>
> > >  #include "glue.h"
> > > @@ -29,6 +30,7 @@ static void dwc3_generic_reset_control_assert(void *data)
> > >
> > >  static int dwc3_generic_probe(struct platform_device *pdev)
> > >  {
> > > +	const struct dwc3_properties *properties;
> > >  	struct dwc3_probe_data probe_data = {};
> > >  	struct device *dev = &pdev->dev;
> > >  	struct dwc3_generic *dwc3g;
> > > @@ -75,7 +77,13 @@ static int dwc3_generic_probe(struct platform_device *pdev)
> > >  	probe_data.dwc = &dwc3g->dwc;
> > >  	probe_data.res = res;
> > >  	probe_data.ignore_clocks_and_resets = true;
> > > -	probe_data.properties = DWC3_DEFAULT_PROPERTIES;
> > > +
> > > +	properties = of_device_get_match_data(dev);
> > > +	if (of_dma_is_coherent(pdev->dev.of_node) && properties)
> >
> > Why do we need the check of_dma_is_coherent() here? Is this specific to
> > your platform to determine whether set gsbuscfg0_reqinfo only?
> 
> I remember someone's review feedback. Anyway, 0x2222 works for both.
> 

Yes. I believe gave a review feedback on that here:
https://lore.kernel.org/linux-usb/20240610202148.yamu4acezsijvpk7@synopsys.com/

This check should be platform specific and not a general check as being
done here. There will be other properties here where that check won't
be applicable.

Will there be a case where the dma coherent is set differently for the
same compatible string?

Regardless, I think we should not have that check here.

Thanks,
Thinh

  reply	other threads:[~2025-09-26 23:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26 18:19 [PATCH v4 0/4] usb: dwc3: add layerscape platform driver use flatten dwc3 core Frank Li via B4 Relay
2025-09-26 18:19 ` [PATCH v4 1/4] dt-bindings: usb: add missed compatible string for arm64 layerscape Frank Li via B4 Relay
2025-09-26 18:19 ` [PATCH v4 2/4] usb: dwc3: Add software-managed properties for flattened model Frank Li via B4 Relay
2025-09-26 22:24   ` Thinh Nguyen
2025-09-26 18:19 ` [PATCH v4 3/4] usb: dwc3: dwc3-generic-plat: Add layerscape dwc3 support Frank Li via B4 Relay
2025-09-26 22:43   ` Thinh Nguyen
2025-09-26 23:32     ` Frank Li
2025-09-26 23:52       ` Thinh Nguyen [this message]
2025-09-26 18:19 ` [PATCH v4 4/4] arm64: dts: layerscape: add dma-coherent for usb node Frank Li via B4 Relay

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=20250926235247.c6zof6meqaxe24ll@synopsys.com \
    --to=thinh.nguyen@synopsys.com \
    --cc=Frank.li@nxp.com \
    --cc=bjorn.andersson@oss.qualcomm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=huang.ze@linux.dev \
    --cc=imx@lists.linux.dev \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=shawnguo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox