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>
Thu, 29 Apr 2021 07:56:32 +0000 (00:56 -0700)
commit827889042909071e4536117731c544f4f40a131c
tree3403a639c7e87e5ae586edf97c8a49180114593e
parent6485eedc35f8d63a0ce9f8c90bb90ad8060a3cc8
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)
(cherry picked from commit 8d99b70490c88b09b88e96291ecc468c22f91d22)
drivers/watchdog/ulp_wdog.c