irq change

来源:互联网 发布:电子商务网络环境 编辑:程序博客网 时间:2024/06/05 18:09

linux/arch/arm/common/gic.c

drivers/irqchip/irq-gic.c


http://lwn.net/Articles/521798/

irqchip: add basic infrastructure


With the recent creation of the drivers/irqchip/ directory, it isdesirable to move irq controller drivers here. At the moment, the onlydriver here is irq-bcm2835, the driver for the irq controller found inthe ARM BCM2835 SoC, present in Rasberry Pi systems. This irqcontroller driver was exporting its initialization function and itsirq handling function through a header file in<linux/irqchip/bcm2835.h>.When proposing to also move another irq controller driver indrivers/irqchip, Rob Herring raised the very valid point that movingthings to drivers/irqchip was good in order to remove more stuff fromarch/arm, but if it means adding gazillions of headers files ininclude/linux/irqchip/, it would not be very nice.
So, upon the suggestion of Rob Herring and Arnd Bergmann, this commitintroduces a small infrastructure that defines a centralirqchip_init() function in drivers/irqchip/irqchip.c, which is meantto be called as the ->init_irq() callback of ARM platforms. Thisfunction calls of_irq_init() with an array that will progressivelycontain the compatible strings of each irq controller driver, and alsoa reference to the initialization functions of such drivers. Thedrivers/irqchip/irqchip.h header file, currently empty, is added toallow irq controller drivers to expose their initialization functionto the main irqchip.c file. Note that the irq controller driverinitialization function is responsible for setting the globalhandle_arch_irq() variable, so that ARM platforms no longer have todefine the ->handle_irq field in their DT_MACHINE structure.A global header, <linux/irqchip.h> is also added to expose the singleirqchip_init() function to the reset of the kernel.A further commit moves the BCM2835 irq controller driver to this newsmall infrastructure, therefore removing the include/linux/irqchip/directory.Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
0 0
原创粉丝点击