* [PATCH] PCI: dw-rockchip: Skip waiting for link up
@ 2025-01-13 10:59 Niklas Cassel
2025-01-13 19:27 ` Bjorn Helgaas
2025-01-13 20:22 ` Bjorn Helgaas
0 siblings, 2 replies; 4+ messages in thread
From: Niklas Cassel @ 2025-01-13 10:59 UTC (permalink / raw)
To: Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, Heiko Stuebner
Cc: Damien Le Moal, Anand Moon, linux-pci, linux-arm-kernel,
linux-rockchip, linux-kernel, Niklas Cassel
The Root Complex specific device tree binding for pcie-dw-rockchip has the
'sys' interrupt marked as required.
The driver requests the 'sys' IRQ unconditionally, and errors out if not
provided.
Thus, we can unconditionally set use_linkup_irq before calling
dw_pcie_host_init().
This will skip the wait for link up (since the bus will be enumerated once
the link up IRQ is triggered), which reduces the bootup time.
Signed-off-by: Niklas Cassel <cassel@kernel.org>
---
drivers/pci/controller/dwc/pcie-dw-rockchip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
index 1170e1107508bd793b610949b0afe98516c177a4..62034affb95fbb965aad3cebc613a83e31c90aee 100644
--- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
+++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
@@ -435,6 +435,7 @@ static int rockchip_pcie_configure_rc(struct rockchip_pcie *rockchip)
pp = &rockchip->pci.pp;
pp->ops = &rockchip_pcie_host_ops;
+ pp->use_linkup_irq = true;
return dw_pcie_host_init(pp);
}
---
base-commit: 2adda4102931b152f35d054055497631ed97fe73
change-id: 20250113-rockchip-no-wait-403ffbc42313
Best regards,
--
Niklas Cassel <cassel@kernel.org>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: dw-rockchip: Skip waiting for link up
2025-01-13 10:59 [PATCH] PCI: dw-rockchip: Skip waiting for link up Niklas Cassel
@ 2025-01-13 19:27 ` Bjorn Helgaas
2025-01-13 21:14 ` Niklas Cassel
2025-01-13 20:22 ` Bjorn Helgaas
1 sibling, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2025-01-13 19:27 UTC (permalink / raw)
To: Niklas Cassel
Cc: Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, Heiko Stuebner,
Damien Le Moal, Anand Moon, linux-pci, linux-arm-kernel,
linux-rockchip, linux-kernel, Krishna chaitanya chundru
On Mon, Jan 13, 2025 at 11:59:34AM +0100, Niklas Cassel wrote:
> The Root Complex specific device tree binding for pcie-dw-rockchip has the
> 'sys' interrupt marked as required.
>
> The driver requests the 'sys' IRQ unconditionally, and errors out if not
> provided.
>
> Thus, we can unconditionally set use_linkup_irq before calling
> dw_pcie_host_init().
>
> This will skip the wait for link up (since the bus will be enumerated once
> the link up IRQ is triggered), which reduces the bootup time.
>
> Signed-off-by: Niklas Cassel <cassel@kernel.org>
Thanks! I was just reviewing the addition of your dll_link_up IRQ
handler, and was about to ask whether you wanted to set use_linkup_irq
to avoid the wait, but here's the patch already :)
I think I'll sort out the branches so the dll_link_up IRQ handler,
this patch, and the corresponding qcom change go on the same branch as
Krishna's patch to skip waiting if pp->use_linkup_irq.
> ---
> drivers/pci/controller/dwc/pcie-dw-rockchip.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> index 1170e1107508bd793b610949b0afe98516c177a4..62034affb95fbb965aad3cebc613a83e31c90aee 100644
> --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> @@ -435,6 +435,7 @@ static int rockchip_pcie_configure_rc(struct rockchip_pcie *rockchip)
>
> pp = &rockchip->pci.pp;
> pp->ops = &rockchip_pcie_host_ops;
> + pp->use_linkup_irq = true;
>
> return dw_pcie_host_init(pp);
> }
>
> ---
> base-commit: 2adda4102931b152f35d054055497631ed97fe73
> change-id: 20250113-rockchip-no-wait-403ffbc42313
>
> Best regards,
> --
> Niklas Cassel <cassel@kernel.org>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: dw-rockchip: Skip waiting for link up
2025-01-13 10:59 [PATCH] PCI: dw-rockchip: Skip waiting for link up Niklas Cassel
2025-01-13 19:27 ` Bjorn Helgaas
@ 2025-01-13 20:22 ` Bjorn Helgaas
1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2025-01-13 20:22 UTC (permalink / raw)
To: Niklas Cassel
Cc: Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, Heiko Stuebner,
Damien Le Moal, Anand Moon, linux-pci, linux-arm-kernel,
linux-rockchip, linux-kernel
On Mon, Jan 13, 2025 at 11:59:34AM +0100, Niklas Cassel wrote:
> The Root Complex specific device tree binding for pcie-dw-rockchip has the
> 'sys' interrupt marked as required.
>
> The driver requests the 'sys' IRQ unconditionally, and errors out if not
> provided.
>
> Thus, we can unconditionally set use_linkup_irq before calling
> dw_pcie_host_init().
>
> This will skip the wait for link up (since the bus will be enumerated once
> the link up IRQ is triggered), which reduces the bootup time.
>
> Signed-off-by: Niklas Cassel <cassel@kernel.org>
Applied to pci/controller/dwc for v6.14, thanks!
> ---
> drivers/pci/controller/dwc/pcie-dw-rockchip.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> index 1170e1107508bd793b610949b0afe98516c177a4..62034affb95fbb965aad3cebc613a83e31c90aee 100644
> --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
> @@ -435,6 +435,7 @@ static int rockchip_pcie_configure_rc(struct rockchip_pcie *rockchip)
>
> pp = &rockchip->pci.pp;
> pp->ops = &rockchip_pcie_host_ops;
> + pp->use_linkup_irq = true;
>
> return dw_pcie_host_init(pp);
> }
>
> ---
> base-commit: 2adda4102931b152f35d054055497631ed97fe73
> change-id: 20250113-rockchip-no-wait-403ffbc42313
>
> Best regards,
> --
> Niklas Cassel <cassel@kernel.org>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: dw-rockchip: Skip waiting for link up
2025-01-13 19:27 ` Bjorn Helgaas
@ 2025-01-13 21:14 ` Niklas Cassel
0 siblings, 0 replies; 4+ messages in thread
From: Niklas Cassel @ 2025-01-13 21:14 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, Heiko Stuebner,
Damien Le Moal, Anand Moon, linux-pci, linux-arm-kernel,
linux-rockchip, linux-kernel, Krishna chaitanya chundru
On 13 January 2025 20:27:20 CET, Bjorn Helgaas <helgaas@kernel.org> wrote:
>On Mon, Jan 13, 2025 at 11:59:34AM +0100, Niklas Cassel wrote:
>> The Root Complex specific device tree binding for pcie-dw-rockchip has the
>> 'sys' interrupt marked as required.
>>
>> The driver requests the 'sys' IRQ unconditionally, and errors out if not
>> provided.
>>
>> Thus, we can unconditionally set use_linkup_irq before calling
>> dw_pcie_host_init().
>>
>> This will skip the wait for link up (since the bus will be enumerated once
>> the link up IRQ is triggered), which reduces the bootup time.
>>
>> Signed-off-by: Niklas Cassel <cassel@kernel.org>
>
>Thanks! I was just reviewing the addition of your dll_link_up IRQ
>handler, and was about to ask whether you wanted to set use_linkup_irq
>to avoid the wait, but here's the patch already :)
:)
>
>I think I'll sort out the branches so the dll_link_up IRQ handler,
>this patch, and the corresponding qcom change go on the same branch as
>Krishna's patch to skip waiting if pp->use_linkup_irq.
That sounds like a good idea.
Thank you!
Kind regards,
Niklas
>
>> ---
>> drivers/pci/controller/dwc/pcie-dw-rockchip.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
>> index 1170e1107508bd793b610949b0afe98516c177a4..62034affb95fbb965aad3cebc613a83e31c90aee 100644
>> --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
>> +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
>> @@ -435,6 +435,7 @@ static int rockchip_pcie_configure_rc(struct rockchip_pcie *rockchip)
>>
>> pp = &rockchip->pci.pp;
>> pp->ops = &rockchip_pcie_host_ops;
>> + pp->use_linkup_irq = true;
>>
>> return dw_pcie_host_init(pp);
>> }
>>
>> ---
>> base-commit: 2adda4102931b152f35d054055497631ed97fe73
>> change-id: 20250113-rockchip-no-wait-403ffbc42313
>>
>> Best regards,
>> --
>> Niklas Cassel <cassel@kernel.org>
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-13 21:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13 10:59 [PATCH] PCI: dw-rockchip: Skip waiting for link up Niklas Cassel
2025-01-13 19:27 ` Bjorn Helgaas
2025-01-13 21:14 ` Niklas Cassel
2025-01-13 20:22 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).