diff options
author | Ludovic Barre <ludovic.barre@st.com> | 2017-11-06 12:03:34 -0500 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2017-11-07 06:44:28 -0500 |
commit | 539c603e147c1566f90623d863fa0d64ecb6c89d (patch) | |
tree | 6b74061f00d12e0e0334c8e9501ed6a546dcc3b5 | |
parent | ce0b7e39c5a0c65bdce6fc36bba2991ea8f915b7 (diff) |
irqchip/stm32: Add stm32h7 support
stm32h7 has up to 96 inputs
(3 banks of 32 inputs max).
Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
-rw-r--r-- | drivers/irqchip/irq-stm32-exti.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c index ef378709baea..8f409a95918f 100644 --- a/drivers/irqchip/irq-stm32-exti.c +++ b/drivers/irqchip/irq-stm32-exti.c | |||
@@ -38,6 +38,39 @@ static const struct stm32_exti_bank *stm32f4xx_exti_banks[] = { | |||
38 | &stm32f4xx_exti_b1, | 38 | &stm32f4xx_exti_b1, |
39 | }; | 39 | }; |
40 | 40 | ||
41 | static const struct stm32_exti_bank stm32h7xx_exti_b1 = { | ||
42 | .imr_ofst = 0x80, | ||
43 | .emr_ofst = 0x84, | ||
44 | .rtsr_ofst = 0x00, | ||
45 | .ftsr_ofst = 0x04, | ||
46 | .swier_ofst = 0x08, | ||
47 | .pr_ofst = 0x88, | ||
48 | }; | ||
49 | |||
50 | static const struct stm32_exti_bank stm32h7xx_exti_b2 = { | ||
51 | .imr_ofst = 0x90, | ||
52 | .emr_ofst = 0x94, | ||
53 | .rtsr_ofst = 0x20, | ||
54 | .ftsr_ofst = 0x24, | ||
55 | .swier_ofst = 0x28, | ||
56 | .pr_ofst = 0x98, | ||
57 | }; | ||
58 | |||
59 | static const struct stm32_exti_bank stm32h7xx_exti_b3 = { | ||
60 | .imr_ofst = 0xA0, | ||
61 | .emr_ofst = 0xA4, | ||
62 | .rtsr_ofst = 0x40, | ||
63 | .ftsr_ofst = 0x44, | ||
64 | .swier_ofst = 0x48, | ||
65 | .pr_ofst = 0xA8, | ||
66 | }; | ||
67 | |||
68 | static const struct stm32_exti_bank *stm32h7xx_exti_banks[] = { | ||
69 | &stm32h7xx_exti_b1, | ||
70 | &stm32h7xx_exti_b2, | ||
71 | &stm32h7xx_exti_b3, | ||
72 | }; | ||
73 | |||
41 | static unsigned long stm32_exti_pending(struct irq_chip_generic *gc) | 74 | static unsigned long stm32_exti_pending(struct irq_chip_generic *gc) |
42 | { | 75 | { |
43 | const struct stm32_exti_bank *stm32_bank = gc->private; | 76 | const struct stm32_exti_bank *stm32_bank = gc->private; |
@@ -256,3 +289,12 @@ static int __init stm32f4_exti_of_init(struct device_node *np, | |||
256 | } | 289 | } |
257 | 290 | ||
258 | IRQCHIP_DECLARE(stm32f4_exti, "st,stm32-exti", stm32f4_exti_of_init); | 291 | IRQCHIP_DECLARE(stm32f4_exti, "st,stm32-exti", stm32f4_exti_of_init); |
292 | |||
293 | static int __init stm32h7_exti_of_init(struct device_node *np, | ||
294 | struct device_node *parent) | ||
295 | { | ||
296 | return stm32_exti_init(stm32h7xx_exti_banks, | ||
297 | ARRAY_SIZE(stm32h7xx_exti_banks), np); | ||
298 | } | ||
299 | |||
300 | IRQCHIP_DECLARE(stm32h7_exti, "st,stm32h7-exti", stm32h7_exti_of_init); | ||