Skip to content

Commit

Permalink
spi: sprd: Fix the wrong WDG_LOAD_VAL
Browse files Browse the repository at this point in the history
[ Upstream commit 245ca2c ]

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 <chunyan.zhang@unisoc.com>
Link: https://lore.kernel.org/r/20210826091549.2138125-2-zhang.lyra@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Chunyan Zhang authored and gregkh committed Sep 15, 2021
1 parent 841e2dc commit 8a4b0fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-sprd-adi.c
Expand Up @@ -103,7 +103,7 @@
#define HWRST_STATUS_WATCHDOG 0xf0

/* Use default timeout 50 ms that converts to watchdog values */
#define WDG_LOAD_VAL ((50 * 1000) / 32768)
#define WDG_LOAD_VAL ((50 * 32768) / 1000)
#define WDG_LOAD_MASK GENMASK(15, 0)
#define WDG_UNLOCK_KEY 0xe551

Expand Down

0 comments on commit 8a4b0fc

Please sign in to comment.