MLK-22743 mx7ulp: Update unlock and refresh sequences in sWDOG driver
authorBreno Lima <breno.lima@nxp.com>
Thu, 10 Oct 2019 13:43:02 +0000 (10:43 -0300)
committerYe Li <ye.li@nxp.com>
Fri, 11 Oct 2019 06:38:26 +0000 (23:38 -0700)
commit5f20cc02b0b10525843813e81603e1dc82033e76
tree47540e6a541b1cf7733b9bc2b962116186c52d8f
parenta49a064fbac5c2508eda795c539de0087e8010fa
MLK-22743 mx7ulp: Update unlock and refresh sequences in sWDOG driver

According to i.MX7ULP Reference Manual the second word write for both
UNLOCK and REFRESH operations must occur in maximum 16 bus clock.

The current code is using writel() function which has a DMB barrier to
order the memory access. The DMB between two words write may introduce
some delay in certain circumstance, causing a WDOG timeout due to 16 bus
clock window requirement.

Replace writel() function by __raw_writel() to achieve a faster memory
access and avoid such issue.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5dd8c46d68d3267e989f980598a4e3e2ed04d4f9)
drivers/watchdog/ulp_wdog.c