Browse Source

[ARM] 4722/1: S3C24XX: Improve output if watchdog reset fails

If the watchdog reset fails and we decided to take the jump
to zero approach, allow 50ms for the UARTS to drain the FIFOs
before calling into a bootloader that may flush the output.

Also reduece the waits and the timeout values as 5 seconds is
rather long.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Ben Dooks 17 years ago
parent
commit
ff44b49b55
1 changed files with 6 additions and 3 deletions
  1. 6 3
      include/asm-arm/arch-s3c2410/system.h

+ 6 - 3
include/asm-arm/arch-s3c2410/system.h

@@ -82,18 +82,21 @@ arch_reset(char mode)
 		printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__);
 		printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__);
 
 
 	/* put initial values into count and data */
 	/* put initial values into count and data */
-	__raw_writel(0x100, S3C2410_WTCNT);
-	__raw_writel(0x100, S3C2410_WTDAT);
+	__raw_writel(0x80, S3C2410_WTCNT);
+	__raw_writel(0x80, S3C2410_WTDAT);
 
 
 	/* set the watchdog to go and reset... */
 	/* set the watchdog to go and reset... */
 	__raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN |
 	__raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN |
 		     S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON);
 		     S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON);
 
 
 	/* wait for reset to assert... */
 	/* wait for reset to assert... */
-	mdelay(5000);
+	mdelay(500);
 
 
 	printk(KERN_ERR "Watchdog reset failed to assert reset\n");
 	printk(KERN_ERR "Watchdog reset failed to assert reset\n");
 
 
+	/* delay to allow the serial port to show the message */
+	mdelay(50);
+
 	/* we'll take a jump through zero as a poor second */
 	/* we'll take a jump through zero as a poor second */
 	cpu_reset(0);
 	cpu_reset(0);
 }
 }