Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28732238 authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

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: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: default avatarWenyou Yang <wenyou.yang@atmel.com>
parent 7693e18e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -544,6 +544,11 @@ static void __init at91_pm_backup_init(void)
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 {