aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/irqchip
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-atmel-aic-common.c28
-rw-r--r--drivers/irqchip/irq-atmel-aic-common.h2
2 files changed, 30 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-atmel-aic-common.c b/drivers/irqchip/irq-atmel-aic-common.c
index 4705bdbc6e7b..6ae3cdee0681 100644
--- a/drivers/irqchip/irq-atmel-aic-common.c
+++ b/drivers/irqchip/irq-atmel-aic-common.c
@@ -139,6 +139,34 @@ static void __init aic_common_ext_irq_of_init(struct irq_domain *domain)
139 } 139 }
140} 140}
141 141
142#define AT91_RTC_IDR 0x24
143#define AT91_RTC_IMR 0x28
144#define AT91_RTC_IRQ_MASK 0x1f
145
146void __init aic_common_rtc_irq_fixup(struct device_node *root)
147{
148 struct device_node *np;
149 void __iomem *regs;
150
151 np = of_find_compatible_node(root, NULL, "atmel,at91rm9200-rtc");
152 if (!np)
153 np = of_find_compatible_node(root, NULL,
154 "atmel,at91sam9x5-rtc");
155
156 if (!np)
157 return;
158
159 regs = of_iomap(np, 0);
160 of_node_put(np);
161
162 if (!regs)
163 return;
164
165 writel(AT91_RTC_IRQ_MASK, regs + AT91_RTC_IDR);
166
167 iounmap(regs);
168}
169
142void __init aic_common_irq_fixup(const struct of_device_id *matches) 170void __init aic_common_irq_fixup(const struct of_device_id *matches)
143{ 171{
144 struct device_node *root = of_find_node_by_path("/"); 172 struct device_node *root = of_find_node_by_path("/");
diff --git a/drivers/irqchip/irq-atmel-aic-common.h b/drivers/irqchip/irq-atmel-aic-common.h
index aa0a42c36a7f..90aa00e918d6 100644
--- a/drivers/irqchip/irq-atmel-aic-common.h
+++ b/drivers/irqchip/irq-atmel-aic-common.h
@@ -32,6 +32,8 @@ struct irq_domain *__init aic_common_of_init(struct device_node *node,
32 const struct irq_domain_ops *ops, 32 const struct irq_domain_ops *ops,
33 const char *name, int nirqs); 33 const char *name, int nirqs);
34 34
35void __init aic_common_rtc_irq_fixup(struct device_node *root);
36
35void __init aic_common_irq_fixup(const struct of_device_id *matches); 37void __init aic_common_irq_fixup(const struct of_device_id *matches);
36 38
37#endif /* __IRQ_ATMEL_AIC_COMMON_H */ 39#endif /* __IRQ_ATMEL_AIC_COMMON_H */