系统相关
首页 > 系统相关> > linux – 设备树中断属性的值是什么?

linux – 设备树中断属性的值是什么?

作者:互联网

我试图了解设备树中断属性,但无法找到一个好的解释.

例如,如果存在包含以下行的节点:

interrupt-parent = <&gpio5>;
interrupts = <9 0>;

我如何弄清楚幻数< 9 0>与……有关?
它是位掩码,gpio端口号,引脚号,优先级,边缘还是其他什么?

中断父节点看起来像这样(我想大多数ARM设备都类似):

gpio5: gpio@1234 {
   compatible = "fsl,imx7d-gpio", "fsl,imx35-gpio";  
   reg = <0x30240000 0x10000>;  
   interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
           <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
   gpio-controller;
   #gpio-cells = <2>;
   interrupt-controller;
   #interrupt-cells = <2>;
};

解决方法:

您可以从kernel documentation获取描述中断属性的一些信息.

它继续以.为例
OpenPIC interrupt controller
有2个单元格:

The first cell defines the interrupt number. The second cell defines the
sense and level information.
Sense and level information should be encoded as follows:

  0 = low to high edge sensitive type enabled
  ...

您的情况可能类似,但通常需要您对芯片组和驱动程序有深入的了解.

标签:device-tree,linux
来源: https://codeday.me/bug/20190816/1666413.html