]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
power/reset: at91: big endian fixes for atsama5d3x
authorBen Dooks <ben.dooks@codethink.co.uk>
Thu, 26 Mar 2015 14:16:22 +0000 (14:16 +0000)
committerSebastian Reichel <sre@kernel.org>
Thu, 26 Mar 2015 14:21:00 +0000 (15:21 +0100)
Fix the passing of big endian data to routines that will be writing
it to the bus in the wrong order.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/reset/at91-reset.c

index 68b18962f73a5f6cdcbb713bd2d6c56d8f957af9..01c7055c4200e3d9a7333ac7c0bcaccc3ac2d4a5 100644 (file)
@@ -73,8 +73,8 @@ static int at91sam9260_restart(struct notifier_block *this, unsigned long mode,
                : "r" (at91_ramc_base[0]),
                  "r" (at91_rstc_base),
                  "r" (1),
-                 "r" (AT91_SDRAMC_LPCB_POWER_DOWN),
-                 "r" (AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST));
+                 "r" cpu_to_le32(AT91_SDRAMC_LPCB_POWER_DOWN),
+                 "r" cpu_to_le32(AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST));
 
        return NOTIFY_DONE;
 }
@@ -116,8 +116,8 @@ static int at91sam9g45_restart(struct notifier_block *this, unsigned long mode,
                  "r" (at91_ramc_base[1]),
                  "r" (at91_rstc_base),
                  "r" (1),
-                 "r" (AT91_DDRSDRC_LPCB_POWER_DOWN),
-                 "r" (AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST)
+                 "r" cpu_to_le32(AT91_DDRSDRC_LPCB_POWER_DOWN),
+                 "r" cpu_to_le32(AT91_RSTC_KEY | AT91_RSTC_PERRST | AT91_RSTC_PROCRST)
                : "r0");
 
        return NOTIFY_DONE;