Skip to content

Commit 8bdd79d

Browse files
Lingling Xubroonie
authored andcommitted
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: ac17750 ("spi: sprd: Add the support of restarting the system") Signed-off-by: Lingling Xu <[email protected]> Signed-off-by: Chunyan Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 263b81d commit 8bdd79d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-sprd-adi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,9 @@ static int sprd_adi_restart_handler(struct notifier_block *this,
389389
sprd_adi_write(sadi, sadi->slave_pbase + REG_WDG_CTRL, val);
390390

391391
/* Load the watchdog timeout value, 50ms is always enough. */
392+
sprd_adi_write(sadi, sadi->slave_pbase + REG_WDG_LOAD_HIGH, 0);
392393
sprd_adi_write(sadi, sadi->slave_pbase + REG_WDG_LOAD_LOW,
393394
WDG_LOAD_VAL & WDG_LOAD_MASK);
394-
sprd_adi_write(sadi, sadi->slave_pbase + REG_WDG_LOAD_HIGH, 0);
395395

396396
/* Start the watchdog to reset system */
397397
sprd_adi_read(sadi, sadi->slave_pbase + REG_WDG_CTRL, &val);

0 commit comments

Comments
 (0)