[PATCH 2/2] misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent'

Herve Codina posted 2 patches 3 weeks, 6 days ago
There is a newer version of this series
[PATCH 2/2] misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent'
Posted by Herve Codina 3 weeks, 6 days ago
dtc generates the following warning when building the LAN966x devicetree
overlay (lan966x_pci.dtso):
  Warning (interrupts_property): /fragment@0/__overlay__/pci-ep-bus@0/oic@e00c0120: Missing interrupt-parent

The oic interrupt parent is the PCI device itself. The PCI device node
is the node on which the dtbo will be applied and this node already has
properties needed.

In order to remove the warning, add the missing properties in the
overlay fragment node. Properties in this node will not be added when
the overlay is applied (which is what we expect) but makes dtc happy.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20241025110919.64b1cffb@canb.auug.org.au/
Fixes: 185686beb464 ("misc: Add support for LAN966x PCI device")
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
The referenced commit is in the reset tree
---
 drivers/misc/lan966x_pci.dtso | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/misc/lan966x_pci.dtso b/drivers/misc/lan966x_pci.dtso
index 5466d013da7d..ed5c35809b2f 100644
--- a/drivers/misc/lan966x_pci.dtso
+++ b/drivers/misc/lan966x_pci.dtso
@@ -15,6 +15,16 @@
 / {
 	fragment@0 {
 		target-path = "";
+
+		/*
+		 * These properties allow to avoid a dtc warnings.
+		 * The real interrupt controller is the PCI device itself. It
+		 * is the node on which the device tree overlay will be applied.
+		 * This node has those properties.
+		 */
+		#interrupt-cells = <1>;
+		interrupt-controller;
+
 		__overlay__ {
 			#address-cells = <3>;
 			#size-cells = <2>;
-- 
2.46.2
Re: [PATCH 2/2] misc: lan966x_pci: Fix dtc warn 'Missing interrupt-parent'
Posted by Rob Herring 3 weeks, 6 days ago
On Mon, Oct 28, 2024 at 7:24 AM Herve Codina <herve.codina@bootlin.com> wrote:
>
> dtc generates the following warning when building the LAN966x devicetree
> overlay (lan966x_pci.dtso):
>   Warning (interrupts_property): /fragment@0/__overlay__/pci-ep-bus@0/oic@e00c0120: Missing interrupt-parent
>
> The oic interrupt parent is the PCI device itself. The PCI device node
> is the node on which the dtbo will be applied and this node already has
> properties needed.
>
> In order to remove the warning, add the missing properties in the
> overlay fragment node. Properties in this node will not be added when
> the overlay is applied (which is what we expect) but makes dtc happy.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Closes: https://lore.kernel.org/all/20241025110919.64b1cffb@canb.auug.org.au/
> Fixes: 185686beb464 ("misc: Add support for LAN966x PCI device")
> Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> ---
> The referenced commit is in the reset tree
> ---
>  drivers/misc/lan966x_pci.dtso | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>