OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-i960/] [irq.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
#ifndef _I960_IRQ_H_
2
#define _I960_IRQ_H_
3
 
4
/* FIXME not touched yet */
5
 
6
extern void disable_irq(unsigned int);
7
extern void enable_irq(unsigned int);
8
 
9
#include <linux/config.h>
10
 
11
/*
12
 * # of i960 interrupts
13
 */
14
 
15
#define SYS_IRQS 8
16
 
17
/*
18
 * This should be the same as the max(NUM_X_SOURCES) for all the
19
 * different m68k hosts compiled into the kernel.
20
 * Currently the Atari has 72 and the Amiga 24, but if both are
21
 * supported in the kernel it is better to make room for 72.
22
 */
23
#if defined(CONFIG_ATARI)
24
#define NR_IRQS (72+SYS_IRQS)
25
#else
26
#define NR_IRQS (24+SYS_IRQS)
27
#endif
28
 
29
/*
30
 * Interrupt source definitions
31
 * General interrupt sources are the level 1-7.
32
 * Adding an interrupt service routine for one of these sources
33
 * results in the addition of that routine to a chain of routines.
34
 * Each one is called in succession.  Each individual interrupt
35
 * service routine should determine if the device associated with
36
 * that routine requires service.
37
 */
38
 
39
#define IRQ1            (1)     /* level 1 interrupt */
40
#define IRQ2            (2)     /* level 2 interrupt */
41
#define IRQ3            (3)     /* level 3 interrupt */
42
#define IRQ4            (4)     /* level 4 interrupt */
43
#define IRQ5            (5)     /* level 5 interrupt */
44
#define IRQ6            (6)     /* level 6 interrupt */
45
#define IRQ7            (7)     /* level 7 interrupt (non-maskable) */
46
 
47
/*
48
 * "Generic" interrupt sources
49
 */
50
 
51
#define IRQ_SCHED_TIMER (8)    /* interrupt source for scheduling timer */
52
 
53
/*
54
 * Machine specific interrupt sources.
55
 *
56
 * Adding an interrupt service routine for a source with this bit
57
 * set indicates a special machine specific interrupt source.
58
 * The machine specific files define these sources.
59
 */
60
 
61
#define IRQ_MACHSPEC    (0x10000000L)
62
#define IRQ_IDX(irq)    ((irq) & ~IRQ_MACHSPEC)
63
 
64
/*
65
 * various flags for request_irq()
66
 */
67
#define IRQ_FLG_LOCK    (0x0001)        /* handler is not replaceable   */
68
#define IRQ_FLG_REPLACE (0x0002)        /* replace existing handler     */
69
#define IRQ_FLG_FAST    (0x0004)
70
#define IRQ_FLG_SLOW    (0x0008)
71
#define IRQ_FLG_STD     (0x8000)        /* internally used              */
72
 
73
/*
74
 * This structure is used to chain together the ISRs for a particular
75
 * interrupt source (if it supports chaining).
76
 */
77
typedef struct irq_node {
78
        void            (*handler)(int, void *, struct pt_regs *);
79
        unsigned long   flags;
80
        void            *dev_id;
81
        const char      *devname;
82
        struct irq_node *next;
83
} irq_node_t;
84
 
85
/*
86
 * This structure has only 4 elements for speed reasons
87
 */
88
typedef struct irq_handler {
89
        void            (*handler)(int, void *, struct pt_regs *);
90
        unsigned long   flags;
91
        void            *dev_id;
92
        const char      *devname;
93
} irq_handler_t;
94
 
95
/* count of spurious interrupts */
96
extern volatile unsigned int num_spurious;
97
 
98
/*
99
 * This function returns a new irq_node_t
100
 */
101
extern irq_node_t *new_irq_node(void);
102
 
103
#endif /* _I960_IRQ_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.