Message ID | 1458479455-19791-1-git-send-email-leonid.iziumtsev@gmail.com |
---|---|
State | Accepted |
Commit | f7440928e609734f6d24d6769927539762270e1e |
Delegated to: | Stefano Babic |
Headers | show |
On Sun, Mar 20, 2016 at 10:10 AM, Leonid Iziumtsev <leonid.iziumtsev@gmail.com> wrote: > From: Leonid Iziumtsev <leonid.iziumtsev@se.atlascopco.com> > > 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>
On 20/03/2016 14:10, Leonid Iziumtsev wrote: > From: Leonid Iziumtsev <leonid.iziumtsev@se.atlascopco.com> > > Make the watchdog registers 16-bit wide, as they are according to TRM. > > Signed-off-by: Leonid Iziumtsev <leonid.iziumtsev@se.atlascopco.com> > --- > arch/arm/cpu/arm926ejs/mx27/reset.c | 8 ++++---- > arch/arm/include/asm/arch-mx27/imx-regs.h | 6 +++--- > 2 files changed, 7 insertions(+), 7 deletions(-) > > diff --git a/arch/arm/cpu/arm926ejs/mx27/reset.c b/arch/arm/cpu/arm926ejs/mx27/reset.c > index f7b4a1c..e764986 100644 > --- a/arch/arm/cpu/arm926ejs/mx27/reset.c > +++ b/arch/arm/cpu/arm926ejs/mx27/reset.c > @@ -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, ®s->wcr); > + writew(0x0000, ®s->wcr); > > /* Write Service Sequence */ > - writel(0x00005555, ®s->wsr); > - writel(0x0000AAAA, ®s->wsr); > + writew(0x5555, ®s->wsr); > + writew(0xAAAA, ®s->wsr); > > /* Enable watchdog */ > - writel(WCR_WDE, ®s->wcr); > + writew(WCR_WDE, ®s->wcr); > > while (1); > /*NOTREACHED*/ > diff --git a/arch/arm/include/asm/arch-mx27/imx-regs.h b/arch/arm/include/asm/arch-mx27/imx-regs.h > index baf1d29..40b76d2 100644 > --- a/arch/arm/include/asm/arch-mx27/imx-regs.h > +++ b/arch/arm/include/asm/arch-mx27/imx-regs.h > @@ -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 */ > Applied to u-boot-imx, thanks ! Best regards, Stefano Babic
diff --git a/arch/arm/cpu/arm926ejs/mx27/reset.c b/arch/arm/cpu/arm926ejs/mx27/reset.c index f7b4a1c..e764986 100644 --- a/arch/arm/cpu/arm926ejs/mx27/reset.c +++ b/arch/arm/cpu/arm926ejs/mx27/reset.c @@ -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, ®s->wcr); + writew(0x0000, ®s->wcr); /* Write Service Sequence */ - writel(0x00005555, ®s->wsr); - writel(0x0000AAAA, ®s->wsr); + writew(0x5555, ®s->wsr); + writew(0xAAAA, ®s->wsr); /* Enable watchdog */ - writel(WCR_WDE, ®s->wcr); + writew(WCR_WDE, ®s->wcr); while (1); /*NOTREACHED*/ diff --git a/arch/arm/include/asm/arch-mx27/imx-regs.h b/arch/arm/include/asm/arch-mx27/imx-regs.h index baf1d29..40b76d2 100644 --- a/arch/arm/include/asm/arch-mx27/imx-regs.h +++ b/arch/arm/include/asm/arch-mx27/imx-regs.h @@ -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 */