Skip to content

Commit bba00e5

Browse files
jhovoldtorvalds
authored andcommitted
rtc-at91rm9200: use shadow IMR on at91sam9x5
Add support for the at91sam9x5-family which must use the shadow interrupt mask due to a hardware issue (causing RTC_IMR to always be zero). Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Douglas Gilbert <dgilbert@interlog.com> Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Ludovic Desroches <ludovic.desroches@atmel.com> Cc: Robert Nelson <Robert.Nelson@digikey.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent e9f08bb commit bba00e5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Atmel AT91RM9200 Real Time Clock
22

33
Required properties:
4-
- compatible: should be: "atmel,at91rm9200-rtc"
4+
- compatible: should be: "atmel,at91rm9200-rtc" or "atmel,at91sam9x5-rtc"
55
- reg: physical base address of the controller and length of memory mapped
66
region.
77
- interrupts: rtc alarm/event interrupt

drivers/rtc/rtc-at91rm9200.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,18 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *dev_id)
309309
static const struct at91_rtc_config at91rm9200_config = {
310310
};
311311

312+
static const struct at91_rtc_config at91sam9x5_config = {
313+
.use_shadow_imr= true,
314+
};
315+
312316
#ifdef CONFIG_OF
313317
static const struct of_device_id at91_rtc_dt_ids[] = {
314318
{
315319
.compatible = "atmel,at91rm9200-rtc",
316320
.data = &at91rm9200_config,
321+
}, {
322+
.compatible = "atmel,at91sam9x5-rtc",
323+
.data = &at91sam9x5_config,
317324
}, {
318325
/* sentinel */
319326
}

0 commit comments

Comments
 (0)