哎,等了这么久,没一个人给回复,失望,对这个社区感到很失望。
还是自己找了出来,贴出来,给其他不知道的人看看。
在s3c24xx_init_irq()中,有这么一段代码:
for (irqno = IRQ_EINT4; irqno <= IRQ_EINT23; irqno++) {
irqdbf("registering irq %d (extended s3c irq)\n", irqno);
set_irq_chip(irqno, &s3c_irqext_chip);
set_irq_handler(irqno, handle_edge_irq);
set_irq_flags(irqno, IRQF_VALID);
}
其中在调用set_irq_chip(irqno, &s3c_irqext_chip)中,
static struct irq_chip s3c_irqext_chip = {
.name = "s3c-ext",
.mask = s3c_irqext_mask,
.unmask = s3c_irqext_unmask,
.ack = s3c_irqext_ack,
.set_type = s3c_irqext_type,
.set_wake = s3c_irqext_wake
};
请仔细看看s3c_irqext_type(当初没深入,哎,浪费了我很多时间)
/* Set the GPIO to external interrupt mode */
value = __raw_readl(gpcon_reg);
value = (value & ~(3 << gpcon_offset)) | (0x02 << gpcon_offset);
__raw_writel(value, gpcon_reg);
可以看得很明白。