u-boot/drivers
Breno Lima edf95bdedd mx7ulp: wdog: Wait for WDOG unlock and reconfiguration to complete
According to i.MX7ULP Reference Manual we should wait for WDOG unlock
and reconfiguration to complete.

Section "59.5.3 Configure Watchdog" provides the following example:

DisableInterrupts; //disable global interrupt
WDOG_CNT = 0xD928C520; //unlock watchdog
while(WDOG_CS[ULK]==0); //wait until registers are unlocked
WDOG_TOVAL = 256; //set timeout value
WDOG_CS = WDOG_CS_EN(1) | WDOG_CS_CLK(1) | WDOG_CS_INT(1) |
	  WDOG_CS_WIN(0) | WDOG_CS_UPDATE(1);
while(WDOG_CS[RCS]==0); //wait until new configuration takes effect
EnableInterrupts; //enable global interrupt

Update U-Boot WDOG driver to align with i.MX7ULP reference manual.

Use 32 bits accessing to CS register. According to RM, the bits in
this register only can write once after unlock. So using 8 bits access
will cause problem.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-07-17 14:59:56 +02:00
..
adc dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
ata various minor sandbox improvements 2021-07-07 13:34:42 -04:00
axi dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
bios_emulator treewide: Convert macro and uses of __section(foo) to __section("foo") 2021-05-24 14:21:30 -04:00
block dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
bootcount dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
bus bus: ti-sysc: change in a normal driver 2021-03-22 19:23:27 +13:00
button dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
cache dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
clk clk: imx8mm: Add SPI clocks 2021-07-10 16:03:01 +02:00
core remove struct uclass_driver::ops 2021-07-06 10:38:03 -06:00
cpu dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
crypto dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
ddr ppc: Remove T4160RDB board 2021-07-07 19:52:24 -04:00
demo common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
dfu dfu: add error callback 2021-06-18 10:09:41 +02:00
dma dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
fastboot fastboot: Fix possible buffer overrun 2021-04-12 17:44:55 -04:00
firmware dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
fpga arm: socfpga: Move Stratix10 and Agilex to use TARGET_SOCFPGA_SOC64 2021-03-08 10:59:10 +08:00
gpio arm: Remove spear600 boards and the rest of SPEAr support 2021-07-07 22:22:42 -04:00
hwspinlock dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
i2c arm: Remove spear600 boards and the rest of SPEAr support 2021-07-07 22:22:42 -04:00
input dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
led dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
mailbox dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
memory memory: stm32-fmc2: migrate trace to dev and log macro 2021-01-13 09:52:58 +01:00
misc sandbox: cros-ec: Add tests for the Chromium OS EC PWM driver 2021-07-06 10:38:03 -06:00
mmc various minor sandbox improvements 2021-07-07 13:34:42 -04:00
mtd mtd: spi-nor-ids: Add support for Macronix MX25V8035F and MX25R1635F 2021-07-10 15:59:20 +02:00
mux dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
net net: add support for KSZ9477/KSZ9897/KSZ9567 GbE switch 2021-07-10 18:12:42 +02:00
nvme dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
pch dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
pci pci: imx: use reset-gpios if defined by device-tree 2021-07-10 16:53:34 +02:00
pci_endpoint dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
phy phy: phy-imx8mq-usb: Add USB PHY driver for i.MX8MQ 2021-07-17 13:12:23 +02:00
pinctrl various minor sandbox improvements 2021-07-07 13:34:42 -04:00
power dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
pwm dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
qe ppc: Remove TARGET_T1040QDS references 2021-04-10 08:04:42 -04:00
ram dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
remoteproc dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
reset dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
rng dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
rtc dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
scsi dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
serial serial: a37xx: Switch to XTAL clock when booting Linux kernel 2021-07-08 16:40:52 +02:00
smem dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
soc dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
sound dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
spi spi: mxc_spi: fix warnings if CLK_ENABLED not set 2021-07-10 18:14:54 +02:00
spmi dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
sysinfo dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
sysreset sysreset: provide type of reset in do_reset cmd 2021-04-20 07:31:12 -04:00
tee dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
thermal dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
timer dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
tpm tpm: Correct warning on 32-bit build 2021-03-13 13:14:52 -05:00
ufs dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
usb arm: Remove spear600 boards and the rest of SPEAr support 2021-07-07 22:22:42 -04:00
video dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
virtio dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
w1 various minor sandbox improvements 2021-07-07 13:34:42 -04:00
w1-eeprom dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
watchdog mx7ulp: wdog: Wait for WDOG unlock and reconfiguration to complete 2021-07-17 14:59:56 +02:00
xen dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
Kconfig board: Rename uclass to sysinfo 2020-11-06 10:18:20 +08:00
Makefile cpu: Rename SPL_CPU_SUPPORT to SPL_CPU 2021-03-27 15:04:31 +13:00