Other Parts Discussed in Thread: SYSBIOS
What are the basic steps to configure ISR from Linux driver side and from sysbios side?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
What are the basic steps to configure ISR from Linux driver side and from sysbios side?
Thank you for fast reply,
I change dts file and register IRQ in linux driver with request_irq() call. I see my new IRQ at /proc/interrupts
Is it enought for linux-side configuration?
Hi striker
dts modifications is:
dsp0 {
...
interrupts = <0x8 0x0 0x0 0x0 0x18 0x0>;
...
};
dsp1 {
...
interrupts = <0x9 0x0 0x1 0x0 0x19 0x0>;
...
};
and so on.
Driver code, that configures irq:
if (request_irq(<irq number>, your_irqhandler, 0, <irq description string>, NULL)) {
printk(KERN_ERR "error descriptio\n");
....
}
Thanks, Atmeg
However I am also curious on some questions - forgive me of that I'm a newbee on device tree stuff.
1) interrupts = <0x8 0x0 0x0 0x0 0x18 0x0> -- what is the last two elements stand for ? Hoestly that the number of interrupts elements is 4 or 6 is also confusing me , I only see #interrupt-cells = <2> in
branch ipcirq0 of keystone.dtsi.
2) your IRQ number is 512+16 = 528 - what is the meaning of 512 and where did you get this number ? It looks like something of basic ipc-irq number.
3) request_irq(<irq number> , using what function do you get the irq number or did you just directly use 528? There are totally 28bits which can trigger irq- does it mean 28 request_irq function are needed if I want to capture all of them?
Regards.
1) #interrupt-cells = <2> means 2 fields are used for each irq definition. I.e. 4 fields for 2 irqs, 6 fields for 3 irqs. First field defines irq number. I don't know what means the second (could anybody explain what is it?)
2) About 512 offset, I obtain this number by comparing cat /proc/interrupts and irq number from device tree. May be this number is defined somewhere in the documents, but I did not found.
3) I use platform_get_irq(platform_device, 2) to obtain the irq number. It returns 528 and so on numbers, it's not nessesary to know or define this 512 offset. 0 and 1 platform irqs is in use by remoteproc and 2 I use for me.
In remoteproc_user.c:
uproc->irq_ctl = platform_get_irq(pdev, 0);
uproc->irq_ring = platform_get_irq(pdev, 1);
rproc->trace_irq = platform_get_irq(pdev, 2); <-- added
trace_irq is a field I added to the rproc structure to pass irq to the driver