aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorKevin Cernekee <cernekee@gmail.com>2014-11-07 01:44:26 -0500
committerJason Cooper <jason@lakedaemon.net>2014-11-08 23:03:13 -0500
commitc76acf4dffa3232711b5364d7a29746df590f3db (patch)
tree1477f55905d95991574d12a46eb05b17ec2af156 /Documentation
parent05b8ce8260b069b0d59516711e2795758f203556 (diff)
irqchip: bcm7120-l2: Extend driver to support 64+ bit controllers
Most implementations of the bcm7120-l2 controller only have a single 32-bit enable word + 32-bit status word. But some instances have added more enable/status pairs in order to support 64+ IRQs (which are all ORed into one parent IRQ input). Make the following changes to allow the driver to support this: - Extend DT bindings so that multiple words can be specified for the reg property, various masks, etc. - Add loops to the probe/handle functions to deal with each word separately - Allocate 1 generic-chip for every 32 IRQs, so we can still use the clr/set helper functions - Update the documentation This uses one domain per bcm7120-l2 DT node. If the DT node defines multiple enable/status pairs (i.e. >=64 IRQs) then the driver will create a single IRQ domain with 2+ generic chips. Multiple generic chips are required because the generic-chip code can only handle one enable/status register pair per instance. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lkml.kernel.org/r/1415342669-30640-12-git-send-email-cernekee@gmail.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt26
1 files changed, 18 insertions, 8 deletions
diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt
index ff812a8a82bc..bae1f2187226 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm7120-l2-intc.txt
@@ -13,7 +13,12 @@ Such an interrupt controller has the following hardware design:
13 or if they will output an interrupt signal at this 2nd level interrupt 13 or if they will output an interrupt signal at this 2nd level interrupt
14 controller, in particular for UARTs 14 controller, in particular for UARTs
15 15
16- not all 32-bits within the interrupt controller actually map to an interrupt 16- typically has one 32-bit enable word and one 32-bit status word, but on
17 some hardware may have more than one enable/status pair
18
19- no atomic set/clear operations
20
21- not all bits within the interrupt controller actually map to an interrupt
17 22
18The typical hardware layout for this controller is represented below: 23The typical hardware layout for this controller is represented below:
19 24
@@ -48,7 +53,9 @@ The typical hardware layout for this controller is represented below:
48Required properties: 53Required properties:
49 54
50- compatible: should be "brcm,bcm7120-l2-intc" 55- compatible: should be "brcm,bcm7120-l2-intc"
51- reg: specifies the base physical address and size of the registers 56- reg: specifies the base physical address and size of the registers;
57 multiple pairs may be specified, with the first pair handling IRQ offsets
58 0..31 and the second pair handling 32..63
52- interrupt-controller: identifies the node as an interrupt controller 59- interrupt-controller: identifies the node as an interrupt controller
53- #interrupt-cells: specifies the number of cells needed to encode an interrupt 60- #interrupt-cells: specifies the number of cells needed to encode an interrupt
54 source, should be 1. 61 source, should be 1.
@@ -59,18 +66,21 @@ Required properties:
59- brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts 66- brcm,int-map-mask: 32-bits bit mask describing how many and which interrupts
60 are wired to this 2nd level interrupt controller, and how they match their 67 are wired to this 2nd level interrupt controller, and how they match their
61 respective interrupt parents. Should match exactly the number of interrupts 68 respective interrupt parents. Should match exactly the number of interrupts
62 specified in the 'interrupts' property. 69 specified in the 'interrupts' property, multiplied by the number of
70 enable/status register pairs implemented by this controller. For
71 multiple parent IRQs with multiple enable/status words, this looks like:
72 <irq0_w0 irq0_w1 irq1_w0 irq1_w1 ...>
63 73
64Optional properties: 74Optional properties:
65 75
66- brcm,irq-can-wake: if present, this means the L2 controller can be used as a 76- brcm,irq-can-wake: if present, this means the L2 controller can be used as a
67 wakeup source for system suspend/resume. 77 wakeup source for system suspend/resume.
68 78
69- brcm,int-fwd-mask: if present, a 32-bits bit mask to configure for the 79- brcm,int-fwd-mask: if present, a bit mask to configure the interrupts which
70 interrupts which have a mux gate, typically UARTs. Setting these bits will 80 have a mux gate, typically UARTs. Setting these bits will make their
71 make their respective interrupts outputs bypass this 2nd level interrupt 81 respective interrupt outputs bypass this 2nd level interrupt controller
72 controller completely, it completely transparent for the interrupt controller 82 completely; it is completely transparent for the interrupt controller
73 parent 83 parent. This should have one 32-bit word per enable/status pair.
74 84
75Example: 85Example:
76 86