Sam Ravnborg | 1d05995 | 2011-02-25 23:01:19 -0800 | [diff] [blame^] | 1 | #include <linux/platform_device.h> |
| 2 | |
Al Viro | 32231a6 | 2007-07-21 19:18:57 -0700 | [diff] [blame] | 3 | #include <asm/btfixup.h> |
| 4 | |
Sam Ravnborg | bbdc266 | 2011-02-25 23:00:19 -0800 | [diff] [blame] | 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); |
Sam Ravnborg | 1d05995 | 2011-02-25 23:01:19 -0800 | [diff] [blame^] | 12 | unsigned int (*build_device_irq)(struct platform_device *op, |
| 13 | unsigned int real_irq); |
Sam Ravnborg | bbdc266 | 2011-02-25 23:00:19 -0800 | [diff] [blame] | 14 | }; |
| 15 | extern struct sparc_irq_config sparc_irq_config; |
| 16 | |
| 17 | |
Al Viro | 0f51681 | 2007-07-21 19:19:38 -0700 | [diff] [blame] | 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) |
Al Viro | 32231a6 | 2007-07-21 19:18:57 -0700 | [diff] [blame] | 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) |
Al Viro | 32231a6 | 2007-07-21 19:18:57 -0700 | [diff] [blame] | 31 | BTFIXUPDEF_CALL(void, load_profile_irq, int, unsigned int) |
| 32 | |
Al Viro | 0f51681 | 2007-07-21 19:19:38 -0700 | [diff] [blame] | 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 | |
Al Viro | 32231a6 | 2007-07-21 19:18:57 -0700 | [diff] [blame] | 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 | |
Al Viro | 32231a6 | 2007-07-21 19:18:57 -0700 | [diff] [blame] | 58 | static inline void load_profile_irq(int cpu, int limit) |
| 59 | { |
| 60 | BTFIXUP_CALL(load_profile_irq)(cpu, limit); |
| 61 | } |
| 62 | |
Al Viro | 32231a6 | 2007-07-21 19:18:57 -0700 | [diff] [blame] | 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 |