]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
MIPS: Alchemy: Fix reset for MTX-1 and XXS1500
authorFlorian Fainelli <florian@openwrt.org>
Mon, 21 Feb 2011 13:28:02 +0000 (14:28 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 14 Mar 2011 20:07:28 +0000 (21:07 +0100)
Since commit 32fd6901 (MIPS: Alchemy: get rid of common/reset.c)
Alchemy-based boards use their own reset function. For MTX-1 and XXS1500,
the reset function pokes at the BCSR.SYSTEM_RESET register, but this does
not work. According to Bruno Randolf, this was not tested when written.

Previously, the generic au1000_restart() routine called the board specific
reset function, which for MTX-1 and XXS1500 did not work, but finally made
a jump to the reset vector, which really triggers a system restart. Fix
reboot for both targets by jumping to the reset vector.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2093/
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/alchemy/mtx-1/board_setup.c
arch/mips/alchemy/xxs1500/board_setup.c

index 6398fa95905c9036518aa728292b16fe925eee39..40b84b99119133e2bce153532c9db5fcca2d1700 100644 (file)
@@ -54,8 +54,8 @@ int mtx1_pci_idsel(unsigned int devsel, int assert);
 
 static void mtx1_reset(char *c)
 {
-       /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
-       au_writel(0x00000000, 0xAE00001C);
+       /* Jump to the reset vector */
+       __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
 }
 
 static void mtx1_power_off(void)
index b43c918925d36406cd0903afb95f6c2d6abe546f..80c521e5290d630b0c0ec69023aaa6c9d4a00bff 100644 (file)
@@ -36,8 +36,8 @@
 
 static void xxs1500_reset(char *c)
 {
-       /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
-       au_writel(0x00000000, 0xAE00001C);
+       /* Jump to the reset vector */
+       __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
 }
 
 static void xxs1500_power_off(void)