-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARM: gic: add OF based initialization
This adds ARM gic interrupt controller initialization using device tree data. The initialization function is intended to be called by of_irq_init function like this: const static struct of_device_id irq_match[] = { { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, {} }; static void __init init_irqs(void) { of_irq_init(irq_match); } Signed-off-by: Rob Herring <rob.herring@calxeda.com> Reviewed-by: Jamie Iles <jamie@jamieiles.com> Tested-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca>
- Loading branch information
Rob Herring
authored and
Arnd Bergmann
committed
Oct 31, 2011
1 parent
4294f8b
commit b3f7ed0
Showing
3 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
* ARM Generic Interrupt Controller | ||
|
||
ARM SMP cores are often associated with a GIC, providing per processor | ||
interrupts (PPI), shared processor interrupts (SPI) and software | ||
generated interrupts (SGI). | ||
|
||
Primary GIC is attached directly to the CPU and typically has PPIs and SGIs. | ||
Secondary GICs are cascaded into the upward interrupt controller and do not | ||
have PPIs or SGIs. | ||
|
||
Main node required properties: | ||
|
||
- compatible : should be one of: | ||
"arm,cortex-a9-gic" | ||
"arm,arm11mp-gic" | ||
- interrupt-controller : Identifies the node as an interrupt controller | ||
- #interrupt-cells : Specifies the number of cells needed to encode an | ||
interrupt source. The type shall be a <u32> and the value shall be 3. | ||
|
||
The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI | ||
interrupts. | ||
|
||
The 2nd cell contains the interrupt number for the interrupt type. | ||
SPI interrupts are in the range [0-987]. PPI interrupts are in the | ||
range [0-15]. | ||
|
||
The 3rd cell is the flags, encoded as follows: | ||
bits[3:0] trigger type and level flags. | ||
1 = low-to-high edge triggered | ||
2 = high-to-low edge triggered | ||
4 = active high level-sensitive | ||
8 = active low level-sensitive | ||
bits[15:8] PPI interrupt cpu mask. Each bit corresponds to each of | ||
the 8 possible cpus attached to the GIC. A bit set to '1' indicated | ||
the interrupt is wired to that CPU. Only valid for PPI interrupts. | ||
|
||
- reg : Specifies base physical address(s) and size of the GIC registers. The | ||
first region is the GIC distributor register base and size. The 2nd region is | ||
the GIC cpu interface register base and size. | ||
|
||
Optional | ||
- interrupts : Interrupt source of the parent interrupt controller. Only | ||
present on secondary GICs. | ||
|
||
Example: | ||
|
||
intc: interrupt-controller@fff11000 { | ||
compatible = "arm,cortex-a9-gic"; | ||
#interrupt-cells = <3>; | ||
#address-cells = <1>; | ||
interrupt-controller; | ||
reg = <0xfff11000 0x1000>, | ||
<0xfff10100 0x100>; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters