]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
m68knommu: merge system reset for code ColdFire 523x family
authorGreg Ungerer <gerg@uclinux.org>
Tue, 28 Apr 2009 06:56:03 +0000 (16:56 +1000)
committerGreg Ungerer <gerg@uclinux.org>
Thu, 11 Jun 2009 03:09:09 +0000 (13:09 +1000)
The sofwtare reset control code for the 523x ColdFire family uses the
same Reset unit hardware as the 527x and 528x ColdFire parts. So they
should all use the same code. Merge them.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
arch/m68k/include/asm/system_no.h

index 5fbc96d933cef151ebc1336ef9b9886c48006771..a0a1ae8b1524153f59bf6fbf91ddd57b1013434c 100644 (file)
@@ -264,7 +264,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
        : /* No output */               \
        : "o" (*(char *)MCF_MBAR) );    \
 })
-#elif defined(CONFIG_M528x) || defined(CONFIG_M527x)
+#elif defined(CONFIG_M523x) || defined(CONFIG_M528x) || defined(CONFIG_M527x)
 /*
  * Most of the newer ColdFire family members have a proper RESET unit.
  * Use the software reset control bit in the Reset Control Register (RCR).
@@ -275,16 +275,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
        asm("move.w #0x2700, %sr");                                     \
        reset = ((volatile unsigned char *)(MCF_IPSBAR + 0x110000));    \
        while (1)                                                       \
-               *reset |= (0x01 << 7);                                  \
-})
-#elif defined(CONFIG_M523x)
-#define HARD_RESET_NOW() ({            \
-       asm("                           \
-       movew #0x2700, %sr;             \
-       movel #0x01000000, %sp;         \
-       moveal #0x40110000, %a0;        \
-       moveb #0x80, (%a0);             \
-       ");                             \
+               *reset |= 0x80;                                         \
 })
 #elif defined(CONFIG_M520x)
        /*