]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/watchdog/i6300esb.c
[WATCHDOG] i6300esb: fix unlock register with
[mv-sheeva.git] / drivers / watchdog / i6300esb.c
index 7ba0b11ec525d2bd84f4ebfe72b4e0e5912ff2b4..3e00dc5b5a205f8e1948fb88bbf965b9bdc1097a 100644 (file)
@@ -65,7 +65,7 @@
 /* Config register bits */
 #define ESB_WDT_REBOOT  (0x01 << 5)   /* Enable reboot on timeout          */
 #define ESB_WDT_FREQ    (0x01 << 2)   /* Decrement frequency               */
-#define ESB_WDT_INTTYPE (0x11 << 0)   /* Interrupt type on timer1 timeout  */
+#define ESB_WDT_INTTYPE (0x03 << 0)   /* Interrupt type on timer1 timeout  */
 
 /* Reload register bits */
 #define ESB_WDT_TIMEOUT (0x01 << 9)    /* Watchdog timed out                */
@@ -111,8 +111,8 @@ MODULE_PARM_DESC(nowayout,
  */
 static inline void esb_unlock_registers(void)
 {
-       writeb(ESB_UNLOCK1, ESB_RELOAD_REG);
-       writeb(ESB_UNLOCK2, ESB_RELOAD_REG);
+       writew(ESB_UNLOCK1, ESB_RELOAD_REG);
+       writew(ESB_UNLOCK2, ESB_RELOAD_REG);
 }
 
 static int esb_timer_start(void)
@@ -256,7 +256,7 @@ static long esb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        int new_heartbeat;
        void __user *argp = (void __user *)arg;
        int __user *p = argp;
-       static struct watchdog_info ident = {
+       static const struct watchdog_info ident = {
                .options =              WDIOF_SETTIMEOUT |
                                        WDIOF_KEEPALIVEPING |
                                        WDIOF_MAGICCLOSE,