summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorChunyan Zhang <chunyan.zhang@unisoc.com>2021-08-26 17:15:46 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-15 09:47:30 +0200
commit4206dbc9857bebd1b9beaa5b42ef2df2810ca883 (patch)
treec4e6f2b19cf4cb5728d54cda38f8bd0ba74275ae /drivers/spi
parent1f70517eac57fbc0b4cedab0b7aab8f653d733c7 (diff)
downloadlinux-4206dbc9857bebd1b9beaa5b42ef2df2810ca883.tar.gz
linux-4206dbc9857bebd1b9beaa5b42ef2df2810ca883.tar.bz2
linux-4206dbc9857bebd1b9beaa5b42ef2df2810ca883.zip
spi: sprd: Fix the wrong WDG_LOAD_VAL
[ Upstream commit 245ca2cc212bb2a078332ec99afbfbb202f44c2d ] 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: ac1775012058 ("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>
Diffstat (limited to 'drivers/spi')
-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 09f983524d51..e804a3854c35 100644
--- a/drivers/spi/spi-sprd-adi.c
+++ b/drivers/spi/spi-sprd-adi.c
@@ -102,7 +102,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