1 #include <linux/platform_device.h>
3 #include <asm/btfixup.h>
5 /* sun4m specific type definitions */
7 /* This maps direct to CPU specific interrupt registers */
8 struct sun4m_irq_percpu {
14 /* This maps direct to global interrupt registers */
15 struct sun4m_irq_global {
23 extern struct sun4m_irq_percpu __iomem *sun4m_irq_percpu[SUN4M_NCPUS];
24 extern struct sun4m_irq_global __iomem *sun4m_irq_global;
27 * Platform specific irq configuration
28 * The individual platforms assign their platform
29 * specifics in their init functions.
31 struct sparc_irq_config {
32 void (*init_timers)(irq_handler_t);
33 unsigned int (*build_device_irq)(struct platform_device *op,
34 unsigned int real_irq);
36 extern struct sparc_irq_config sparc_irq_config;
39 /* Dave Redman (djhr@tadpole.co.uk)
40 * changed these to function pointers.. it saves cycles and will allow
41 * the irq dependencies to be split into different files at a later date
42 * sun4c_irq.c, sun4m_irq.c etc so we could reduce the kernel size.
43 * Jakub Jelinek (jj@sunsite.mff.cuni.cz)
44 * Changed these to btfixup entities... It saves cycles :)
47 BTFIXUPDEF_CALL(void, disable_irq, unsigned int)
48 BTFIXUPDEF_CALL(void, enable_irq, unsigned int)
49 BTFIXUPDEF_CALL(void, disable_pil_irq, unsigned int)
50 BTFIXUPDEF_CALL(void, enable_pil_irq, unsigned int)
51 BTFIXUPDEF_CALL(void, clear_clock_irq, void)
52 BTFIXUPDEF_CALL(void, load_profile_irq, int, unsigned int)
54 static inline void __disable_irq(unsigned int irq)
56 BTFIXUP_CALL(disable_irq)(irq);
59 static inline void __enable_irq(unsigned int irq)
61 BTFIXUP_CALL(enable_irq)(irq);
64 static inline void disable_pil_irq(unsigned int irq)
66 BTFIXUP_CALL(disable_pil_irq)(irq);
69 static inline void enable_pil_irq(unsigned int irq)
71 BTFIXUP_CALL(enable_pil_irq)(irq);
74 static inline void clear_clock_irq(void)
76 BTFIXUP_CALL(clear_clock_irq)();
79 static inline void load_profile_irq(int cpu, int limit)
81 BTFIXUP_CALL(load_profile_irq)(cpu, limit);
85 BTFIXUPDEF_CALL(void, set_cpu_int, int, int)
86 BTFIXUPDEF_CALL(void, clear_cpu_int, int, int)
87 BTFIXUPDEF_CALL(void, set_irq_udt, int)
89 #define set_cpu_int(cpu,level) BTFIXUP_CALL(set_cpu_int)(cpu,level)
90 #define clear_cpu_int(cpu,level) BTFIXUP_CALL(clear_cpu_int)(cpu,level)
91 #define set_irq_udt(cpu) BTFIXUP_CALL(set_irq_udt)(cpu)