All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stanley Chang[昌育德]" <stanley_chang@realtek.com>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>
Subject: RE: [PATCH v2 1/2] usb: dwc3: core: add support for remapping global register start address
Date: Thu, 13 Apr 2023 02:25:01 +0000	[thread overview]
Message-ID: <1e7a4952f51149ec98a1b227be8063cd@realtek.com> (raw)
In-Reply-To: <20230412210856.xcbp3crhbedjvnix@synopsys.com>

> 
> On Wed, Apr 12, 2023, Stanley Chang wrote:
> > The RTK DHC SoCs were designed the global register address offset at
> > 0x8100. The default address is at DWC3_GLOBALS_REGS_START (0xc100).
> > Therefore, add the property of device-tree to adjust this start address.
> >
> > Signed-off-by: Stanley Chang <stanley_chang@realtek.com>
> > ---
> 
> Please note what changed in v2 after the --- line. Also why did you split the
> previous series in 2 now? It'll be confusing for us maintainers.
> 
Do you mean that to split the part of "remapping global register start address and
the part of " snps,parkmode-disable-hs-quirk"?

They are different series. I just submit them at the same time.

> >  drivers/usb/dwc3/core.c | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >
> > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index
> > 476b63618511..96d3e634ebbf 100644
> > --- a/drivers/usb/dwc3/core.c
> > +++ b/drivers/usb/dwc3/core.c
> > @@ -1785,6 +1785,24 @@ static int dwc3_probe(struct platform_device
> *pdev)
> >       dwc_res = *res;
> >       dwc_res.start += DWC3_GLOBALS_REGS_START;
> >
> > +     /*
> > +      * For some dwc3 controller, the dwc3 global register start address is
> > +      * not at DWC3_GLOBALS_REGS_START (0xc100).
> > +      */
> > +     if (dev->of_node) {
> > +             int global_regs_starting_offset = 0;
> > +
> > +             device_property_read_u32(dev,
> "snps,global-regs-starting-offset",
> > +                              &global_regs_starting_offset);
> 
> I suggested to use compatible string instead since this isn't common and only
> unique to your platform. Any reason we shouldn't do that?
> 
> ie. something like this:
> 
> if (dev->of_node && of_device_is_compatiable(dev->of_node,
> "your-platform"))
>         dwc_res.start += your_platform_offset; else
>         dwc_res.start = DWC3_GLOBALS_REGS_START;
> 

I will try this suggestion.

Thanks,
Stanley


  reply	other threads:[~2023-04-13  2:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12  3:30 [PATCH v2 1/2] usb: dwc3: core: add support for remapping global register start address Stanley Chang
2023-04-12  3:30 ` [PATCH v2 2/2] dt-bindings: usb: snps,dwc3: Add 'snps,global-regs-starting-offset' quirk Stanley Chang
2023-04-12 10:51   ` Krzysztof Kozlowski
2023-04-12 11:11     ` Stanley Chang[昌育德]
2023-04-12 14:13       ` Krzysztof Kozlowski
2023-04-12 12:54   ` Rob Herring
2023-04-13  2:53     ` Stanley Chang[昌育德]
2023-04-14  9:08       ` Krzysztof Kozlowski
2023-04-14  9:36         ` Stanley Chang[昌育德]
2023-04-13  4:25   ` Stanley Chang
2023-04-13  7:32     ` Krzysztof Kozlowski
2023-04-13 14:58       ` Stanley Chang[昌育德]
2023-04-13 16:36         ` Krzysztof Kozlowski
2023-04-14  2:12           ` Stanley Chang[昌育德]
2023-04-14  9:05             ` Krzysztof Kozlowski
2023-04-13 13:00     ` Rob Herring
2023-04-12 11:14 ` [PATCH v2 1/2] usb: dwc3: core: add support for remapping global register start address Stanley Chang[昌育德]
2023-04-12 21:09 ` Thinh Nguyen
2023-04-13  2:25   ` Stanley Chang[昌育德] [this message]
2023-04-13  3:44   ` Stanley Chang[昌育德]
2023-04-13  4:24 ` Stanley Chang

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=1e7a4952f51149ec98a1b227be8063cd@realtek.com \
    --to=stanley_chang@realtek.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh+dt@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.