Interrupt program

It's relate with character device driver.

When you open the device in device driver file, you link the irq to isr.

Example. Dmc9512(touch screen) device driver( driver/char/dmc9512_ts.c)

 

dmc9512_open{

...

ret = request_irq(IRQ_DMC9512, dmc9512_ts_interrupt,

           SA_INTERRUPT, TS_NAME, dev_id))

...

}

 

"dmc9512_ts_interrupt" is interrupt service routine.

It would be better help to refer the book relate with "Linux Device driver".

"Character device driver" part help your work.

 

Interrupt vector in JUPITER's UCLINUX

Interrupt vector base 0xc010000, it's right.

When interrupt occur, jump to (0xc010000 + intnum*0x80) and then call "do_IRQ" in linux kernel.

 

Refer the "arch/eiscnommu/kernel/entry-se3208.S"(或entry-jupiter.S

"ENERIC_INT_HANDLER" call the "do_IRQ"(in linux kernel).

"do_IRQ" (arch/eiscnommu/kernel/isr.c(或irq.c) call the ISR that is the device driver register.

"device driver" register is the isr with "request_irq()" function.

Normally, "open" function execute this.

 

Exam.

"driver/char/dmc9512_ts.c"

dmc9512_open{

...

ret = request_irq(IRQ_DMC9512, dmc9512_ts_interrupt,

           SA_INTERRUPT, TS_NAME, dev_id))

...

}

IRQ_DMC9512 is interrupt number(12), "dmc9512_ts_interrupt" is handler.

You would get the detail inform from the book "Linux device driver 2nd, Alessandro, O'Reilly" chapter 9,"interrupt handling".