]> err.no Git - linux-2.6/blobdiff - include/asm-arm/arch-s3c2410/system.h
Remove the deprecated cli() sti() functions
[linux-2.6] / include / asm-arm / arch-s3c2410 / system.h
index ecf250db45fbc613dd892f1595e39850a2c898e0..ad258085e53b571c82693e4a55179cfdd4a26e1f 100644 (file)
 
 #include <asm/arch/map.h>
 #include <asm/arch/idle.h>
+#include <asm/arch/reset.h>
 
-#include <asm/arch/regs-watchdog.h>
 #include <asm/arch/regs-clock.h>
 
 void (*s3c24xx_idle)(void);
+void (*s3c24xx_reset_hook)(void);
 
 void s3c24xx_default_idle(void)
 {
-       void __iomem *reg = S3C2410_CLKCON;
        unsigned long tmp;
        int i;
 
@@ -33,16 +33,18 @@ void s3c24xx_default_idle(void)
 
        /* Warning: going into idle state upsets jtag scanning */
 
-       __raw_writel(__raw_readl(reg) | (1<<2), reg);
+       __raw_writel(__raw_readl(S3C2410_CLKCON) | S3C2410_CLKCON_IDLE,
+                    S3C2410_CLKCON);
 
        /* the samsung port seems to do a loop and then unset idle.. */
        for (i = 0; i < 50; i++) {
-               tmp += __raw_readl(reg); /* ensure loop not optimised out */
+               tmp += __raw_readl(S3C2410_CLKCON); /* ensure loop not optimised out */
        }
 
        /* this bit is not cleared on re-start... */
 
-       __raw_writel(__raw_readl(reg) & ~(1<<2), reg);
+       __raw_writel(__raw_readl(S3C2410_CLKCON) & ~S3C2410_CLKCON_IDLE,
+                    S3C2410_CLKCON);
 }
 
 static void arch_idle(void)
@@ -53,31 +55,4 @@ static void arch_idle(void)
                s3c24xx_default_idle();
 }
 
-
-static void
-arch_reset(char mode)
-{
-       if (mode == 's') {
-               cpu_reset(0);
-       }
-
-       printk("arch_reset: attempting watchdog reset\n");
-
-       __raw_writel(0, S3C2410_WTCON);   /* disable watchdog, to be safe  */
-
-       /* put initial values into count and data */
-       __raw_writel(0x100, S3C2410_WTCNT);
-       __raw_writel(0x100, S3C2410_WTDAT);
-
-       /* set the watchdog to go and reset... */
-       __raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN |
-                    S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON);
-
-       /* wait for reset to assert... */
-       mdelay(5000);
-
-       printk(KERN_ERR "Watchdog reset failed to assert reset\n");
-
-       /* we'll take a jump through zero as a poor second */
-       cpu_reset(0);
-}
+#include <asm/arch/system-reset.h>