diff options
Diffstat (limited to 'include/linux/sh_intc.h')
-rw-r--r-- | include/linux/sh_intc.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index 51d288d8ac8..0d6cd38e673 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __SH_INTC_H | 1 | #ifndef __SH_INTC_H |
2 | #define __SH_INTC_H | 2 | #define __SH_INTC_H |
3 | 3 | ||
4 | #include <linux/ioport.h> | ||
5 | |||
4 | typedef unsigned char intc_enum; | 6 | typedef unsigned char intc_enum; |
5 | 7 | ||
6 | struct intc_vect { | 8 | struct intc_vect { |
@@ -21,6 +23,9 @@ struct intc_group { | |||
21 | struct intc_mask_reg { | 23 | struct intc_mask_reg { |
22 | unsigned long set_reg, clr_reg, reg_width; | 24 | unsigned long set_reg, clr_reg, reg_width; |
23 | intc_enum enum_ids[32]; | 25 | intc_enum enum_ids[32]; |
26 | #ifdef CONFIG_INTC_BALANCING | ||
27 | unsigned long dist_reg; | ||
28 | #endif | ||
24 | #ifdef CONFIG_SMP | 29 | #ifdef CONFIG_SMP |
25 | unsigned long smp; | 30 | unsigned long smp; |
26 | #endif | 31 | #endif |
@@ -39,8 +44,14 @@ struct intc_sense_reg { | |||
39 | intc_enum enum_ids[16]; | 44 | intc_enum enum_ids[16]; |
40 | }; | 45 | }; |
41 | 46 | ||
47 | #ifdef CONFIG_INTC_BALANCING | ||
48 | #define INTC_SMP_BALANCING(reg) .dist_reg = (reg) | ||
49 | #else | ||
50 | #define INTC_SMP_BALANCING(reg) | ||
51 | #endif | ||
52 | |||
42 | #ifdef CONFIG_SMP | 53 | #ifdef CONFIG_SMP |
43 | #define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8) | 54 | #define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8) |
44 | #else | 55 | #else |
45 | #define INTC_SMP(stride, nr) | 56 | #define INTC_SMP(stride, nr) |
46 | #endif | 57 | #endif |
@@ -71,6 +82,8 @@ struct intc_hw_desc { | |||
71 | 82 | ||
72 | struct intc_desc { | 83 | struct intc_desc { |
73 | char *name; | 84 | char *name; |
85 | struct resource *resource; | ||
86 | unsigned int num_resources; | ||
74 | intc_enum force_enable; | 87 | intc_enum force_enable; |
75 | intc_enum force_disable; | 88 | intc_enum force_disable; |
76 | struct intc_hw_desc hw; | 89 | struct intc_hw_desc hw; |
@@ -92,9 +105,18 @@ struct intc_desc symbol __initdata = { \ | |||
92 | prio_regs, sense_regs, ack_regs), \ | 105 | prio_regs, sense_regs, ack_regs), \ |
93 | } | 106 | } |
94 | 107 | ||
95 | void __init register_intc_controller(struct intc_desc *desc); | 108 | int __init register_intc_controller(struct intc_desc *desc); |
96 | int intc_set_priority(unsigned int irq, unsigned int prio); | 109 | int intc_set_priority(unsigned int irq, unsigned int prio); |
97 | 110 | ||
111 | #ifdef CONFIG_INTC_USERIMASK | ||
112 | int register_intc_userimask(unsigned long addr); | ||
113 | #else | ||
114 | static inline int register_intc_userimask(unsigned long addr) | ||
115 | { | ||
116 | return 0; | ||
117 | } | ||
118 | #endif | ||
119 | |||
98 | int reserve_irq_vector(unsigned int irq); | 120 | int reserve_irq_vector(unsigned int irq); |
99 | void reserve_irq_legacy(void); | 121 | void reserve_irq_legacy(void); |
100 | 122 | ||