1 #include <linux/platform_device.h>
3 #include <asm/cpu_type.h>
6 struct irq_bucket
*next
;
12 #define SUN4M_HARD_INT(x) (0x000000001 << (x))
13 #define SUN4M_SOFT_INT(x) (0x000010000 << (x))
15 #define SUN4D_MAX_BOARD 10
16 #define SUN4D_MAX_IRQ ((SUN4D_MAX_BOARD + 2) << 5)
18 /* Map between the irq identifier used in hw to the
19 * irq_bucket. The map is sufficient large to hold
20 * the sun4d hw identifiers.
22 extern struct irq_bucket
*irq_map
[SUN4D_MAX_IRQ
];
25 /* sun4m specific type definitions */
27 /* This maps direct to CPU specific interrupt registers */
28 struct sun4m_irq_percpu
{
34 /* This maps direct to global interrupt registers */
35 struct sun4m_irq_global
{
43 extern struct sun4m_irq_percpu __iomem
*sun4m_irq_percpu
[SUN4M_NCPUS
];
44 extern struct sun4m_irq_global __iomem
*sun4m_irq_global
;
46 /* The following definitions describe the individual platform features: */
47 #define FEAT_L10_CLOCKSOURCE (1 << 0) /* L10 timer is used as a clocksource */
48 #define FEAT_L10_CLOCKEVENT (1 << 1) /* L10 timer is used as a clockevent */
49 #define FEAT_L14_ONESHOT (1 << 2) /* L14 timer clockevent can oneshot */
52 * Platform specific configuration
53 * The individual platforms assign their platform
54 * specifics in their init functions.
57 void (*init_timers
)(void);
58 unsigned int (*build_device_irq
)(struct platform_device
*op
,
59 unsigned int real_irq
);
61 /* generic clockevent features - see FEAT_* above */
64 /* clock rate used for clock event timer */
67 /* one period for clock source timer */
68 unsigned int cs_period
;
70 /* function to obtain offsett for cs period */
71 unsigned int (*get_cycles_offset
)(void);
73 void (*clear_clock_irq
)(void);
74 void (*load_profile_irq
)(int cpu
, unsigned int limit
);
76 extern struct sparc_config sparc_config
;
78 unsigned int irq_alloc(unsigned int real_irq
, unsigned int pil
);
79 void irq_link(unsigned int irq
);
80 void irq_unlink(unsigned int irq
);
81 void handler_irq(unsigned int pil
, struct pt_regs
*regs
);
83 unsigned long leon_get_irqmask(unsigned int irq
);
87 /* All SUN4D IPIs are sent on this IRQ, may be shared with hard IRQs */
88 #define SUN4D_IPI_IRQ 13
90 extern void sun4d_ipi_interrupt(void);