mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
db0d4db22a
The GIC support code is heavily using the fact that hardware implementations are exposing banked registers. Unfortunately, it looks like at least one GIC implementation (EXYNOS) offers both the distributor and the CPU interfaces at different addresses, depending on the CPU. This problem is solved by allowing the distributor and CPU interface addresses to be per-cpu variables for the platforms that require it. The EXYNOS code is updated not to mess with the GIC internals while handling interrupts, and struct gic_chip_data is back to being private. The DT binding for the gic is updated to allow an optional "cpu-offset" value, which is used to compute the various base addresses. Finally, a new config option (GIC_NON_BANKED) is used to control this feature, so the overhead is only present on kernels compiled with support for EXYNOS. Tested on Origen (EXYNOS4) and Panda (OMAP4). Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
60 lines
2.0 KiB
Plaintext
60 lines
2.0 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.
|
|
|
|
- cpu-offset : per-cpu offset within the distributor and cpu interface
|
|
regions, used when the GIC doesn't have banked registers. The offset is
|
|
cpu-offset * cpu-nr.
|
|
|
|
Example:
|
|
|
|
intc: interrupt-controller@fff11000 {
|
|
compatible = "arm,cortex-a9-gic";
|
|
#interrupt-cells = <3>;
|
|
#address-cells = <1>;
|
|
interrupt-controller;
|
|
reg = <0xfff11000 0x1000>,
|
|
<0xfff10100 0x100>;
|
|
};
|
|
|