diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2015-11-27 19:17:01 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-11-27 19:20:37 +0100 |
commit | c861519fcf95b2d46cb4275903423b43ae150a40 (patch) | |
tree | 7e17dcbb79a0a12dc06eae6d1bc3a5a3d8fa58ce /arch/mips/sni/reset.c | |
parent | 1ec218373b8ebda821aec00bb156a9c94fad9cd4 (diff) | |
download | linux-stable-c861519fcf95b2d46cb4275903423b43ae150a40.tar.gz linux-stable-c861519fcf95b2d46cb4275903423b43ae150a40.tar.bz2 linux-stable-c861519fcf95b2d46cb4275903423b43ae150a40.zip |
MIPS: Fix delay loops which may be removed by GCC.
GCC 4.1 and newer remove empty loops. This becomes a problem when delay
loops get removed. Fixed by rewriting to user the proper Linux interface
for such delays.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips/sni/reset.c')
-rw-r--r-- | arch/mips/sni/reset.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/mips/sni/reset.c b/arch/mips/sni/reset.c index 244f9427625b..db8f88b6a3af 100644 --- a/arch/mips/sni/reset.c +++ b/arch/mips/sni/reset.c @@ -3,6 +3,8 @@ * * Reset a SNI machine. */ +#include <linux/delay.h> + #include <asm/io.h> #include <asm/reboot.h> #include <asm/sni.h> @@ -32,9 +34,9 @@ void sni_machine_restart(char *command) for (;;) { for (i = 0; i < 100; i++) { kb_wait(); - for (j = 0; j < 100000 ; j++) - /* nothing */; + udelay(50); outb_p(0xfe, 0x64); /* pulse reset low */ + udelay(50); } } } |