u-boot/arch/arm/mach-imx/mx7ulp
Ye Li 64fe0ffca0 mx7ulp: Update wdog disable sequence
Update the mx7ulp wdog disable sequence to avoid potential reset
issue in unlock or refresh sequence. Both sequence need two words
write to wdog CNT register in 16 bus clocks window, if miss the
window, the write will cause violation in wdog and reset the chip.

Current u-boot 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 the wdog
reset due to 16 bus clock window requirement.

Also, WDOG1 might have been enabled already depending on FUSE hence
we need to be as close as possible to its reconfiguration timing
requirement of 128 bus clock limit.

This patch replaces writel() function by __raw_writel() to avoid such
issue, and improve to check if watchdog is already disabled or
unlocked.

Signed-off-by: Ye Li <ye.li@nxp.com>
Co-developed-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Co-developed-by: Ricardo Salveti <ricardo@foundries.io>
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
2021-10-07 16:53:50 +02:00
..
clock.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
iomux.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Kconfig caam: enable support for iMX7ULP 2021-04-08 09:18:29 +02:00
Makefile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
pcc.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
scg.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
soc.c mx7ulp: Update wdog disable sequence 2021-10-07 16:53:50 +02:00