1
2
3
4
5
6
7 #ifndef _SPARC_IRQ_H
8 #define _SPARC_IRQ_H
9
10 #include <linux/linkage.h>
11
12 #include <asm/system.h>
13
14 #define NR_IRQS 15
15
16
17
18
19
20
21 extern void (*disable_irq)(unsigned int);
22 extern void (*enable_irq)(unsigned int);
23 extern void (*clear_clock_irq)( void );
24 extern void (*clear_profile_irq)( void );
25 extern void (*load_profile_irq)( unsigned int timeout );
26 extern void (*init_timers)(void (*lvl10_irq)(int, void *, struct pt_regs *));
27 extern void claim_ticker14(void (*irq_handler)(int, void *, struct pt_regs *),
28 int irq,
29 unsigned int timeout);
30
31 #ifdef __SMP__
32 extern void (*set_cpu_int)(int, int);
33 extern void (*clear_cpu_int)(int, int);
34 extern void (*set_irq_udt)(int);
35 #endif
36
37 extern int request_fast_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname);
38
39
40
41
42
43
44
45
46 struct sun4m_intreg_percpu {
47 unsigned int tbt;
48
49
50
51
52 unsigned int clear;
53 unsigned int set;
54 unsigned char space[PAGE_SIZE - 12];
55 };
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70 struct sun4m_intregs {
71 struct sun4m_intreg_percpu cpu_intregs[NCPUS];
72 unsigned int tbt;
73 unsigned int irqs;
74
75
76 unsigned int clear;
77 unsigned int set;
78
79
80 unsigned int undirected_target;
81 };
82
83 extern struct sun4m_intregs *sun4m_interrupts;
84
85
86
87
88
89
90
91 #define SUN4C_INT_ENABLE 0x01
92 #define SUN4C_INT_E14 0x80
93 #define SUN4C_INT_E10 0x20
94 #define SUN4C_INT_E8 0x10
95 #define SUN4C_INT_E6 0x08
96 #define SUN4C_INT_E4 0x04
97 #define SUN4C_INT_E1 0x02
98
99
100
101
102 #define SUN4M_INT_ENABLE 0x80000000
103 #define SUN4M_INT_E14 0x00000080
104 #define SUN4M_INT_E10 0x00080000
105
106 #define SUN4M_HARD_INT(x) (0x000000001 << (x))
107 #define SUN4M_SOFT_INT(x) (0x000010000 << (x))
108
109 #define SUN4M_INT_MASKALL 0x80000000
110 #define SUN4M_INT_MODULE_ERR 0x40000000
111 #define SUN4M_INT_M2S_WRITE 0x20000000
112 #define SUN4M_INT_ECC 0x10000000
113 #define SUN4M_INT_FLOPPY 0x00400000
114 #define SUN4M_INT_MODULE 0x00200000
115 #define SUN4M_INT_VIDEO 0x00100000
116 #define SUN4M_INT_REALTIME 0x00080000
117 #define SUN4M_INT_SCSI 0x00040000
118 #define SUN4M_INT_AUDIO 0x00020000
119 #define SUN4M_INT_ETHERNET 0x00010000
120 #define SUN4M_INT_SERIAL 0x00008000
121 #define SUN4M_INT_KBDMS 0x00004000
122 #define SUN4M_INT_SBUSBITS 0x00003F80
123
124 #define SUN4M_INT_SBUS(x) (1 << (x+7))
125
126 #endif