mx7ulp: Update unlock and refresh sequences in sWDOG driver
authorBreno Lima <breno.lima@nxp.com>
Tue, 29 Jun 2021 02:32:34 +0000 (10:32 +0800)
committerStefano Babic <sbabic@denx.de>
Sat, 17 Jul 2021 12:59:56 +0000 (14:59 +0200)
commitc6ae713c7ccf2a6a30b6bffb47d7806c43d9d05f
treeae31176626eb2ba35628904141ce749ba08380cf
parentcb391e339932d9e87477082b2b4b491a78b9ca41
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.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
drivers/watchdog/ulp_wdog.c