2022-08-17 23:16:08

by Pali Rohár

[permalink] [raw]
Subject: [PATCH 0/4] PCI: mvebu: Add support for error interrupt

PCI mvebu error interrupt source is triggered for non-INTx event.
So e.g. when AER or PME event occurs.

This patch series adds support for reporting AER and PME interrupts on
Marvell PCIe Root Ports which allows use to kernel AER and PME drivers.

Without this change kernel AER and PME drivers do not work at all.

DT bindings for this support is currently provided only for Kirkwood and
Dove platforms as other new mvebu SoCs requires extension to armada IRQ
driver, which is currently disallowed.

Without new DTS files, pci-mvebu.c driver acts as before this change,
there is no AER and PME kernel support.

I have tested this change on Armada 385 board (with additional changes
to A385 DTS files and IRQ driver, not included there) and AER interrupt
is delivered to kernel AER driver correctly.

Pali Rohár (4):
dt-bindings: PCI: mvebu: Update information about error interrupt
PCI: mvebu: Implement support for interrupts on emulated bridge
ARM: dts: kirkwood: Add definitions for PCIe error interrupts
ARM: dts: dove: Add definitions for PCIe error interrupts

.../devicetree/bindings/pci/mvebu-pci.txt | 1 +
arch/arm/boot/dts/dove.dtsi | 8 +-
arch/arm/boot/dts/kirkwood-6192.dtsi | 4 +-
arch/arm/boot/dts/kirkwood-6281.dtsi | 4 +-
arch/arm/boot/dts/kirkwood-6282.dtsi | 8 +-
arch/arm/boot/dts/kirkwood-98dx4122.dtsi | 4 +-
drivers/pci/controller/pci-mvebu.c | 256 ++++++++++++++++--
7 files changed, 252 insertions(+), 33 deletions(-)

--
2.20.1


2022-08-17 23:42:21

by Pali Rohár

[permalink] [raw]
Subject: [PATCH 4/4] ARM: dts: dove: Add definitions for PCIe error interrupts

First PCIe controller on Dove SoC reports error interrupt via IRQ 15
and second PCIe controller via IRQ 17.

Signed-off-by: Pali Rohár <[email protected]>
---
arch/arm/boot/dts/dove.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index 70d45d2b1258..9aee3cfd3e98 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -122,8 +122,8 @@
bus-range = <0x00 0xff>;

#interrupt-cells = <1>;
- interrupt-names = "intx";
- interrupts = <16>;
+ interrupt-names = "intx", "error";
+ interrupts = <16>, <15>;
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0 0 0 1 &pcie0_intc 0>,
<0 0 0 2 &pcie0_intc 1>,
@@ -151,8 +151,8 @@
bus-range = <0x00 0xff>;

#interrupt-cells = <1>;
- interrupt-names = "intx";
- interrupts = <18>;
+ interrupt-names = "intx", "error";
+ interrupts = <18>, <17>;
interrupt-map-mask = <0 0 0 7>;
interrupt-map = <0 0 0 1 &pcie1_intc 0>,
<0 0 0 2 &pcie1_intc 1>,
--
2.20.1

2022-08-18 20:00:38

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH 4/4] ARM: dts: dove: Add definitions for PCIe error interrupts

On Thu, Aug 18, 2022 at 01:00:36AM +0200, Pali Roh?r wrote:
> First PCIe controller on Dove SoC reports error interrupt via IRQ 15
> and second PCIe controller via IRQ 17.
>
> Signed-off-by: Pali Roh?r <[email protected]>

Reviewed-by: Andrew Lunn <[email protected]>

Andrew

2022-09-02 15:47:09

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH 0/4] PCI: mvebu: Add support for error interrupt

Pali Rohár <[email protected]> writes:

> PCI mvebu error interrupt source is triggered for non-INTx event.
> So e.g. when AER or PME event occurs.
>
> This patch series adds support for reporting AER and PME interrupts on
> Marvell PCIe Root Ports which allows use to kernel AER and PME drivers.
>
> Without this change kernel AER and PME drivers do not work at all.
>
> DT bindings for this support is currently provided only for Kirkwood and
> Dove platforms as other new mvebu SoCs requires extension to armada IRQ
> driver, which is currently disallowed.
>
> Without new DTS files, pci-mvebu.c driver acts as before this change,
> there is no AER and PME kernel support.
>
> I have tested this change on Armada 385 board (with additional changes
> to A385 DTS files and IRQ driver, not included there) and AER interrupt
> is delivered to kernel AER driver correctly.
>
> Pali Rohár (4):
> dt-bindings: PCI: mvebu: Update information about error interrupt
> PCI: mvebu: Implement support for interrupts on emulated bridge


> ARM: dts: kirkwood: Add definitions for PCIe error interrupts
> ARM: dts: dove: Add definitions for PCIe error interrupts

Applied both dts patches on mvebu/dt

Thanks,

Gregory


>
> .../devicetree/bindings/pci/mvebu-pci.txt | 1 +
> arch/arm/boot/dts/dove.dtsi | 8 +-
> arch/arm/boot/dts/kirkwood-6192.dtsi | 4 +-
> arch/arm/boot/dts/kirkwood-6281.dtsi | 4 +-
> arch/arm/boot/dts/kirkwood-6282.dtsi | 8 +-
> arch/arm/boot/dts/kirkwood-98dx4122.dtsi | 4 +-
> drivers/pci/controller/pci-mvebu.c | 256 ++++++++++++++++--
> 7 files changed, 252 insertions(+), 33 deletions(-)
>
> --
> 2.20.1
>

--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com