diff options
author | Breno Lima <breno.lima@nxp.com> | 2021-06-29 05:32:35 +0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2021-07-17 15:59:56 +0300 |
commit | edf95bdeddeab8f0fd7b88d4865fbc6e99071c73 (patch) | |
tree | e1a42b31742fa6a352a1cd7fb756a56d1c25815c /drivers/clk | |
parent | c6ae713c7ccf2a6a30b6bffb47d7806c43d9d05f (diff) | |
download | u-boot-edf95bdeddeab8f0fd7b88d4865fbc6e99071c73.tar.xz |
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>
Diffstat (limited to 'drivers/clk')
0 files changed, 0 insertions, 0 deletions