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

Subversion Repositories or1k

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

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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