Skip to content

Commit

Permalink
ARM: at91: pm: fallback to slowclock when backup mode fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexandre Belloni committed May 15, 2017
1 parent 7693e18 commit 2873223
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/arm/mach-at91/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2873223

Please sign in to comment.