linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] imx-irqsteer for real
@ 2018-12-14 10:22 Lucas Stach
  2018-12-14 10:22 ` [PATCH v2 1/2] dt-bindings: irq: add binding for Freescale IRQSTEER multiplexer Lucas Stach
  2018-12-14 10:22 ` [PATCH v2 2/2] irqchip: add driver for imx-irqsteer controller Lucas Stach
  0 siblings, 2 replies; 8+ messages in thread
From: Lucas Stach @ 2018-12-14 10:22 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier, Rob Herring, Mark Rutland
  Cc: linux-kernel, devicetree, kernel, patchwork-lst

Hi all,

this is a completely reworked submission of the imx-irqsteer driver. The
first version was bugged due to wrong/misleading documentation and buggy
implementation of the downstream driver that only worked correctly with
a very specific DT configuration.

The key information here is that a given SoC can have multiple instances
of the irqsteer controller, which can be connected to mutiple output IRQ
lines, but all the input IRQs to one instance are exclusively steered to
one of the output IRQs (which is called a channel). So it's a flexible
hardware design, were each irqsteer instance needs to be told which
upstream IRQ it should use, instead of this being fixed at SoC design
time.

Also the controller is configurable in the number of input IRQs supported,
but only in groups of 64 IRQs, which has an influence on the register
layout, as status, mask and force registers are packed together. Currently
existing implementations of the irqsteer block have between 1 and 8 IRQ
groups, which the documentation confusingly also calls a channel.

Also there is no per-groups status indication, but only a global status
bit, so the IRQ handling can not be optimized, but all status registers
must be checked.

After figuring out all those bits, the driver turned out to be pretty
simple.

Regards,
Lucas

Lucas Stach (2):
  dt-bindings: irq: add binding for Freescale IRQSTEER multiplexer
  irqchip: add driver for imx-irqsteer controller

 .../interrupt-controller/fsl,irqsteer.txt     |  34 +++
 drivers/irqchip/Kconfig                       |   8 +
 drivers/irqchip/Makefile                      |   1 +
 drivers/irqchip/irq-imx-irqsteer.c            | 269 ++++++++++++++++++
 4 files changed, 312 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/fsl,irqsteer.txt
 create mode 100644 drivers/irqchip/irq-imx-irqsteer.c

-- 
2.19.1


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

end of thread, other threads:[~2018-12-17 14:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-14 10:22 [PATCH v2 0/2] imx-irqsteer for real Lucas Stach
2018-12-14 10:22 ` [PATCH v2 1/2] dt-bindings: irq: add binding for Freescale IRQSTEER multiplexer Lucas Stach
2018-12-14 10:22 ` [PATCH v2 2/2] irqchip: add driver for imx-irqsteer controller Lucas Stach
2018-12-15  9:45   ` Marc Zyngier
2018-12-17 10:09     ` Lucas Stach
2018-12-17 10:32       ` Marc Zyngier
2018-12-17 13:52         ` Lucas Stach
2018-12-17 14:41           ` Marc Zyngier

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).