diff options
-rw-r--r-- | arch/sh/boards/mach-cayman/irq.c | 16 | ||||
-rw-r--r-- | arch/sh/kernel/cpu/irq/intc-sh5.c | 49 |
2 files changed, 15 insertions, 50 deletions
diff --git a/arch/sh/boards/mach-cayman/irq.c b/arch/sh/boards/mach-cayman/irq.c index 1394b078db36..d7ac5af9d102 100644 --- a/arch/sh/boards/mach-cayman/irq.c +++ b/arch/sh/boards/mach-cayman/irq.c | |||
@@ -55,8 +55,9 @@ static struct irqaction cayman_action_pci2 = { | |||
55 | .flags = IRQF_DISABLED, | 55 | .flags = IRQF_DISABLED, |
56 | }; | 56 | }; |
57 | 57 | ||
58 | static void enable_cayman_irq(unsigned int irq) | 58 | static void enable_cayman_irq(struct irq_data *data) |
59 | { | 59 | { |
60 | unsigned int irq = data->irq; | ||
60 | unsigned long flags; | 61 | unsigned long flags; |
61 | unsigned long mask; | 62 | unsigned long mask; |
62 | unsigned int reg; | 63 | unsigned int reg; |
@@ -72,8 +73,9 @@ static void enable_cayman_irq(unsigned int irq) | |||
72 | local_irq_restore(flags); | 73 | local_irq_restore(flags); |
73 | } | 74 | } |
74 | 75 | ||
75 | void disable_cayman_irq(unsigned int irq) | 76 | static void disable_cayman_irq(struct irq_data *data) |
76 | { | 77 | { |
78 | unsigned int irq = data->irq; | ||
77 | unsigned long flags; | 79 | unsigned long flags; |
78 | unsigned long mask; | 80 | unsigned long mask; |
79 | unsigned int reg; | 81 | unsigned int reg; |
@@ -89,16 +91,10 @@ void disable_cayman_irq(unsigned int irq) | |||
89 | local_irq_restore(flags); | 91 | local_irq_restore(flags); |
90 | } | 92 | } |
91 | 93 | ||
92 | static void ack_cayman_irq(unsigned int irq) | ||
93 | { | ||
94 | disable_cayman_irq(irq); | ||
95 | } | ||
96 | |||
97 | struct irq_chip cayman_irq_type = { | 94 | struct irq_chip cayman_irq_type = { |
98 | .name = "Cayman-IRQ", | 95 | .name = "Cayman-IRQ", |
99 | .unmask = enable_cayman_irq, | 96 | .irq_unmask = enable_cayman_irq, |
100 | .mask = disable_cayman_irq, | 97 | .irq_mask = disable_cayman_irq, |
101 | .mask_ack = ack_cayman_irq, | ||
102 | }; | 98 | }; |
103 | 99 | ||
104 | int cayman_irq_demux(int evt) | 100 | int cayman_irq_demux(int evt) |
diff --git a/arch/sh/kernel/cpu/irq/intc-sh5.c b/arch/sh/kernel/cpu/irq/intc-sh5.c index 96a239583948..5af48f8357e5 100644 --- a/arch/sh/kernel/cpu/irq/intc-sh5.c +++ b/arch/sh/kernel/cpu/irq/intc-sh5.c | |||
@@ -76,39 +76,11 @@ int intc_evt_to_irq[(0xE20/0x20)+1] = { | |||
76 | }; | 76 | }; |
77 | 77 | ||
78 | static unsigned long intc_virt; | 78 | static unsigned long intc_virt; |
79 | |||
80 | static unsigned int startup_intc_irq(unsigned int irq); | ||
81 | static void shutdown_intc_irq(unsigned int irq); | ||
82 | static void enable_intc_irq(unsigned int irq); | ||
83 | static void disable_intc_irq(unsigned int irq); | ||
84 | static void mask_and_ack_intc(unsigned int); | ||
85 | static void end_intc_irq(unsigned int irq); | ||
86 | |||
87 | static struct irq_chip intc_irq_type = { | ||
88 | .name = "INTC", | ||
89 | .startup = startup_intc_irq, | ||
90 | .shutdown = shutdown_intc_irq, | ||
91 | .enable = enable_intc_irq, | ||
92 | .disable = disable_intc_irq, | ||
93 | .ack = mask_and_ack_intc, | ||
94 | .end = end_intc_irq | ||
95 | }; | ||
96 | |||
97 | static int irlm; /* IRL mode */ | 79 | static int irlm; /* IRL mode */ |
98 | 80 | ||
99 | static unsigned int startup_intc_irq(unsigned int irq) | 81 | static void enable_intc_irq(struct irq_data *data) |
100 | { | ||
101 | enable_intc_irq(irq); | ||
102 | return 0; /* never anything pending */ | ||
103 | } | ||
104 | |||
105 | static void shutdown_intc_irq(unsigned int irq) | ||
106 | { | ||
107 | disable_intc_irq(irq); | ||
108 | } | ||
109 | |||
110 | static void enable_intc_irq(unsigned int irq) | ||
111 | { | 82 | { |
83 | unsigned int irq = data->irq; | ||
112 | unsigned long reg; | 84 | unsigned long reg; |
113 | unsigned long bitmask; | 85 | unsigned long bitmask; |
114 | 86 | ||
@@ -126,8 +98,9 @@ static void enable_intc_irq(unsigned int irq) | |||
126 | __raw_writel(bitmask, reg); | 98 | __raw_writel(bitmask, reg); |
127 | } | 99 | } |
128 | 100 | ||
129 | static void disable_intc_irq(unsigned int irq) | 101 | static void disable_intc_irq(struct irq_data *data) |
130 | { | 102 | { |
103 | unsigned int irq = data->irq; | ||
131 | unsigned long reg; | 104 | unsigned long reg; |
132 | unsigned long bitmask; | 105 | unsigned long bitmask; |
133 | 106 | ||
@@ -142,15 +115,11 @@ static void disable_intc_irq(unsigned int irq) | |||
142 | __raw_writel(bitmask, reg); | 115 | __raw_writel(bitmask, reg); |
143 | } | 116 | } |
144 | 117 | ||
145 | static void mask_and_ack_intc(unsigned int irq) | 118 | static struct irq_chip intc_irq_type = { |
146 | { | 119 | .name = "INTC", |
147 | disable_intc_irq(irq); | 120 | .irq_enable = enable_intc_irq, |
148 | } | 121 | .irq_disable = disable_intc_irq, |
149 | 122 | }; | |
150 | static void end_intc_irq(unsigned int irq) | ||
151 | { | ||
152 | enable_intc_irq(irq); | ||
153 | } | ||
154 | 123 | ||
155 | void __init plat_irq_setup(void) | 124 | void __init plat_irq_setup(void) |
156 | { | 125 | { |