From: hayashi.kunihiko@socionext.com (Kunihiko Hayashi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] dt-bindings: reset: uniphier: Add AHCI core reset description
Date: Mon, 12 Nov 2018 21:02:16 +0900 [thread overview]
Message-ID: <20181112210215.2DB6.4A936039@socionext.com> (raw)
In-Reply-To: <CAK7LNAQGftPMLkQk-tU4R6Jtw9W6npka+Br+2wyyZicAgwDvRg@mail.gmail.com>
Hi,
Thank you for some comments and pointing out.
On Sat, 10 Nov 2018 01:14:06 +0900 <yamada.masahiro@socionext.com> wrote:
> On Sat, Nov 10, 2018 at 12:02 AM Philipp Zabel <p.zabel@pengutronix.de> wrote:
> >
> > Hi Kunihiko,
> >
> > On Fri, 2018-11-09 at 10:42 +0900, Kunihiko Hayashi wrote:
> > > Add compatible strings for reset control of AHCI core implemented in
> > > UniPhier SoCs. The reset control belongs to AHCI glue layer.
> > >
> > > Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> > > ---
> > > Documentation/devicetree/bindings/reset/uniphier-reset.txt | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/reset/uniphier-reset.txt b/Documentation/devicetree/bindings/reset/uniphier-reset.txt
> > > index f63c511..ea00517 100644
> > > --- a/Documentation/devicetree/bindings/reset/uniphier-reset.txt
> > > +++ b/Documentation/devicetree/bindings/reset/uniphier-reset.txt
> > > @@ -133,6 +133,9 @@ Required properties:
> > > "socionext,uniphier-pxs2-usb3-reset" - for PXs2 SoC USB3
> > > "socionext,uniphier-ld20-usb3-reset" - for LD20 SoC USB3
> > > "socionext,uniphier-pxs3-usb3-reset" - for PXs3 SoC USB3
> > > + "socionext,uniphier-pro4-ahci-reset" - for Pro4 SoC AHCI
> > > + "socionext,uniphier-pxs2-ahci-reset" - for PXs2 SoC AHCI
> > > + "socionext,uniphier-pxs3-ahci-reset" - for PXs3 SoC AHCI
> >
> > Since the driver behaves identically for "socionext,uniphier-pro4-usb3-
> > reset" and "socionext,uniphier-pro4-ahci-reset", would it make sense to
> > add a common compatible?
>
>
> As far as I could guess, he just happened to find the same driver code
> could be reused for other hardware.
>
> Theoretically, this can happen anywhere since
> a reset controller is just a set of registers
> each bit of which is connected to a reset line.
>
> If you added a super-generic compatible like "simple-reset",
> I would agree with
> "socionext,uniphier-pro4-usb3-reset", "simple-reset"
> since this is a pattern.
I think it's more generic to define simple-reset with parent clock/reset
control without both SoC and device names.
However, such parent clocks/resets strongly depends on SoC,
so I think it's difficut to lead generic definition in this case.
If we add generic compatible string, I also add "simple-reset".
> However,
> "socionext,uniphier-pro4-glue-reset" is kind of a halfway house
> where it is SoC-specific, but still ambiguous.
Surely, it might be hard to understand that pro4-glue-reset is SoC-specific
but for generic-device.
> > Something like:
> > "socionext,uniphier-pro4-usb3-reset", "socionext,uniphier-pro4-glue-reset" - for USB3 SoC AHCI
> > "socionext,uniphier-pro4-ahci-reset", "socionext,uniphier-pro4-glue-reset" - for Pro4 SoC AHCI
> >
> > That way if more places turn up where the glue layer reset is used,
> > you can add them without patching the driver every time.
>
>
> This is a trade-off between "patch the driver"
> and "potential change of the binding".
Adding "glue-reset" is usable for devices having same parent clocks/resets as
usb3/ahci, and we can add the devices without patches.
However, if the device needs other parent clocks/resets for the same SoC,
we can't add "glue-reset" and we might add patches for the device as a result.
In this case, the "glue-reset" will become difficult to understand.
> There is no real hardware like pro4-glue-reset.
>
> I am guessing this is a part of syscon or something,
> but I cannot find any explanation in a bigger picture.
>
> So, I cannot judge this further more.
Since it's hard to lead the best result,
currently I'd like to suggest the current compatibles, with "simple-reset"
if necessary.
Thank you,
---
Best Regards,
Kunihiko Hayashi
WARNING: multiple messages have this Message-ID (diff)
From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
DTML <devicetree@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Masami Hiramatsu <masami.hiramatsu@linaro.org>,
Jassi Brar <jaswinder.singh@linaro.org>
Subject: Re: [PATCH 3/4] dt-bindings: reset: uniphier: Add AHCI core reset description
Date: Mon, 12 Nov 2018 21:02:16 +0900 [thread overview]
Message-ID: <20181112210215.2DB6.4A936039@socionext.com> (raw)
In-Reply-To: <CAK7LNAQGftPMLkQk-tU4R6Jtw9W6npka+Br+2wyyZicAgwDvRg@mail.gmail.com>
Hi,
Thank you for some comments and pointing out.
On Sat, 10 Nov 2018 01:14:06 +0900 <yamada.masahiro@socionext.com> wrote:
> On Sat, Nov 10, 2018 at 12:02 AM Philipp Zabel <p.zabel@pengutronix.de> wrote:
> >
> > Hi Kunihiko,
> >
> > On Fri, 2018-11-09 at 10:42 +0900, Kunihiko Hayashi wrote:
> > > Add compatible strings for reset control of AHCI core implemented in
> > > UniPhier SoCs. The reset control belongs to AHCI glue layer.
> > >
> > > Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
> > > ---
> > > Documentation/devicetree/bindings/reset/uniphier-reset.txt | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/reset/uniphier-reset.txt b/Documentation/devicetree/bindings/reset/uniphier-reset.txt
> > > index f63c511..ea00517 100644
> > > --- a/Documentation/devicetree/bindings/reset/uniphier-reset.txt
> > > +++ b/Documentation/devicetree/bindings/reset/uniphier-reset.txt
> > > @@ -133,6 +133,9 @@ Required properties:
> > > "socionext,uniphier-pxs2-usb3-reset" - for PXs2 SoC USB3
> > > "socionext,uniphier-ld20-usb3-reset" - for LD20 SoC USB3
> > > "socionext,uniphier-pxs3-usb3-reset" - for PXs3 SoC USB3
> > > + "socionext,uniphier-pro4-ahci-reset" - for Pro4 SoC AHCI
> > > + "socionext,uniphier-pxs2-ahci-reset" - for PXs2 SoC AHCI
> > > + "socionext,uniphier-pxs3-ahci-reset" - for PXs3 SoC AHCI
> >
> > Since the driver behaves identically for "socionext,uniphier-pro4-usb3-
> > reset" and "socionext,uniphier-pro4-ahci-reset", would it make sense to
> > add a common compatible?
>
>
> As far as I could guess, he just happened to find the same driver code
> could be reused for other hardware.
>
> Theoretically, this can happen anywhere since
> a reset controller is just a set of registers
> each bit of which is connected to a reset line.
>
> If you added a super-generic compatible like "simple-reset",
> I would agree with
> "socionext,uniphier-pro4-usb3-reset", "simple-reset"
> since this is a pattern.
I think it's more generic to define simple-reset with parent clock/reset
control without both SoC and device names.
However, such parent clocks/resets strongly depends on SoC,
so I think it's difficut to lead generic definition in this case.
If we add generic compatible string, I also add "simple-reset".
> However,
> "socionext,uniphier-pro4-glue-reset" is kind of a halfway house
> where it is SoC-specific, but still ambiguous.
Surely, it might be hard to understand that pro4-glue-reset is SoC-specific
but for generic-device.
> > Something like:
> > "socionext,uniphier-pro4-usb3-reset", "socionext,uniphier-pro4-glue-reset" - for USB3 SoC AHCI
> > "socionext,uniphier-pro4-ahci-reset", "socionext,uniphier-pro4-glue-reset" - for Pro4 SoC AHCI
> >
> > That way if more places turn up where the glue layer reset is used,
> > you can add them without patching the driver every time.
>
>
> This is a trade-off between "patch the driver"
> and "potential change of the binding".
Adding "glue-reset" is usable for devices having same parent clocks/resets as
usb3/ahci, and we can add the devices without patches.
However, if the device needs other parent clocks/resets for the same SoC,
we can't add "glue-reset" and we might add patches for the device as a result.
In this case, the "glue-reset" will become difficult to understand.
> There is no real hardware like pro4-glue-reset.
>
> I am guessing this is a part of syscon or something,
> but I cannot find any explanation in a bigger picture.
>
> So, I cannot judge this further more.
Since it's hard to lead the best result,
currently I'd like to suggest the current compatibles, with "simple-reset"
if necessary.
Thank you,
---
Best Regards,
Kunihiko Hayashi
next prev parent reply other threads:[~2018-11-12 12:02 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 1:42 [PATCH 0/4] reset: uniphier: Rename from USB3 reset to glue reset and add AHCI reset support Kunihiko Hayashi
2018-11-09 1:42 ` Kunihiko Hayashi
2018-11-09 1:42 ` [PATCH 1/4] dt-bindings: reset: uniphier: Replace the expression of USB3 with generic peripherals Kunihiko Hayashi
2018-11-09 1:42 ` Kunihiko Hayashi
2018-11-17 16:30 ` Rob Herring
2018-11-17 16:30 ` Rob Herring
2018-11-17 16:30 ` Rob Herring
2018-11-09 1:42 ` [PATCH 2/4] reset: uniphier-usb3: Rename to reset-uniphier-glue Kunihiko Hayashi
2018-11-09 1:42 ` Kunihiko Hayashi
2018-11-09 1:42 ` [PATCH 3/4] dt-bindings: reset: uniphier: Add AHCI core reset description Kunihiko Hayashi
2018-11-09 1:42 ` Kunihiko Hayashi
2018-11-09 15:01 ` Philipp Zabel
2018-11-09 15:01 ` Philipp Zabel
2018-11-09 16:14 ` Masahiro Yamada
2018-11-09 16:14 ` Masahiro Yamada
2018-11-12 12:02 ` Kunihiko Hayashi [this message]
2018-11-12 12:02 ` Kunihiko Hayashi
2018-11-12 14:21 ` Philipp Zabel
2018-11-12 14:21 ` Philipp Zabel
2018-11-13 0:57 ` Kunihiko Hayashi
2018-11-13 0:57 ` Kunihiko Hayashi
2018-11-17 16:30 ` Rob Herring
2018-11-17 16:30 ` Rob Herring
2018-11-17 16:30 ` Rob Herring
2018-11-09 1:42 ` [PATCH 4/4] reset: uniphier-glue: Add AHCI reset control support in glue layer Kunihiko Hayashi
2018-11-09 1:42 ` Kunihiko Hayashi
2018-11-19 9:25 ` [PATCH 0/4] reset: uniphier: Rename from USB3 reset to glue reset and add AHCI reset support Philipp Zabel
2018-11-19 9:25 ` Philipp Zabel
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=20181112210215.2DB6.4A936039@socionext.com \
--to=hayashi.kunihiko@socionext.com \
--cc=linux-arm-kernel@lists.infradead.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.