at91: kernel v5.15: copy config and patches from 5.10
[openwrt/openwrt.git] / target / linux / at91 / patches-5.15 / 211-ARM-at91-pm-wait-for-ddr-power-mode-off.patch
1 From 2b522a22243938dd7613e09c954172b1fa6217f5 Mon Sep 17 00:00:00 2001
2 From: Claudiu Beznea <claudiu.beznea@microchip.com>
3 Date: Thu, 15 Apr 2021 13:50:01 +0300
4 Subject: [PATCH 211/247] ARM: at91: pm: wait for ddr power mode off
5
6 Wait for DDR power mode off before shutting down the core.
7
8 Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
9 Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
10 Link: https://lore.kernel.org/r/20210415105010.569620-16-claudiu.beznea@microchip.com
11 ---
12 arch/arm/mach-at91/pm_suspend.S | 5 +++++
13 1 file changed, 5 insertions(+)
14
15 --- a/arch/arm/mach-at91/pm_suspend.S
16 +++ b/arch/arm/mach-at91/pm_suspend.S
17 @@ -980,6 +980,11 @@ ulp_exit:
18 mov tmp1, #0x1
19 str tmp1, [r0, #0x10]
20
21 + /* Wait for it. */
22 +1: ldr tmp1, [r0, #0x10]
23 + tst tmp1, #0x1
24 + beq 1b
25 +
26 /* Shutdown */
27 ldr r0, .shdwc
28 mov tmp1, #0xA5000000