mirror of
https://github.com/torvalds/linux.git
synced 2024-12-22 19:01:37 +00:00
b3f7ed0324
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>
56 lines
1.9 KiB
Plaintext
56 lines
1.9 KiB
Plaintext
* 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>;
|
|
};
|
|
|