From: <Conor.Dooley@microchip.com>
To: <uwu@icenowy.me>, <paul.walmsley@sifive.com>,
<greentime.hu@sifive.com>, <lpieralisi@kernel.org>,
<robh@kernel.org>, <kw@linux.com>, <bhelgaas@google.com>
Cc: <linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-riscv@lists.infradead.org>
Subject: Re: [PATCH] PCI: fu740: do not use clock name when requesting clock
Date: Mon, 12 Sep 2022 10:13:04 +0000 [thread overview]
Message-ID: <752ea700-bdef-25ca-c922-fd79ea34c8af@microchip.com> (raw)
In-Reply-To: <b1a3f887fd037fd18c45ac020c6142cedba58ca7.camel@icenowy.me>
On 12/09/2022 02:38, Icenowy Zheng wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> 在 2022-09-08星期四的 18:14 +0000,Conor.Dooley@microchip.com写道:
>> On 07/09/2022 06:40, Icenowy Zheng wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you
>>> know the content is safe
>>>
>>> The DT binding of FU740 PCIe does not enforce a clock-names property,
>>> and there exist some device tree that has a clock name that does not
>>> stick to the one used by Linux DT (e.g. the one shipped with current
>>> U-Boot mainline).
>>
>> I recently added the missing enforcement:
>> https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git/commit/?h=pci/dt&id=b408fad61d34c765c3e01895286332af2d50402a
>
> Unfortunately binding w/o clock-names enforcement has already entered a
> stable release (5.19), and the real clock name "pcie_aux" is never
> enforced before (there's a DT in U-Boot that uses "pcieaux" instead),
> should this be considered as breakage to stable DT binding?
Does anything in U-Boot actually use that clock name? The clock name is
currently being relied on by both Linux and BSD (although BSD does have
a fallback to the U-Boot provided name. There's only one clock so it
seems fine to me to stop using the name, but the DT in U-Boot should be
fixed so that PCI works IMO.
fwiw:
>
> Anyway, I had sent out a patch that synchorizes all FU740-related DT
> files to U-Boot, see [1].
>
> [1]
> https://lore.kernel.org/all/20220825081119.1694007-2-uwu@icenowy.me/
From that patch, should this be changed too?
- [PRCI_CLK_PCIEAUX] {
+ [FU740_PRCI_CLK_PCIE_AUX] {
.name = "pcieaux",
.parent_name = "",
.ops = &sifive_fu740_prci_pcieaux_clk_ops,
>
>>
>> Since there's only one clock though, I'd imagine it makes little to no
>> real difference if the check here is relaxed.
>>
>> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>>
>>>
>>> Drop the name in the clock request, instead just pass NULL (because
>>> this device should have only a single clock).
>>>
>>> Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
>>> ---
>>> drivers/pci/controller/dwc/pcie-fu740.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/pci/controller/dwc/pcie-fu740.c
>>> b/drivers/pci/controller/dwc/pcie-fu740.c
>>> index 0c90583c078b..edb218a37a4f 100644
>>> --- a/drivers/pci/controller/dwc/pcie-fu740.c
>>> +++ b/drivers/pci/controller/dwc/pcie-fu740.c
>>> @@ -315,7 +315,7 @@ static int fu740_pcie_probe(struct
>>> platform_device *pdev)
>>> return dev_err_probe(dev, PTR_ERR(afp->pwren),
>>> "unable to get pwren-gpios\n");
>>>
>>> /* Fetch clocks */
>>> - afp->pcie_aux = devm_clk_get(dev, "pcie_aux");
>>> + afp->pcie_aux = devm_clk_get(dev, NULL);
>>> if (IS_ERR(afp->pcie_aux))
>>> return dev_err_probe(dev, PTR_ERR(afp->pcie_aux),
>>> "pcie_aux clock source
>>> missing or invalid\n");
>>> --
>>> 2.37.1
>>>
>>
>
>
WARNING: multiple messages have this Message-ID (diff)
From: <Conor.Dooley@microchip.com>
To: <uwu@icenowy.me>, <paul.walmsley@sifive.com>,
<greentime.hu@sifive.com>, <lpieralisi@kernel.org>,
<robh@kernel.org>, <kw@linux.com>, <bhelgaas@google.com>
Cc: <linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-riscv@lists.infradead.org>
Subject: Re: [PATCH] PCI: fu740: do not use clock name when requesting clock
Date: Mon, 12 Sep 2022 10:13:04 +0000 [thread overview]
Message-ID: <752ea700-bdef-25ca-c922-fd79ea34c8af@microchip.com> (raw)
In-Reply-To: <b1a3f887fd037fd18c45ac020c6142cedba58ca7.camel@icenowy.me>
On 12/09/2022 02:38, Icenowy Zheng wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> 在 2022-09-08星期四的 18:14 +0000,Conor.Dooley@microchip.com写道:
>> On 07/09/2022 06:40, Icenowy Zheng wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you
>>> know the content is safe
>>>
>>> The DT binding of FU740 PCIe does not enforce a clock-names property,
>>> and there exist some device tree that has a clock name that does not
>>> stick to the one used by Linux DT (e.g. the one shipped with current
>>> U-Boot mainline).
>>
>> I recently added the missing enforcement:
>> https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git/commit/?h=pci/dt&id=b408fad61d34c765c3e01895286332af2d50402a
>
> Unfortunately binding w/o clock-names enforcement has already entered a
> stable release (5.19), and the real clock name "pcie_aux" is never
> enforced before (there's a DT in U-Boot that uses "pcieaux" instead),
> should this be considered as breakage to stable DT binding?
Does anything in U-Boot actually use that clock name? The clock name is
currently being relied on by both Linux and BSD (although BSD does have
a fallback to the U-Boot provided name. There's only one clock so it
seems fine to me to stop using the name, but the DT in U-Boot should be
fixed so that PCI works IMO.
fwiw:
>
> Anyway, I had sent out a patch that synchorizes all FU740-related DT
> files to U-Boot, see [1].
>
> [1]
> https://lore.kernel.org/all/20220825081119.1694007-2-uwu@icenowy.me/
From that patch, should this be changed too?
- [PRCI_CLK_PCIEAUX] {
+ [FU740_PRCI_CLK_PCIE_AUX] {
.name = "pcieaux",
.parent_name = "",
.ops = &sifive_fu740_prci_pcieaux_clk_ops,
>
>>
>> Since there's only one clock though, I'd imagine it makes little to no
>> real difference if the check here is relaxed.
>>
>> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>>
>>>
>>> Drop the name in the clock request, instead just pass NULL (because
>>> this device should have only a single clock).
>>>
>>> Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
>>> ---
>>> drivers/pci/controller/dwc/pcie-fu740.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/pci/controller/dwc/pcie-fu740.c
>>> b/drivers/pci/controller/dwc/pcie-fu740.c
>>> index 0c90583c078b..edb218a37a4f 100644
>>> --- a/drivers/pci/controller/dwc/pcie-fu740.c
>>> +++ b/drivers/pci/controller/dwc/pcie-fu740.c
>>> @@ -315,7 +315,7 @@ static int fu740_pcie_probe(struct
>>> platform_device *pdev)
>>> return dev_err_probe(dev, PTR_ERR(afp->pwren),
>>> "unable to get pwren-gpios\n");
>>>
>>> /* Fetch clocks */
>>> - afp->pcie_aux = devm_clk_get(dev, "pcie_aux");
>>> + afp->pcie_aux = devm_clk_get(dev, NULL);
>>> if (IS_ERR(afp->pcie_aux))
>>> return dev_err_probe(dev, PTR_ERR(afp->pcie_aux),
>>> "pcie_aux clock source
>>> missing or invalid\n");
>>> --
>>> 2.37.1
>>>
>>
>
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-09-12 10:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 5:40 [PATCH] PCI: fu740: do not use clock name when requesting clock Icenowy Zheng
2022-09-07 5:40 ` Icenowy Zheng
2022-09-08 18:14 ` Conor.Dooley
2022-09-08 18:14 ` Conor.Dooley
2022-09-12 1:38 ` Icenowy Zheng
2022-09-12 1:38 ` Icenowy Zheng
2022-09-12 10:13 ` Conor.Dooley [this message]
2022-09-12 10:13 ` Conor.Dooley
2022-09-13 6:25 ` Icenowy Zheng
2022-09-13 6:25 ` Icenowy Zheng
2022-09-23 21:14 ` Bjorn Helgaas
2022-09-23 21:14 ` Bjorn Helgaas
2022-09-23 21:25 ` Conor Dooley
2022-09-23 21:25 ` Conor Dooley
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=752ea700-bdef-25ca-c922-fd79ea34c8af@microchip.com \
--to=conor.dooley@microchip.com \
--cc=bhelgaas@google.com \
--cc=greentime.hu@sifive.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=uwu@icenowy.me \
/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.