Skip to content

Commit 245ca2c

Browse files
Chunyan Zhangbroonie
authored andcommitted
spi: sprd: Fix the wrong WDG_LOAD_VAL
Use 50ms as default timeout value and the time clock is 32768HZ. The original value of WDG_LOAD_VAL is not correct, so this patch fixes it. Fixes: ac17750 ("spi: sprd: Add the support of restarting the system") Signed-off-by: Chunyan Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent f674aac commit 245ca2c

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
@@ -103,7 +103,7 @@
103103
#define HWRST_STATUS_WATCHDOG 0xf0
104104

105105
/* Use default timeout 50 ms that converts to watchdog values */
106-
#define WDG_LOAD_VAL ((50 * 1000) / 32768)
106+
#define WDG_LOAD_VAL ((50 * 32768) / 1000)
107107
#define WDG_LOAD_MASK GENMASK(15, 0)
108108
#define WDG_UNLOCK_KEY 0xe551
109109

0 commit comments

Comments
 (0)