summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/imx8ulp
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2021-11-02 09:27:03 +0800
committerYe Li <ye.li@nxp.com>2022-04-06 18:05:04 +0800
commita73f723c0a924d7e7664a1e42eaab2df393ea11f (patch)
tree6b018ef7c3cbbd25ebaa1ed5eac2299ebc8f4e78 /arch/arm/mach-imx/imx8ulp
parentb1240039e0aa5949a017b9e495f0516df4dcb893 (diff)
LF-4842-3 imx8ulp: Configure the Watchdog to 32bits command mode
Configure the watchdog to enable 32bits command, so that in kernel we can avoid potential 16 bus cycle issue for two 16bits unlock/refresh commands. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit ee461bc7628bb9bd011799af3dbb16ff50a2d8ba)
Diffstat (limited to 'arch/arm/mach-imx/imx8ulp')
-rw-r--r--arch/arm/mach-imx/imx8ulp/soc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c
index 6c6b2cfd8b..4f85bd94da 100644
--- a/arch/arm/mach-imx/imx8ulp/soc.c
+++ b/arch/arm/mach-imx/imx8ulp/soc.c
@@ -335,9 +335,6 @@ static void disable_wdog(void __iomem *wdog_base)
{
u32 val_cs = readl(wdog_base + 0x00);
- if (!(val_cs & 0x80))
- return;
-
dmb();
__raw_writel(REFRESH_WORD0, (wdog_base + 0x04)); /* Refresh the CNT */
__raw_writel(REFRESH_WORD1, (wdog_base + 0x04));
@@ -354,7 +351,7 @@ static void disable_wdog(void __iomem *wdog_base)
}
writel(0x0, (wdog_base + 0x0C)); /* Set WIN to 0 */
writel(0x400, (wdog_base + 0x08)); /* Set timeout to default 0x400 */
- writel(0x120, (wdog_base + 0x00)); /* Disable it and set update */
+ writel(0x2120, (wdog_base + 0x00)); /* Change to 32bit cmd, disable it and set update */
while (!(readl(wdog_base + 0x00) & 0x400))
;