irq_data 这个内嵌结构在2.6.37版本引入,之前的内核版本的做法是直接把这个结构中的字段直接放置在irq_desc结构体中,然后在调用硬件封装层的chip->xxx()回调中传入IRQ编号作为参数,但是底层的函数经常需要访问->handler_data,->chip_data,->msi_desc等字段,这需要利用irq_to_desc(irq)来获得irq_desc结构的指针,...
* IRQ_TYPE_LEVEL_HIGH - high level triggered * IRQ_TYPE_LEVEL_LOW - low level triggered * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits * IRQ_TYPE_SENSE_MASK - Mask for all the above bits * IRQ_TYPE_DEFAULT - For use by some PICs to ask irq_set_type * to setup th...
irq_set_handler_data(irq, *data) / irq_get_handler_data(irq)通过irq编号,设置、获取irq_desc.irq_data.handler_data字段,该字段是每个irq的私有数据,通常用于硬件封装层,例如中断控制器级联时,父irq用该字段保存子irq的起始编号。 irq_set_chip_data(irq, *data) / irq_get_chip_data(irq)通过irq编号...
中断触发方式 :IRQ_TYPE_LEVEL_HIGH表示高电平时触发(这个触发方式可以被后面的配置重新进行修改) 在【1】位置又重新声明了一个中断子控制器,用于gpio 5的子节点进行具体引脚的中断配置具体的配置说明可以参看Soc厂家给出的具体说明文档,这里NXP给的文档位于内核kernel_imx/Documentation/devicetree/bindings/arm/freescal...
RTC_IRQ 是中断号,和处理器绑定。 rtc_interrupt 是中断处理程序: staticirqreturn_trtc_interrupt(int irq,void*dev_id){/* * Can be an alarm interrupt, update complete interrupt, * or a periodic interrupt. We store the status in the * low byte and the number of interrupts received since ...
interrupts =<GIC_SPI165IRQ_TYPE_LEVEL_LOW>,<GIC_SPI166IRQ_TYPE_LEVEL_LOW>,<GIC_SPI167IRQ_TYPE_LEVEL_LOW>,<GIC_SPI168IRQ_TYPE_LEVEL_LOW>; infracfg =<&infracfg>; clocks =<&topckgenCLK_TOP_HIF_SEL>; clock-names = "hif_sel"; ...
* @kstat_irqs: irq stats per cpu * @irq_2_iommu: iommu with this irq * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] * @chip: low level interrupt hardware access * @msi_desc: MSI descriptor * @handler_data: per-IRQ data for the irq_chip methods ...
(GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; interrupt-parent = <&intc>; ...
RTC_IRQ 是中断号,和处理器绑定。 rtc_interrupt 是中断处理程序: static irqreturn_t rtc_interrupt(int irq, voiddev_id) { / Canbe an alarminterrupt, update complete interrupt, ora periodic interrupt. We store the status in the low byte and the number of interrupts received since ...
If we aren't using high-vectors, also * create a mapping at the low-vectors virtual address. */ map.pfn = __phys_to_pfn(virt_to_phys(vectors)); map.virtual = 0xffff0000; map.length = PAGE_SIZE; map.type = MT_HIGH_VECTORS; create_mapping(&map, false); if (!vectors_high())...