1 #include <linux/platform_device.h>
3 #include <asm/btfixup.h>
4 #include <asm/cpu_type.h>
7 struct irq_bucket *next;
13 #define SUN4D_MAX_BOARD 10
14 #define SUN4D_MAX_IRQ ((SUN4D_MAX_BOARD + 2) << 5)
16 /* Map between the irq identifier used in hw to the
17 * irq_bucket. The map is sufficient large to hold
18 * the sun4d hw identifiers.
20 extern struct irq_bucket *irq_map[SUN4D_MAX_IRQ];
23 /* sun4m specific type definitions */
25 /* This maps direct to CPU specific interrupt registers */
26 struct sun4m_irq_percpu {
32 /* This maps direct to global interrupt registers */
33 struct sun4m_irq_global {
41 extern struct sun4m_irq_percpu __iomem *sun4m_irq_percpu[SUN4M_NCPUS];
42 extern struct sun4m_irq_global __iomem *sun4m_irq_global;
45 * Platform specific irq configuration
46 * The individual platforms assign their platform
47 * specifics in their init functions.
49 struct sparc_irq_config {
50 void (*init_timers)(irq_handler_t);
51 unsigned int (*build_device_irq)(struct platform_device *op,
52 unsigned int real_irq);
54 extern struct sparc_irq_config sparc_irq_config;
56 unsigned int irq_alloc(unsigned int real_irq, unsigned int pil);
57 void irq_link(unsigned int irq);
58 void irq_unlink(unsigned int irq);
59 void handler_irq(unsigned int pil, struct pt_regs *regs);
61 /* Dave Redman (djhr@tadpole.co.uk)
62 * changed these to function pointers.. it saves cycles and will allow
63 * the irq dependencies to be split into different files at a later date
64 * sun4c_irq.c, sun4m_irq.c etc so we could reduce the kernel size.
65 * Jakub Jelinek (jj@sunsite.mff.cuni.cz)
66 * Changed these to btfixup entities... It saves cycles :)
69 BTFIXUPDEF_CALL(void, clear_clock_irq, void)
70 BTFIXUPDEF_CALL(void, load_profile_irq, int, unsigned int)
72 static inline void clear_clock_irq(void)
74 BTFIXUP_CALL(clear_clock_irq)();
77 static inline void load_profile_irq(int cpu, int limit)
79 BTFIXUP_CALL(load_profile_irq)(cpu, limit);
83 BTFIXUPDEF_CALL(void, set_cpu_int, int, int)
84 BTFIXUPDEF_CALL(void, clear_cpu_int, int, int)
85 BTFIXUPDEF_CALL(void, set_irq_udt, int)
87 #define set_cpu_int(cpu,level) BTFIXUP_CALL(set_cpu_int)(cpu,level)
88 #define clear_cpu_int(cpu,level) BTFIXUP_CALL(clear_cpu_int)(cpu,level)
89 #define set_irq_udt(cpu) BTFIXUP_CALL(set_irq_udt)(cpu)
91 /* All SUN4D IPIs are sent on this IRQ, may be shared with hard IRQs */
92 #define SUN4D_IPI_IRQ 13
94 extern void sun4d_ipi_interrupt(void);