Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef __ASM_SH_HW_IRQ_H |
| 2 | #define __ASM_SH_HW_IRQ_H |
| 3 | |
Paul Mundt | 35f3c51 | 2006-10-06 15:31:16 +0900 | [diff] [blame] | 4 | #include <asm/atomic.h> |
| 5 | |
| 6 | extern atomic_t irq_err_count; |
| 7 | |
Magnus Damm | d619500 | 2007-06-15 10:41:54 +0900 | [diff] [blame] | 8 | struct 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 | |
| 15 | struct 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 | |
| 24 | void register_intc2_controller(struct intc2_desc *); |
| 25 | void init_IRQ_intc2(void); |
| 26 | |
Magnus Damm | 68abdbb | 2007-06-15 18:56:19 +0900 | [diff] [blame^] | 27 | struct 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 | |
| 34 | struct 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 | |
| 42 | void register_ipr_controller(struct ipr_desc *); |
| 43 | void init_IRQ_ipr(void); |
| 44 | |
| 45 | /* |
| 46 | * Enable individual interrupt mode for external IPR IRQs. |
| 47 | */ |
| 48 | void ipr_irq_enable_irlm(void); |
| 49 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | #endif /* __ASM_SH_HW_IRQ_H */ |