diff options
author | Claudiu Beznea <claudiu.beznea@microchip.com> | 2021-04-15 13:50:06 +0300 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@microchip.com> | 2021-07-19 15:32:12 +0300 |
commit | f205adb60898ed72c3aa5aedac22f74a1d293734 (patch) | |
tree | ecd8f0d796cfdd34b9035bd9b3aae0ebf2a14bfb /arch/arm/mach-at91/pm_suspend.S | |
parent | d2d4716d83840f279c979053fc0d0f966153b601 (diff) | |
download | linux-f205adb60898ed72c3aa5aedac22f74a1d293734.tar.xz |
ARM: at91: pm: add backup mode support for SAMA7G5
Adapt at91_pm_backup_init() to work for SAMA7G5. Also, set the LPM pin
to shutdown controller. This will signal to PMIC that it needs to switch
to the state corresponding to backup mode.
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Link: https://lore.kernel.org/r/20210415105010.569620-21-claudiu.beznea@microchip.com
Diffstat (limited to 'arch/arm/mach-at91/pm_suspend.S')
-rw-r--r-- | arch/arm/mach-at91/pm_suspend.S | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/pm_suspend.S b/arch/arm/mach-at91/pm_suspend.S index 7396e18dd7e5..cbd61a3bcab1 100644 --- a/arch/arm/mach-at91/pm_suspend.S +++ b/arch/arm/mach-at91/pm_suspend.S @@ -106,6 +106,12 @@ lp_done_\ena: #endif .endm + .macro at91_backup_set_lpm reg +#ifdef CONFIG_SOC_SAMA7 + orr \reg, \reg, #0x200000 +#endif + .endm + .text .arm @@ -989,6 +995,7 @@ ulp_exit: ldr r0, .shdwc mov tmp1, #0xA5000000 add tmp1, tmp1, #0x1 + at91_backup_set_lpm tmp1 str tmp1, [r0, #0] .endm |