From: Chunyan Zhang <zhang.lyra@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
devicetree@vger.kernel.org, Baolin Wang <baolin.wang7@gmail.com>,
Orson Zhai <orsonzhai@gmail.com>,
Chunyan Zhang <zhang.lyra@gmail.com>,
Chunyan Zhang <chunyan.zhang@unisoc.com>,
Luting Guo <luting.guo@unisoc.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH V3 1/4] spi: sprd: Fix the wrong WDG_LOAD_VAL
Date: Thu, 26 Aug 2021 17:15:46 +0800 [thread overview]
Message-ID: <20210826091549.2138125-2-zhang.lyra@gmail.com> (raw)
In-Reply-To: <20210826091549.2138125-1-zhang.lyra@gmail.com>
From: Chunyan Zhang <chunyan.zhang@unisoc.com>
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>
---
drivers/spi/spi-sprd-adi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c
index 07f11b17bf20..d392dc6db927 100644
--- a/drivers/spi/spi-sprd-adi.c
+++ b/drivers/spi/spi-sprd-adi.c
@@ -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
--
2.25.1
next prev parent reply other threads:[~2021-08-26 9:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-26 9:15 [PATCH V3 0/4] Add sprd ADI r3 support Chunyan Zhang
2021-08-26 9:15 ` Chunyan Zhang [this message]
2021-08-26 9:15 ` [PATCH V3 2/4] spi: sprd: Add " Chunyan Zhang
2021-08-26 9:15 ` [PATCH V3 3/4] dt-bindings: spi: Convert sprd ADI bindings to yaml Chunyan Zhang
2021-08-26 9:15 ` [PATCH V3 4/4] dt-bindings: spi: add sprd ADI for sc9863 and ums512 Chunyan Zhang
2021-08-26 12:51 ` [PATCH V3 0/4] Add sprd ADI r3 support Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210826091549.2138125-2-zhang.lyra@gmail.com \
--to=zhang.lyra@gmail.com \
--cc=baolin.wang7@gmail.com \
--cc=broonie@kernel.org \
--cc=chunyan.zhang@unisoc.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=luting.guo@unisoc.com \
--cc=orsonzhai@gmail.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).