Skip to content

Commit 23b43c1

Browse files
ryan-wannerclaudiubeznea
authored andcommitted
ARM: at91: pm: Add Backup mode for SAMA7D65
Add config check that enables Backup mode for SAMA7D65 SoC. Add SHDWC_SR read to clear the status bits once finished exiting backup mode. This is only for SAMA7D65 SoCs. The SHDWC status register needs to be cleared after exiting backup mode to clear the wake up pin status. Signed-off-by: Ryan Wanner <Ryan.Wanner@microchip.com> Link: https://lore.kernel.org/r/3a1f59af1ac9322b0203694b535d5d13120a31eb.1740671156.git.Ryan.Wanner@microchip.com [claudiu.beznea: dropped extra blank lines, use {} for multi-line statements that includes comments, s/PM/pm in commit title to have the same pattern accross all commits] Signed-off-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
1 parent 8e96f50 commit 23b43c1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • arch/arm/mach-at91

arch/arm/mach-at91/pm.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,11 @@ static void at91_pm_suspend(suspend_state_t state)
647647
at91_suspend_sram_fn = fncpy(at91_suspend_sram_fn,
648648
&at91_pm_suspend_in_sram,
649649
at91_pm_suspend_in_sram_sz);
650+
651+
if (IS_ENABLED(CONFIG_SOC_SAMA7D65)) {
652+
/* SHDWC.SR */
653+
readl(soc_pm.data.shdwc + 0x08);
654+
}
650655
} else {
651656
at91_suspend_finish(0);
652657
}
@@ -1065,7 +1070,8 @@ static int __init at91_pm_backup_init(void)
10651070
int ret = -ENODEV, located = 0;
10661071

10671072
if (!IS_ENABLED(CONFIG_SOC_SAMA5D2) &&
1068-
!IS_ENABLED(CONFIG_SOC_SAMA7G5))
1073+
!IS_ENABLED(CONFIG_SOC_SAMA7G5) &&
1074+
!IS_ENABLED(CONFIG_SOC_SAMA7D65))
10691075
return -EPERM;
10701076

10711077
if (!at91_is_pm_mode_active(AT91_PM_BACKUP))

0 commit comments

Comments
 (0)