Skip to content

Commit

Permalink
power: reset: at91-reset: use r4 as tmp argument
Browse files Browse the repository at this point in the history
Use r4 as temporary register. On ARM r0-r3 should be used to hold
function arguments.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
  • Loading branch information
claudiubeznea authored and sre committed Mar 8, 2020
1 parent 25b80b7 commit 7cb290d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/power/reset/at91-reset.c
Expand Up @@ -113,8 +113,8 @@ static int at91sam9g45_restart(struct notifier_block *this, unsigned long mode,
"beq 1f\n\t"

/* Then, test that the RAM controller is enabled */
"ldr r0, [%1]\n\t"
"cmp r0, #0\n\t"
"ldr r4, [%1]\n\t"
"cmp r4, #0\n\t"

/* Align to cache lines */
".balign 32\n\t"
Expand All @@ -138,7 +138,7 @@ static int at91sam9g45_restart(struct notifier_block *this, unsigned long mode,
"r" (1),
"r" cpu_to_le32(AT91_DDRSDRC_LPCB_POWER_DOWN),
"r" (reset->args)
: "r0");
: "r4");

return NOTIFY_DONE;
}
Expand Down

0 comments on commit 7cb290d

Please sign in to comment.