summaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91/pm.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-04-26 16:34:24 +0200
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-05-15 11:55:33 +0200
commit287322386d303891e9cdc81313137054da9d5467 (patch)
tree3d2420f417f5707c91b6fb3907fe04c1ea37bffa /arch/arm/mach-at91/pm.c
parent7693e18e8c2e2f3188f69bd572ff77dac481da6e (diff)
ARM: at91: pm: fallback to slowclock when backup mode fails
If the backup sram allocation fails, ensure we can suspend by falling back to the usual slow clock mode. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Wenyou Yang <wenyou.yang@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/pm.c')
-rw-r--r--arch/arm/mach-at91/pm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index ef9c1d29cc67..fc4026478579 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -544,6 +544,11 @@ sfrbu_fail:
securam_fail:
iounmap(pm_data.sfrbu);
pm_data.sfrbu = NULL;
+
+ if (pm_data.standby_mode == AT91_PM_BACKUP)
+ pm_data.standby_mode = AT91_PM_SLOW_CLOCK;
+ if (pm_data.suspend_mode == AT91_PM_BACKUP)
+ pm_data.suspend_mode = AT91_PM_SLOW_CLOCK;
}
struct pmc_info {