* MPC885 interruptions : help !
@ 2005-06-15 8:35 scarayol
2005-06-15 10:26 ` Alex Zeffertt
0 siblings, 1 reply; 2+ messages in thread
From: scarayol @ 2005-06-15 8:35 UTC (permalink / raw)
To: linuxppc-embedded
Hi all,
I wrote a module driver to manage interruptions. I have an interruption on
MPC885 IRQ7 activated by a push button that provides a negative pulse of
200 ns width.
When the device is open, i call request_irq() to install the interrupt
handler:
int ret = request_irq(SIU_IRQ7, fpgadriver_irq_save_handler, SA_INTERRUPT,
FPGA_ID, NULL);
void fpgadriver_irq_save_handler(int irq, void *dev_id, struct pt_regs
*regs)
{
fpga_it_source=FPGA_IRQ_SAVE;
printk( "fpgadriver: fpgadriver_irq_save_handler for device \n");
/* Prepare a task */
PREPARE_TQUEUE(&fpgadriver_bh_task, fpgadriver_bh_handler, dev_id);
/* Add a task to the immediate bottom half and mark it for schedule */
queue_task(&fpgadriver_bh_task, &tq_immediate);
mark_bh(IMMEDIATE_BH);
}
my read() is like that :
static ssize_t fpgadriver_read(struct file *file, char *buf, size_t count,
loff_t *ppos)
{
//mise a jour de l'indicateur d'etat d'endormissement
wakeups++;
interruptible_sleep_on(&readq);
buf[0]=fpga_it_source;
printk("fpgadriver_read \n");
return 0;
}
I have the wake_up_interruptible(&reaq) in fpgadriver_bh_handler(). My
problem is that fpgadriver_irq_save_handler() is never called as if there
is no interruption.
Is there something else to modify to validate the interruption ? Is
SIU_IRQ7 the right value for my interruption ? What have i to check ?
Thanks for your reply.
Sophie CARAYOL
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: MPC885 interruptions : help !
2005-06-15 8:35 MPC885 interruptions : help ! scarayol
@ 2005-06-15 10:26 ` Alex Zeffertt
0 siblings, 0 replies; 2+ messages in thread
From: Alex Zeffertt @ 2005-06-15 10:26 UTC (permalink / raw)
To: scarayol; +Cc: linuxppc-embedded
Pins on the 8xx are highly configurable. I recommend that you check
that the pin has not been configured for another function. For example
on the 862 the SIU_IRQ7 pin doubles as the MII tx clock.
Alex
On Wed, 15 Jun 2005 10:35:41 +0200
scarayol@assystembrime.com wrote:
> Hi all,
>
> I wrote a module driver to manage interruptions. I have an
> interruption on MPC885 IRQ7 activated by a push button that provides a
> negative pulse of 200 ns width.
> When the device is open, i call request_irq() to install the interrupt
> handler:
>
> int ret = request_irq(SIU_IRQ7, fpgadriver_irq_save_handler,
> SA_INTERRUPT, FPGA_ID, NULL);
>
> void fpgadriver_irq_save_handler(int irq, void *dev_id, struct pt_regs
> *regs)
> {
> fpga_it_source=FPGA_IRQ_SAVE;
> printk( "fpgadriver: fpgadriver_irq_save_handler for device \n");
> /* Prepare a task */
> PREPARE_TQUEUE(&fpgadriver_bh_task, fpgadriver_bh_handler, dev_id);
> /* Add a task to the immediate bottom half and mark it for schedule
> */ queue_task(&fpgadriver_bh_task, &tq_immediate);
> mark_bh(IMMEDIATE_BH);
> }
>
> my read() is like that :
>
> static ssize_t fpgadriver_read(struct file *file, char *buf, size_t
> count, loff_t *ppos)
> {
> //mise a jour de l'indicateur d'etat d'endormissement
> wakeups++;
> interruptible_sleep_on(&readq);
> buf[0]=fpga_it_source;
> printk("fpgadriver_read \n");
> return 0;
> }
>
> I have the wake_up_interruptible(&reaq) in fpgadriver_bh_handler(). My
> problem is that fpgadriver_irq_save_handler() is never called as if
> there is no interruption.
> Is there something else to modify to validate the interruption ? Is
> SIU_IRQ7 the right value for my interruption ? What have i to check ?
>
> Thanks for your reply.
>
> Sophie CARAYOL
>
>
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-06-15 10:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-15 8:35 MPC885 interruptions : help ! scarayol
2005-06-15 10:26 ` Alex Zeffertt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox