[ARM] at91: correct value for AT91_RSTC_KEY
authorJan Altenberg <jan@linutronix.de>
Fri, 16 Feb 2007 09:37:10 +0000 (01:37 -0800)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 16 Feb 2007 13:06:01 +0000 (13:06 +0000)
- Remove a duplicated define for AT91_RSTC_KEY
- Set AT91_RSTC_KEY to the correct value
- Replace the hardcoded keys in at91sam9620.c and at91sam9261.c
  by AT91_RSTC_KEY

Signed-off-by: Jan Altenberg <jan@linutronix.de>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9261.c
include/asm-arm/arch-at91/at91_rstc.h

index 003c27c2ef6555c0bad029241be0756bb4584f74..6ea41d8266cbfca7e007db35f66ea867ea5bfc33 100644 (file)
@@ -259,7 +259,7 @@ static struct at91_gpio_bank at91sam9260_gpio[] = {
 
 static void at91sam9260_reset(void)
 {
-       at91_sys_write(AT91_RSTC_CR, (0xA5 << 24) | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
+       at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
 }
 
 
index 1a9102368f11ba035ada2b81c7b82cd4863c1c34..784d1e682d6db426fa19b2f4b1317da95a071e7b 100644 (file)
@@ -225,7 +225,7 @@ static struct at91_gpio_bank at91sam9261_gpio[] = {
 
 static void at91sam9261_reset(void)
 {
-       at91_sys_write(AT91_RSTC_CR, (0xA5 << 24) | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
+       at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
 }
 
 
index 0b7afbc015a24345909ce58ef650036f80675b1e..fb8d1618a231a40b2d23387344b53cd09a5828fd 100644 (file)
@@ -17,7 +17,7 @@
 #define                AT91_RSTC_PROCRST       (1 << 0)                /* Processor Reset */
 #define                AT91_RSTC_PERRST        (1 << 2)                /* Peripheral Reset */
 #define                AT91_RSTC_EXTRST        (1 << 3)                /* External Reset */
-#define                AT91_RSTC_KEY           (0xff << 24)            /* KEY Password */
+#define                AT91_RSTC_KEY           (0xa5 << 24)            /* KEY Password */
 
 #define AT91_RSTC_SR           (AT91_RSTC + 0x04)      /* Reset Controller Status Register */
 #define                AT91_RSTC_URSTS         (1 << 0)                /* User Reset Status */
@@ -34,6 +34,5 @@
 #define                AT91_RSTC_URSTEN        (1 << 0)                /* User Reset Enable */
 #define                AT91_RSTC_URSTIEN       (1 << 4)                /* User Reset Interrupt Enable */
 #define                AT91_RSTC_ERSTL         (0xf << 8)              /* External Reset Length */
-#define                AT91_RSTC_KEY           (0xff << 24)            /* KEY Password */
 
 #endif