Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1639048
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 3/3] ARM: at91: pm: fallback to slowclock when backup mode fails |
| Date | 2017-05-10 21:20 +0200 |
| Message-ID | <tFFjs-4By-17@gated-at.bofh.it> (permalink) |
| References | <tFFjs-4By-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
arch/arm/mach-at91/pm.c | 5 +++++
1 file changed, 5 insertions(+)
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 @@ 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 {
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 1/3] ARM: at91: pm: Add sama5d2 backup mode Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-10 21:20 +0200 [PATCH v2 3/3] ARM: at91: pm: fallback to slowclock when backup mode fails Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-05-10 21:20 +0200
csiph-web