sparc32: introduce build_device_irq
[deliverable/linux.git] / arch / sparc / kernel / irq.h
1 #include <linux/platform_device.h>
2
3 #include <asm/btfixup.h>
4
5 /*
6 * Platform specific irq configuration
7 * The individual platforms assign their platform
8 * specifics in their init functions.
9 */
10 struct sparc_irq_config {
11 void (*init_timers)(irq_handler_t);
12 unsigned int (*build_device_irq)(struct platform_device *op,
13 unsigned int real_irq);
14 };
15 extern struct sparc_irq_config sparc_irq_config;
16
17
18 /* Dave Redman (djhr@tadpole.co.uk)
19 * changed these to function pointers.. it saves cycles and will allow
20 * the irq dependencies to be split into different files at a later date
21 * sun4c_irq.c, sun4m_irq.c etc so we could reduce the kernel size.
22 * Jakub Jelinek (jj@sunsite.mff.cuni.cz)
23 * Changed these to btfixup entities... It saves cycles :)
24 */
25
26 BTFIXUPDEF_CALL(void, disable_irq, unsigned int)
27 BTFIXUPDEF_CALL(void, enable_irq, unsigned int)
28 BTFIXUPDEF_CALL(void, disable_pil_irq, unsigned int)
29 BTFIXUPDEF_CALL(void, enable_pil_irq, unsigned int)
30 BTFIXUPDEF_CALL(void, clear_clock_irq, void)
31 BTFIXUPDEF_CALL(void, load_profile_irq, int, unsigned int)
32
33 static inline void __disable_irq(unsigned int irq)
34 {
35 BTFIXUP_CALL(disable_irq)(irq);
36 }
37
38 static inline void __enable_irq(unsigned int irq)
39 {
40 BTFIXUP_CALL(enable_irq)(irq);
41 }
42
43 static inline void disable_pil_irq(unsigned int irq)
44 {
45 BTFIXUP_CALL(disable_pil_irq)(irq);
46 }
47
48 static inline void enable_pil_irq(unsigned int irq)
49 {
50 BTFIXUP_CALL(enable_pil_irq)(irq);
51 }
52
53 static inline void clear_clock_irq(void)
54 {
55 BTFIXUP_CALL(clear_clock_irq)();
56 }
57
58 static inline void load_profile_irq(int cpu, int limit)
59 {
60 BTFIXUP_CALL(load_profile_irq)(cpu, limit);
61 }
62
63 #ifdef CONFIG_SMP
64 BTFIXUPDEF_CALL(void, set_cpu_int, int, int)
65 BTFIXUPDEF_CALL(void, clear_cpu_int, int, int)
66 BTFIXUPDEF_CALL(void, set_irq_udt, int)
67
68 #define set_cpu_int(cpu,level) BTFIXUP_CALL(set_cpu_int)(cpu,level)
69 #define clear_cpu_int(cpu,level) BTFIXUP_CALL(clear_cpu_int)(cpu,level)
70 #define set_irq_udt(cpu) BTFIXUP_CALL(set_irq_udt)(cpu)
71 #endif
This page took 0.061703 seconds and 5 git commands to generate.