All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/17] Add System Error Interrupt support to Armada SoCs
@ 2018-04-21 13:55 ` Miquel Raynal
  0 siblings, 0 replies; 92+ messages in thread
From: Miquel Raynal @ 2018-04-21 13:55 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier
  Cc: Mark Rutland, Andrew Lunn, devicetree, Antoine Tenart,
	Catalin Marinas, Gregory Clement, Haim Boot, Will Deacon,
	Maxime Chevallier, Nadav Haklai, Rob Herring, Thomas Petazzoni,
	Miquel Raynal, Hanna Hawa, linux-arm-kernel,
	Sebastian Hesselbarth

The ICU is an IRQ chip found in Armada CP110. It currently has 207 wired
inputs. Its purpose is to aggregate all CP interrupts and report them to
the AP through MSIs. The ICU writes into GIC registers (AP side) by way
of the interconnect. These interrupts can be of several groups:
- SecuRe (SR);
- Non-SecuRe (NSR);
- System Error Interrupts (SEI);
- RAM Error Interrupts (REI);
- ...
Each ICU wired interrupt can be of any of these groups. The group is
encoded in the MSI payload.

Until now, only the non-secure interrupts (NSR) were handled by the ICU
driver. Interrupts of another group could work by chance because the
ICU driver does not erase all ATF configuration; it only erases the
configuration for NSR interrupts.

This series aims at adding support for the System Error Interrupts
(SEI). For this purpose, the ICU driver is a bit reworked to separate
the ICU 'generic' configuration from the NSR-related handling. Then,
the SEI driver (part of the GIC) is introduced and finally, support for
SEI interrupts are also added to the ICU driver.

The SEI driver is a bit different than its cousin the GICP because it
must handle MSIs from the CPs, as well as wired interrupts from the AP
itself. MSIs and wired interrupts will automatically update two
registers (GICP_SECR0/GICP_SECR1) that will trigger a single top-level
interrupt (SPI #32).

As this is my first contribution in the IRQ subsystem I might have
missed some specificities or misunderstood the API, please do not
hesitate to correct me if I'm wrong.

Also, for the sake of understandability (and because I love ASCII art),
this is a try to explain the ICU/SEI architecture:


 ---------------------------------------------------------------------
/                                                                      \
|                                                                      |
|     SPIa SPIb        SPIz                    SPI 32                  |
|       ^    ^           ^                       ^                     |
|       |    |   . . .   |                       |                     |
|  ------------------------------------------------------------------  |
| /     |    |           |                       |                   \ |
| |     |    |   . . .   |                       |                   | |
| |  ------------------------     ---------------------------------  | |
| | /   |    |           |   \   /               |                 \ | |
| | |   |    |           |   |   |   SEI         |                 | | |
| | |   |    |   . . .   |   |   |       ________|_______          | | |
| | |   |    |           |   |   |      /___SEI_SECR_____\         | | |
| | |   |____|___________|   |   |     /       |         \\        | | |
| | |    \_GICP_SETSPI _/    |   |    /        |          \\       | | |
| | |                ||      |   |   /   ...   |           \\      | | |
| | \  GICP          ||      /   \  |          |            \\     / | |
| |  ----------------||------     --|----------|------------||-----  | |
| |                  ||             |          |            ||       | |
| \   GIC            ||             |    ...   |            ||       / |
|  ------------------||-------------^----------^------------||-------  |
|                    ||             |          |            ||         |
|                     \\_______   int 0  ... int 20        //          |
|                      \_NSR__ \                          //           |
|                              \\    ____________________//            |
|                               \\  /________SEI_________/             |
|   AP 806                       \\//                                  |
\                                 ||                                   /
 ---------------------------------||-----------------------------------
                                  ||
                                  || Interconnect
                                  ||\
                                  ||\\______
                                  || \______ <---> Others CP 110
                                  ||
 ---------------------------------||----------------------------------
/                                 ||                                   \
|   CP 110                        ||                                   |
|                                 ||                                   |
|        -------------------------||------------------------           |
|       /                         || MSI                    \          |
|       |   ICU                   ||                        |          |
|       |         /--------------/  \------\                |          |
|       |        /      /-------/           \               |          |
|       |       /      /       /             \              |          |
|       |      /      /       /     . . .     \             |          |
|       |     /      /       /                 \            |          |
|       |   NSR     NSR     SEI               NSR           |          |
|       \    |       |       |                 |            /          |
|        ----^-------^-------^-----------------^------------           |
|            |       |       |                 |                       |
|            |       |       |      . . .      |                       |
|            |       |       |                 |                       |
|         int 0   int 1   int 2             int 206                    |
|                                                                      |
\                                                                      /
 ----------------------------------------------------------------------



Thank you,
Miquèl


Miquel Raynal (17):
  dt-bindings/interrupt-controller: fix Marvell ICU length in the
    example
  arm64: dts: marvell: fix CP110 ICU node size
  arm64: dts: marvell: add syscon compatible to CP110 ICU node
  irqchip/irq-mvebu-icu: fix wrong user data retrieval
  irqchip/irq-mvebu-icu: clarify the reset operation of configured
    interrupts
  irqchip/irq-mvebu-icu: switch to regmap
  irqchip/irq-mvebu-icu: make irq_domain local
  irqchip/irq-mvebu-icu: disociate ICU and NSR
  irqchip/irq-mvebu-icu: support ICU subnodes
  irqchip/irq-mvebu-sei: add new driver for Marvell SEI
  arm64: marvell: enable SEI driver
  irqchip/irq-mvebu-icu: add support for System Error Interrupts (SEI)
  dt-bindings/interrupt-controller: update Marvell ICU bindings
  dt-bindings/interrupt-controller: add description for Marvell SEI node
  arm64: dts: marvell: add AP806 SEI subnode
  arm64: dts: marvell: use new bindings for CP110 interrupts
  arm64: dts: marvell: add CP110 ICU SEI subnode

 .../bindings/interrupt-controller/marvell,icu.txt  |  62 ++-
 .../bindings/interrupt-controller/marvell,sei.txt  |  54 +++
 arch/arm64/Kconfig.platforms                       |   1 +
 arch/arm64/boot/dts/marvell/armada-ap806.dtsi      |  19 +
 arch/arm64/boot/dts/marvell/armada-cp110.dtsi      | 125 +++---
 drivers/irqchip/Kconfig                            |   3 +
 drivers/irqchip/Makefile                           |   1 +
 drivers/irqchip/irq-mvebu-icu.c                    | 294 ++++++++++----
 drivers/irqchip/irq-mvebu-sei.c                    | 449 +++++++++++++++++++++
 drivers/irqchip/irq-mvebu-sei.h                    |  12 +
 10 files changed, 877 insertions(+), 143 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/marvell,sei.txt
 create mode 100644 drivers/irqchip/irq-mvebu-sei.c
 create mode 100644 drivers/irqchip/irq-mvebu-sei.h

-- 
2.14.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 92+ messages in thread

end of thread, other threads:[~2018-05-18 14:48 UTC | newest]

Thread overview: 92+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-21 13:55 [PATCH 00/17] Add System Error Interrupt support to Armada SoCs Miquel Raynal
2018-04-21 13:55 ` Miquel Raynal
2018-04-21 13:55 ` [PATCH 01/17] dt-bindings/interrupt-controller: fix Marvell ICU length in the example Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-04-27 20:16   ` Rob Herring
2018-04-27 20:16     ` Rob Herring
2018-04-30 13:44   ` Thomas Petazzoni
2018-04-30 13:44     ` Thomas Petazzoni
2018-04-21 13:55 ` [PATCH 02/17] arm64: dts: marvell: fix CP110 ICU node size Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-04-30 12:38   ` Gregory CLEMENT
2018-04-30 12:38     ` Gregory CLEMENT
2018-04-30 13:44   ` Thomas Petazzoni
2018-04-30 13:44     ` Thomas Petazzoni
2018-04-21 13:55 ` [PATCH 03/17] arm64: dts: marvell: add syscon compatible to CP110 ICU node Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-04-30 13:45   ` Thomas Petazzoni
2018-04-30 13:45     ` Thomas Petazzoni
2018-04-21 13:55 ` [PATCH 04/17] irqchip/irq-mvebu-icu: fix wrong user data retrieval Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-04-30 13:49   ` Thomas Petazzoni
2018-04-30 13:49     ` Thomas Petazzoni
2018-05-03 14:57     ` Miquel Raynal
2018-05-03 14:57       ` Miquel Raynal
2018-04-21 13:55 ` [PATCH 05/17] irqchip/irq-mvebu-icu: clarify the reset operation of configured interrupts Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-04-30 13:51   ` Thomas Petazzoni
2018-04-30 13:51     ` Thomas Petazzoni
2018-04-21 13:55 ` [PATCH 06/17] irqchip/irq-mvebu-icu: switch to regmap Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-04-30 12:42   ` Gregory CLEMENT
2018-04-30 12:42     ` Gregory CLEMENT
2018-04-30 13:53   ` Thomas Petazzoni
2018-04-30 13:53     ` Thomas Petazzoni
2018-05-03 15:05     ` Miquel Raynal
2018-05-03 15:05       ` Miquel Raynal
2018-04-30 13:58   ` Thomas Petazzoni
2018-04-30 13:58     ` Thomas Petazzoni
2018-04-21 13:55 ` [PATCH 07/17] irqchip/irq-mvebu-icu: make irq_domain local Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-05-02  8:02   ` Thomas Petazzoni
2018-05-02  8:02     ` Thomas Petazzoni
2018-04-21 13:55 ` [PATCH 08/17] irqchip/irq-mvebu-icu: disociate ICU and NSR Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-05-02  8:03   ` Thomas Petazzoni
2018-05-02  8:03     ` Thomas Petazzoni
2018-04-21 13:55 ` [PATCH 09/17] irqchip/irq-mvebu-icu: support ICU subnodes Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-05-02  8:13   ` Thomas Petazzoni
2018-05-02  8:13     ` Thomas Petazzoni
2018-05-04  8:32     ` Miquel Raynal
2018-05-04  8:32       ` Miquel Raynal
2018-04-21 13:55 ` [PATCH 10/17] irqchip/irq-mvebu-sei: add new driver for Marvell SEI Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-05-02  9:17   ` Thomas Petazzoni
2018-05-02  9:17     ` Thomas Petazzoni
2018-05-02 15:56     ` Thomas Petazzoni
2018-05-02 15:56       ` Thomas Petazzoni
2018-05-18 13:22     ` Miquel Raynal
2018-05-18 13:22       ` Miquel Raynal
2018-04-21 13:55 ` [PATCH 11/17] arm64: marvell: enable SEI driver Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-04-30 13:01   ` Gregory CLEMENT
2018-04-30 13:01     ` Gregory CLEMENT
2018-04-21 13:55 ` [PATCH 12/17] irqchip/irq-mvebu-icu: add support for System Error Interrupts (SEI) Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-04-21 13:55 ` [PATCH 13/17] dt-bindings/interrupt-controller: update Marvell ICU bindings Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-04-27 20:47   ` Rob Herring
2018-04-27 20:47     ` Rob Herring
2018-04-28 10:42     ` Miquel Raynal
2018-04-28 10:42       ` Miquel Raynal
2018-04-28 10:50       ` Thomas Petazzoni
2018-04-28 10:50         ` Thomas Petazzoni
2018-04-21 13:55 ` [PATCH 14/17] dt-bindings/interrupt-controller: add description for Marvell SEI node Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-04-27 20:50   ` Rob Herring
2018-04-27 20:50     ` Rob Herring
2018-04-28 10:48     ` Miquel Raynal
2018-04-28 10:48       ` Miquel Raynal
2018-04-30 14:09       ` Rob Herring
2018-04-30 14:09         ` Rob Herring
2018-05-18 14:48         ` Miquel Raynal
2018-05-18 14:48           ` Miquel Raynal
2018-04-30 14:24   ` Thomas Petazzoni
2018-04-30 14:24     ` Thomas Petazzoni
2018-04-21 13:55 ` [PATCH 15/17] arm64: dts: marvell: add AP806 SEI subnode Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-04-21 13:55 ` [PATCH 16/17] arm64: dts: marvell: use new bindings for CP110 interrupts Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal
2018-04-21 13:55 ` [PATCH 17/17] arm64: dts: marvell: add CP110 ICU SEI subnode Miquel Raynal
2018-04-21 13:55   ` Miquel Raynal

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.