Re: [uCsimm] IRQ6 on uCsimm

From: Vladimir A. Gurevich (vgurevic@cisco.com)
Date: Sun Mar 12 2000 - 11:38:22 EST


Hello Geoffrey,

Geoffrey Wossum wrote:

> Questions:
> Setting up IMR and ICR is the right thing to do?

You should set ICR only. request_irq will take care of IMR for you.
Also you might need to configure the appropriate pin, in your case PD7.
The default configuration for it is to work as IRQ6, so you might end
up doing nothing.

> What irq# do we pass to request_irq()? Right now we're saying 6, but we
> can't find out if this is correct.

This is your mistake. you should say 19 instead, because it is bit 19
in IMR/IPR/ISR that represents IRQ6. Bit 6 is the keyboard interrupt
and may get triggered by any other pin on PD7 too.

I recommend that you use asm/M68EZ328.h file in your driver. Then,
the piece of code will look like:

#include <asm/M68EZ328.h>

 ....

#ifdef CONFIG_YOUR_BOARD
        /* We use rising edge interrupt on IRQ6 */
        ICR |= (ICR_ET6 | ICR_POL6);

        if (request_irq(IRQ_MACHSPEC | IRQ6_IRQ_NUM,
                        your_device_interrupt,
                        IRQ_FLG_STD,
                        "My Device", NULL)) {
            panic("Unable to attach My Device intr\n");
        }
#endif

Happy hacking,
Vladimir

-- 
+------------------+------------------------+--------------------------+
                   |      |          |      |
                   |     :|:        :|:     | phone         408-525-9707
Vladimir Gurevich  |    :|||:      :|||:    | fax           408-527-1713
Software Engineer  | .:|||||||:..:|||||||:. |
    NUBU/DIAL      |      CiscoSystems      | e-mail  vgurevic@cisco.com
                   |                        | location SJ-7-2 Cube D1-12
                   |  http://www.cisco.com  |
+------------------+------------------------+--------------------------+
This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:34 EST