summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-sprd-adi.c
diff options
context:
space:
mode:
authorLingling Xu <ling_ling.xu@unisoc.com>2020-06-02 16:24:15 +0800
committerMark Brown <broonie@kernel.org>2020-06-02 11:45:11 +0100
commit8bdd79dae1ff5397351b95e249abcae126572617 (patch)
tree636fc751546ba1b47c6d5207593e0cb8bf734ed1 /drivers/spi/spi-sprd-adi.c
parent263b81dc6c932c8bc550d5e7bfc178d2b3fc491e (diff)
downloadlinux-8bdd79dae1ff5397351b95e249abcae126572617.tar.bz2
spi: sprd: switch the sequence of setting WDG_LOAD_LOW and _HIGH
The watchdog counter consists of WDG_LOAD_LOW and WDG_LOAD_HIGH, which would be loaded to watchdog counter once writing WDG_LOAD_LOW. Fixes: ac1775012058 ("spi: sprd: Add the support of restarting the system") Signed-off-by: Lingling Xu <ling_ling.xu@unisoc.com> Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com> Link: https://lore.kernel.org/r/20200602082415.5848-1-zhang.lyra@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-sprd-adi.c')
-rw-r--r--drivers/spi/spi-sprd-adi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c
index 88e6543648cb..bd23c4689b46 100644
--- a/drivers/spi/spi-sprd-adi.c
+++ b/drivers/spi/spi-sprd-adi.c
@@ -389,9 +389,9 @@ static int sprd_adi_restart_handler(struct notifier_block *this,
sprd_adi_write(sadi, sadi->slave_pbase + REG_WDG_CTRL, val);
/* Load the watchdog timeout value, 50ms is always enough. */
+ sprd_adi_write(sadi, sadi->slave_pbase + REG_WDG_LOAD_HIGH, 0);
sprd_adi_write(sadi, sadi->slave_pbase + REG_WDG_LOAD_LOW,
WDG_LOAD_VAL & WDG_LOAD_MASK);
- sprd_adi_write(sadi, sadi->slave_pbase + REG_WDG_LOAD_HIGH, 0);
/* Start the watchdog to reset system */
sprd_adi_read(sadi, sadi->slave_pbase + REG_WDG_CTRL, &val);