• Johan Hovold's avatar
    rtc-at91rm9200: add shadow interrupt mask · e9f08bbe
    Johan Hovold authored
    Add shadow interrupt-mask register which can be used on SoCs where the
    actual hardware register is broken.
    
    Note that some care needs to be taken to make sure the shadow mask
    corresponds to the actual hardware state.  The added overhead is not an
    issue for the non-broken SoCs due to the relatively infrequent
    interrupt-mask updates.  We do, however, only use the shadow mask value
    as a fall-back when it actually needed as there is still a theoretical
    possibility that the mask is incorrect (see the code for details).
    Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
    Acked-by: default avatarNicolas 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: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    e9f08bbe
rtc-at91rm9200.c 12.3 KB