a313ab029a8adf8261d91f76717d8588b0ccda82
[openwrt/openwrt.git] / target / linux / at91 / patches-5.15 / 202-ARM-at91-pm-use-r7-instead-of-tmp1.patch
1 From 8a7a4cf3860910e460e2c3ca467b1dabf7ce9827 Mon Sep 17 00:00:00 2001
2 From: Claudiu Beznea <claudiu.beznea@microchip.com>
3 Date: Thu, 15 Apr 2021 13:49:52 +0300
4 Subject: [PATCH 202/247] ARM: at91: pm: use r7 instead of tmp1
5
6 Use r7 instead of tmp1 in macros. This prepares the filed for
7 next commits.
8
9 Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
10 Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
11 Link: https://lore.kernel.org/r/20210415105010.569620-7-claudiu.beznea@microchip.com
12 ---
13 arch/arm/mach-at91/pm_suspend.S | 18 ++++++++++++------
14 1 file changed, 12 insertions(+), 6 deletions(-)
15
16 --- a/arch/arm/mach-at91/pm_suspend.S
17 +++ b/arch/arm/mach-at91/pm_suspend.S
18 @@ -31,30 +31,36 @@ tmp3 .req r6
19
20 /*
21 * Wait until master oscillator has stabilized.
22 + *
23 + * Side effects: overwrites r7
24 */
25 .macro wait_moscrdy
26 -1: ldr tmp1, [pmc, #AT91_PMC_SR]
27 - tst tmp1, #AT91_PMC_MOSCS
28 +1: ldr r7, [pmc, #AT91_PMC_SR]
29 + tst r7, #AT91_PMC_MOSCS
30 beq 1b
31 .endm
32
33 /*
34 * Wait for main oscillator selection is done
35 + *
36 + * Side effects: overwrites r7
37 */
38 .macro wait_moscsels
39 -1: ldr tmp1, [pmc, #AT91_PMC_SR]
40 - tst tmp1, #AT91_PMC_MOSCSELS
41 +1: ldr r7, [pmc, #AT91_PMC_SR]
42 + tst r7, #AT91_PMC_MOSCSELS
43 beq 1b
44 .endm
45
46 /*
47 * Put the processor to enter the idle state
48 + *
49 + * Side effects: overwrites r7
50 */
51 .macro at91_cpu_idle
52
53 #if defined(CONFIG_CPU_V7)
54 - mov tmp1, #AT91_PMC_PCK
55 - str tmp1, [pmc, #AT91_PMC_SCDR]
56 + mov r7, #AT91_PMC_PCK
57 + str r7, [pmc, #AT91_PMC_SCDR]
58
59 dsb
60