]> git.sur5r.net Git - u-boot/commitdiff
mx27: 16-bit wide watchdog registers
authorLeonid Iziumtsev <leonid.iziumtsev@se.atlascopco.com>
Sun, 20 Mar 2016 13:10:55 +0000 (14:10 +0100)
committerStefano Babic <sbabic@denx.de>
Fri, 25 Mar 2016 13:03:28 +0000 (14:03 +0100)
Make the watchdog registers 16-bit wide, as they are according to TRM.

Signed-off-by: Leonid Iziumtsev <leonid.iziumtsev@se.atlascopco.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
arch/arm/cpu/arm926ejs/mx27/reset.c
arch/arm/include/asm/arch-mx27/imx-regs.h

index f7b4a1c83e35a63b522da83d15dbda4c7a90a246..e7649867372555b692338df81cd8fa030cbbf1d5 100644 (file)
@@ -27,14 +27,14 @@ void reset_cpu(ulong ignored)
 {
        struct wdog_regs *regs = (struct wdog_regs *)IMX_WDT_BASE;
        /* Disable watchdog and set Time-Out field to 0 */
-       writel(0x00000000, &regs->wcr);
+       writew(0x0000, &regs->wcr);
 
        /* Write Service Sequence */
-       writel(0x00005555, &regs->wsr);
-       writel(0x0000AAAA, &regs->wsr);
+       writew(0x5555, &regs->wsr);
+       writew(0xAAAA, &regs->wsr);
 
        /* Enable watchdog */
-       writel(WCR_WDE, &regs->wcr);
+       writew(WCR_WDE, &regs->wcr);
 
        while (1);
        /*NOTREACHED*/
index baf1d29cc3ecefc2ce0831f53da8c39bf1fed813..40b76d26f6ddfd3bd1e47dd3c55aebf63e919f52 100644 (file)
@@ -106,9 +106,9 @@ struct esdramc_regs {
 
 /* Watchdog Registers*/
 struct wdog_regs {
-       u32 wcr;
-       u32 wsr;
-       u32 wstr;
+       u16 wcr;
+       u16 wsr;
+       u16 wstr;
 };
 
 /* PLL registers */