Skip to content

Commit

Permalink
core: drivers: imx_wdog: fix register access
Browse files Browse the repository at this point in the history
The registers's base address are 16bits aligned, so read32/write32
should be replaced with read16/write16.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
MrVan authored and jforissier committed Nov 23, 2017
1 parent a0ffc59 commit 5da57ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/drivers/imx_wdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ void imx_wdog_restart(void)
write16(val, wdog_base + WCR_OFF);
dsb();

if (read32(wdog_base + WDT_WCR) & WDT_WCR_WDE) {
write32(WDT_SEQ1, wdog_base + WDT_WSR);
write32(WDT_SEQ2, wdog_base + WDT_WSR);
if (read16(wdog_base + WDT_WCR) & WDT_WCR_WDE) {
write16(WDT_SEQ1, wdog_base + WDT_WSR);
write16(WDT_SEQ2, wdog_base + WDT_WSR);
}

write16(val, wdog_base + WCR_OFF);
Expand Down

0 comments on commit 5da57ae

Please sign in to comment.