power: reset: at91-poweroff: fix wakeup status register index
authorNicolas Ferre <nicolas.ferre@atmel.com>
Mon, 1 Sep 2014 14:11:19 +0000 (16:11 +0200)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Mon, 1 Sep 2014 16:40:44 +0000 (18:40 +0200)
The wakeup status is read from Shutdown Status Register and not the
SHDW_CR which is the one at address 0.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
drivers/power/reset/at91-poweroff.c

index 40bf42d146f17648724a002c54219b69a411bd4d..c61000333bb94320eb9476446a2604beca3c50a8 100644 (file)
@@ -51,7 +51,7 @@ static void __iomem *at91_shdwc_base;
 
 static void __init at91_wakeup_status(void)
 {
-       u32 reg = readl(at91_shdwc_base);
+       u32 reg = readl(at91_shdwc_base + AT91_SHDW_SR);
        char *reason = "unknown";
 
        /* Simple power-on, just bail out */