1 #include <linux/platform_device.h>
3 #include <asm/btfixup.h>
4 #include <asm/cpu_type.h>
7 struct irq_bucket
*next
;
13 #define SUN4M_HARD_INT(x) (0x000000001 << (x))
14 #define SUN4M_SOFT_INT(x) (0x000010000 << (x))
16 #define SUN4D_MAX_BOARD 10
17 #define SUN4D_MAX_IRQ ((SUN4D_MAX_BOARD + 2) << 5)
19 /* Map between the irq identifier used in hw to the
20 * irq_bucket. The map is sufficient large to hold
21 * the sun4d hw identifiers.
23 extern struct irq_bucket
*irq_map
[SUN4D_MAX_IRQ
];
26 /* sun4m specific type definitions */
28 /* This maps direct to CPU specific interrupt registers */
29 struct sun4m_irq_percpu
{
35 /* This maps direct to global interrupt registers */
36 struct sun4m_irq_global
{
44 extern struct sun4m_irq_percpu __iomem
*sun4m_irq_percpu
[SUN4M_NCPUS
];
45 extern struct sun4m_irq_global __iomem
*sun4m_irq_global
;
47 /* The following definitions describe the individual platform features: */
48 #define FEAT_L10_CLOCKSOURCE (1 << 0) /* L10 timer is used as a clocksource */
49 #define FEAT_L10_CLOCKEVENT (1 << 1) /* L10 timer is used as a clockevent */
50 #define FEAT_L14_ONESHOT (1 << 2) /* L14 timer clockevent can oneshot */
53 * Platform specific configuration
54 * The individual platforms assign their platform
55 * specifics in their init functions.
58 void (*init_timers
)(void);
59 unsigned int (*build_device_irq
)(struct platform_device
*op
,
60 unsigned int real_irq
);
62 /* generic clockevent features - see FEAT_* above */
65 /* clock rate used for clock event timer */
68 /* one period for clock source timer */
69 unsigned int cs_period
;
71 /* function to obtain offsett for cs period */
72 unsigned int (*get_cycles_offset
)(void);
74 extern struct sparc_config sparc_config
;
76 unsigned int irq_alloc(unsigned int real_irq
, unsigned int pil
);
77 void irq_link(unsigned int irq
);
78 void irq_unlink(unsigned int irq
);
79 void handler_irq(unsigned int pil
, struct pt_regs
*regs
);
81 /* Dave Redman (djhr@tadpole.co.uk)
82 * changed these to function pointers.. it saves cycles and will allow
83 * the irq dependencies to be split into different files at a later date
84 * sun4m_irq.c etc so we could reduce the kernel size.
85 * Jakub Jelinek (jj@sunsite.mff.cuni.cz)
86 * Changed these to btfixup entities... It saves cycles :)
89 BTFIXUPDEF_CALL(void, clear_clock_irq
, void)
90 BTFIXUPDEF_CALL(void, load_profile_irq
, int, unsigned int)
92 static inline void clear_clock_irq(void)
94 BTFIXUP_CALL(clear_clock_irq
)();
97 static inline void load_profile_irq(int cpu
, int limit
)
99 BTFIXUP_CALL(load_profile_irq
)(cpu
, limit
);
102 unsigned long leon_get_irqmask(unsigned int irq
);
106 /* All SUN4D IPIs are sent on this IRQ, may be shared with hard IRQs */
107 #define SUN4D_IPI_IRQ 13
109 extern void sun4d_ipi_interrupt(void);