요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
Some socs have a large number of interrupts requests to service
the needs of its many peripherals and subsystems. All of the
interrupt lines from the subsystems are not needed at the same
time, so they have to be muxed to the irq-controller appropriately.
In such places a interrupt controllers are preceded by an CROSSBAR
that provides flexibility in muxing the device requests to the controller
inputs.
Required properties:
- compatible : Should be "ti,irq-crossbar"
- reg: Base address and the size of the crossbar registers.
- interrupt-controller: indicates that this block is an interrupt controller.
- ti,max-irqs: Total number of irqs available at the parent interrupt controller.
- ti,max-crossbar-sources: Maximum number of crossbar sources that can be routed.
- ti,reg-size: Size of a individual register in bytes. Every individual
register is assumed to be of same size. Valid sizes are 1, 2, 4.
- ti,irqs-reserved: List of the reserved irq lines that are not muxed using
crossbar. These interrupt lines are reserved in the soc,
so crossbar bar driver should not consider them as free
lines.
Optional properties:
- ti,irqs-skip: This is similar to "ti,irqs-reserved", but these are for
SOC-specific hard-wiring of those irqs which unexpectedly bypasses the
crossbar. These irqs have a crossbar register, but still cannot be used.
- ti,irqs-safe-map: integer which maps to a safe configuration to use
when the interrupt controller irq is unused (when not provided, default is 0)
Examples:
crossbar_mpu: crossbar@4a002a48 {
compatible = "ti,irq-crossbar";
reg = <0x4a002a48 0x130>;
ti,max-irqs = <160>;
ti,max-crossbar-sources = <400>;
ti,reg-size = <2>;
ti,irqs-reserved = <0 1 2 3 5 6 131 132>;
ti,irqs-skip = <10 133 139 140>;
};
Consumer:
========
See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt and
Documentation/devicetree/bindings/interrupt-controller/arm,gic.yaml for
further details.
An interrupt consumer on an SoC using crossbar will use:
interrupts = <GIC_SPI request_number interrupt_level>
Example:
device_x@4a023000 {
/* Crossbar 8 used */
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
...
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Interrupt crossbar controller
1-40일부 SoC에는 많은 peripheral과 subsystem의 요구를 처리하기 위한 interrupt request가 매우 많습니다. 모든 subsystem interrupt line이 동시에 필요하지 않으므로 irq-controller input에 적절히 mux해야 합니다.
이 경우 interrupt controller 앞에 CROSSBAR를 두어 device request를 controller input에 유연하게 mapping합니다.
필수 `compatible`은 `ti,irq-crossbar`, `reg`는 crossbar register base와 크기, `interrupt-controller`는 이 block이 interrupt controller임을 나타냅니다.
`ti,max-irqs`는 parent interrupt controller가 제공하는 총 IRQ 수, `ti,max-crossbar-sources`는 routing 가능한 최대 crossbar source 수입니다. `ti,reg-size`는 각 register 크기이며 모든 register가 같은 크기라고 가정하고 1, 2, 4 byte만 허용합니다.
`ti,irqs-reserved`는 crossbar로 mux하지 않는 reserved IRQ line 목록입니다. SoC에서 예약된 line이므로 driver가 free line으로 취급해서는 안 됩니다.
Optional `ti,irqs-skip`은 SoC-specific hard-wiring으로 crossbar를 예상과 다르게 우회하는 IRQ 목록입니다. Crossbar register가 있어도 사용할 수 없습니다.
Optional `ti,irqs-safe-map`은 interrupt controller IRQ가 사용되지 않을 때 적용할 safe configuration을 나타내는 정수이며 생략하면 기본값은 0입니다.
Crossbar node 예
crossbar_mpu: crossbar@4a002a48 {
compatible = "ti,irq-crossbar";
reg = <0x4a002a48 0x130>;
ti,max-irqs = <160>;
ti,max-crossbar-sources = <400>;
ti,reg-size = <2>;
ti,irqs-reserved = <0 1 2 3 5 6 131 132>;
ti,irqs-skip = <10 133 139 140>;
};
많은 subsystem request를 제한된 parent IRQ input에 mapping합니다.
Reserved, skip과 safe map의 차이를 정리합니다.
Crossbar interrupt consumer
41-55Consumer
자세한 내용은 `Documentation/devicetree/bindings/interrupt-controller/interrupts.txt`와 `Documentation/devicetree/bindings/interrupt-controller/arm,gic.yaml`을 참조하십시오.
Crossbar를 사용하는 SoC의 interrupt consumer는 `interrupts = <GIC_SPI request_number interrupt_level>` 형식을 사용합니다.
Crossbar request 8을 level-high SPI로 사용하는 예
device_x@4a023000 {
/* Crossbar 8 used */
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
...
};
요약과 해설
crossbar.txt:1-55Reserved와 hard-wired IRQ를 제외하고 request number를 parent GIC SPI input에 mapping합니다.