blob: 4ca3f765bacc11ecf3070a3b8b0770408dd9284c [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __ASM_SH_HW_IRQ_H
2#define __ASM_SH_HW_IRQ_H
3
Paul Mundt35f3c512006-10-06 15:31:16 +09004#include <asm/atomic.h>
5
6extern atomic_t irq_err_count;
7
Magnus Dammd6195002007-06-15 10:41:54 +09008struct intc2_data {
9 unsigned short irq;
10 unsigned char ipr_offset, ipr_shift;
11 unsigned char msk_offset, msk_shift;
12 unsigned char priority;
13};
14
15struct intc2_desc {
16 unsigned long prio_base;
17 unsigned long msk_base;
18 unsigned long mskclr_base;
19 struct intc2_data *intc2_data;
20 unsigned int nr_irqs;
21 struct irq_chip chip;
22};
23
24void register_intc2_controller(struct intc2_desc *);
25void init_IRQ_intc2(void);
26
Magnus Damm68abdbb2007-06-15 18:56:19 +090027struct ipr_data {
28 unsigned char irq;
29 unsigned char ipr_idx; /* Index for the IPR registered */
30 unsigned char shift; /* Number of bits to shift the data */
31 unsigned char priority; /* The priority */
32};
33
34struct ipr_desc {
35 unsigned long *ipr_offsets;
36 unsigned int nr_offsets;
37 struct ipr_data *ipr_data;
38 unsigned int nr_irqs;
39 struct irq_chip chip;
40};
41
42void register_ipr_controller(struct ipr_desc *);
43void init_IRQ_ipr(void);
44
45/*
46 * Enable individual interrupt mode for external IPR IRQs.
47 */
48void ipr_irq_enable_irlm(void);
49
Linus Torvalds1da177e2005-04-16 15:20:36 -070050#endif /* __ASM_SH_HW_IRQ_H */