From: Alexandre Belloni Date: Wed, 26 Apr 2017 14:34:24 +0000 (+0200) Subject: ARM: at91: pm: fallback to slowclock when backup mode fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=287322386d303891e9cdc81313137054da9d5467;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Wenyou Yang --- 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 {