ARM设备树文件中,三个中断值是什么意思

In an ARM device tree file, what do the three interrupt values mean

典型 ARM 设备的设备树源将包含中断控制器部分:

interrupt-controller@f8f01000 {
    compatible = "arm,cortex-a9-gic";
    #interrupt-cells = <0x3>;
    interrupt-controller;
    reg = <0xf8f01000 0x1000 0xf8f00100 0x100>;
    num_cpus = <0x2>;
    num_interrupts = <0x60>;
    linux,phandle = <0x3>;
    phandle = <0x3>;
};

属性#interrupt-cells定义了注册中断的元组大小。因此,在定义设备时,必须定义三个整数来指定中断及其属性。

ocmc@f800c000 {
    compatible = "xlnx,zynq-ocmc-1.0";
    interrupt-parent = <0x3>;
    interrupts = <0x0 0x3 0x4>;
    reg = <0xf800c000 0x1000>;
};

问题是,这三个值分别代表什么?那么,行 interrupts = <0x0 0x3 0x4>; 是什么意思?在为其注册中断处理程序时必须添加什么偏移量(通过 signal.h/csignalsignal(<signal id>, <function name>);

从链接网站解析:

The first number is a flag indicating if the interrupt is an SPI (shared peripheral interrupt). A nonzero value means it is an SPI. This impacts offsets added to translate the interrupt number (16 for SPI, 32 for non-SPI).

The second number is the interrupt number.

The third number is the type of interrupt: 0 = Leave it as it was (power-up default or what the bootloader set it to, if it did). 1 = Rising edge. 4 = Level sensitive, active high.