Re: [uClinux-dev] ARM external IRQ

From: vincent_kuo@sercomm.com
Date: Tue Jul 23 2002 - 22:53:16 EDT


>On Tuesday 23 July 2002 05:46, vincent_kuo@sercomm.com wrote:
>> Dear all,
>>      I am using the TI-TMS320DSC21 EVM board (it's ARM7 CPU). I meet some
>> problems and needs help.
>>      I know that we could use "request_irq", "enable_irq"... function calls
>> to let the interrrupt run into our interrupt routine. But for this special
>> CPU, it could set its GIO [0-7] as an external interrupt. The CPU has 32
>> GIO [0-31], they are all simply memory I/O, except the first 8 GIO could
>> declare both I/O mode and Interrupt mode (GIO[0-7]).

> Matthias Welwarsky wrote:
> I'm using the same board btw. You need to enable the EXTBUS interrupt and map
> it to some interrupt handler via request_irq. In this interrupt handler, you
> need to figure which of the GIOs is responsible for the request, and branch
> into the appropriate handler yourself.
> This task is the easier one, because no hassle with assembler code in
> entry-armv.S involved.
> Alternatively, look into include/asm/arch/irq.h, there's a function called
> irq_init_irq(), where you can specify mask/ack functions for all interrupt
> lines. It should be fairly easy to increase NR_IRQS and to map the external
> interrupts to irq number 33-40 if you provide the proper mask/unmask/ack
> functions.

Thanks. I found the following declarations in "include/asm/arch/irq.h" and
"include/asm/arch/irqs.h"
---------->   irq.h:
#if defined(CONFIG_ARCH_DSC21)
static u16 const irq_to_mask[] = {
        0x0001, /* 0 - Timer 0 */
        0x0002, /* 1 - Timer 1 */
        0x0004, /* 2 - Timer 2 */
        0x0008, /* 3 - Timer 3 */
        0x0010, /* 4 - CCD VD 0 */
        0x0020, /* 5 - CCD VD 1 */
        0x0040, /* 6 - CCD VD 2 */
        0x0200, /* 7 - ENC VD */
        0x0080, /* Serial I/F 0 */
        0x0100, /* Serial I/F 1 */
        0x0400, /* DSP (HPIB) */
        0x0800, /* UART 0 */
        0x1000, /* UART 1 */
        0x2000, /* USB */
        0x4000, /* BURSTC END */
        0x8000, /* External Bus Controller */
        0x0001, /* External Interruption 0 */
        0x0002, /* External Interruption 1 */
        0x0004, /* External Interruption 2 */
        0x0008, /* External Interruption 3 */
        0x0010, /* External Interruption 4 */
        0x0020, /* External Interruption 5 */
        0x0040, /* External Interruption 6 */
        0x0080, /* External Interruption 7 */
        0x0100, /* External DMA I/F */
        0x0200, /* Flash ready */
        0x0400, /* IrDA receive */
        0x0800  /* IrDA transmit */
};
#endif /* CONFIG_ARCH_DSC21 */

---------->   irqs.h:
#if defined (CONFIG_ARCH_DSC21)
/* irq #s as reported by the INTIDR register (used) */
#define DSC21_IRQ_TIMER1  1
#define DSC21_IRQ_TIMER2  2
#define DSC21_IRQ_TIMER3  3
#define DSC21_IRQ_CCDVD0  4
#define DSC21_IRQ_CCDVD1  5
#define DSC21_IRQ_CCDVD2  6
#define DSC21_IRQ_ENCVD   7
#define DSC21_IRQ_SERIAL0 8
#define DSC21_IRQ_SERIAL1 9
#define DSC21_IRQ_DSP     10
#define DSC21_IRQ_UART0   11
#define DSC21_IRQ_UART1   12
#define DSC21_IRQ_USB     13
#define DSC21_IRQ_BURST   14
#define DSC21_IRQ_CARD    15
#define DSC21_IRQ_EXB0    16
#define DSC21_IRQ_EXB1    17
#define DSC21_IRQ_EXB2    18
#define DSC21_IRQ_EXB3    19
#define DSC21_IRQ_EXB4    20
#define DSC21_IRQ_EXB5    21
#define DSC21_IRQ_EXB6    22
#define DSC21_IRQ_EXB7    23
#define DSC21_IRQ_DMA     24
#define DSC21_IRQ_FLASH   25
#define DSC21_IRQ_IRRX    26
#define DSC21_IRQ_IRTX    27
#define NR_IRQS           DSC21_IRQ_IRTX
#endif /* CONFIG_ARCH_DSC21 */

So I think I could use "DSC21_IRQ_EXB0" to "DSC21_IRQ_EXB7" in my "requset_irq"
routine. I am curious about the real stuff in the C code (I guess, hope not ASM
code.). I will search the code.
Thanks for all replies. :-)
Regards,

--
Vincent C. Kuo
vincent_kuo@sercomm.com
---- ---- ---- ---- ---- ---- ---- ---- ---- ----
Take a little time, I will be your friend. ^-^
---- ---- ---- ---- ---- ---- ---- ---- ---- ----


This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/


This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:21:35 EDT