Skip to content

Commit ff78716

Browse files
Radoslaw PietrzykMarc Zyngier
authored andcommitted
irqchip/stm32: Optimizes and cleans up stm32-exti irq_domain
- In stm32_exti_alloc function, discards irq_domain_set_info with handle_simple_irq. This overwrite the setting defined while init of generic chips. Exti controller manages edge irq type. - Removes acking in chained irq handler as this is done by irq_chip itself inside handle_edge_irq - removes unneeded irq_domain_ops.xlate callback Acked-by: Ludovic Barre <ludovic.barre@st.com> Tested-by: Ludovic Barre <ludovic.barre@st.com> Signed-off-by: Radoslaw Pietrzyk <radoslaw.pietrzyk@gmail.com> Signed-off-by: Ludovic Barre <ludovic.barre@st.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
1 parent 868c4e0 commit ff78716

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

drivers/irqchip/irq-stm32-exti.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,6 @@ static unsigned long stm32_exti_pending(struct irq_chip_generic *gc)
7979
return irq_reg_readl(gc, stm32_bank->pr_ofst);
8080
}
8181

82-
static void stm32_exti_irq_ack(struct irq_chip_generic *gc, u32 mask)
83-
{
84-
const struct stm32_exti_bank *stm32_bank = gc->private;
85-
86-
irq_reg_writel(gc, mask, stm32_bank->pr_ofst);
87-
}
88-
8982
static void stm32_irq_handler(struct irq_desc *desc)
9083
{
9184
struct irq_domain *domain = irq_desc_get_handler_data(desc);
@@ -106,7 +99,6 @@ static void stm32_irq_handler(struct irq_desc *desc)
10699
for_each_set_bit(n, &pending, IRQS_PER_BANK) {
107100
virq = irq_find_mapping(domain, irq_base + n);
108101
generic_handle_irq(virq);
109-
stm32_exti_irq_ack(gc, BIT(n));
110102
}
111103
}
112104
}
@@ -176,16 +168,12 @@ static int stm32_irq_set_wake(struct irq_data *data, unsigned int on)
176168
static int stm32_exti_alloc(struct irq_domain *d, unsigned int virq,
177169
unsigned int nr_irqs, void *data)
178170
{
179-
struct irq_chip_generic *gc;
180171
struct irq_fwspec *fwspec = data;
181172
irq_hw_number_t hwirq;
182173

183174
hwirq = fwspec->param[0];
184-
gc = irq_get_domain_generic_chip(d, hwirq);
185175

186176
irq_map_generic_chip(d, virq, hwirq);
187-
irq_domain_set_info(d, virq, hwirq, &gc->chip_types->chip, gc,
188-
handle_simple_irq, NULL, NULL);
189177

190178
return 0;
191179
}
@@ -200,7 +188,6 @@ static void stm32_exti_free(struct irq_domain *d, unsigned int virq,
200188

201189
struct irq_domain_ops irq_exti_domain_ops = {
202190
.map = irq_map_generic_chip,
203-
.xlate = irq_domain_xlate_onetwocell,
204191
.alloc = stm32_exti_alloc,
205192
.free = stm32_exti_free,
206193
};

0 commit comments

Comments
 (0)