linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: sprd: switch the sequence of setting WDG_LOAD_LOW and _HIGH
@ 2020-06-02  8:24 Chunyan Zhang
  2020-06-02 11:09 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Chunyan Zhang @ 2020-06-02  8:24 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-spi, linux-kernel, Orson Zhai, Baolin Wang, Chunyan Zhang,
	Chunyan Zhang

From: Lingling Xu <ling_ling.xu@unisoc.com>

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: ac1775012058 ("spi: sprd: Add the support of restarting the system")
Signed-off-by: Lingling Xu <ling_ling.xu@unisoc.com>
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 87dadb6b8ebf..8e84e25a8f7a 100644
--- a/drivers/spi/spi-sprd-adi.c
+++ b/drivers/spi/spi-sprd-adi.c
@@ -389,9 +389,9 @@ static int sprd_adi_restart_handler(struct notifier_block *this,
 	sprd_adi_write(sadi, sadi->slave_pbase + REG_WDG_CTRL, val);
 
 	/* Load the watchdog timeout value, 50ms is always enough. */
+	sprd_adi_write(sadi, sadi->slave_pbase + REG_WDG_LOAD_HIGH, 0);
 	sprd_adi_write(sadi, sadi->slave_pbase + REG_WDG_LOAD_LOW,
 		       WDG_LOAD_VAL & WDG_LOAD_MASK);
-	sprd_adi_write(sadi, sadi->slave_pbase + REG_WDG_LOAD_HIGH, 0);
 
 	/* Start the watchdog to reset system */
 	sprd_adi_read(sadi, sadi->slave_pbase + REG_WDG_CTRL, &val);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: sprd: switch the sequence of setting WDG_LOAD_LOW and _HIGH
  2020-06-02  8:24 [PATCH] spi: sprd: switch the sequence of setting WDG_LOAD_LOW and _HIGH Chunyan Zhang
@ 2020-06-02 11:09 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-06-02 11:09 UTC (permalink / raw)
  To: Chunyan Zhang
  Cc: Baolin Wang, linux-kernel, Chunyan Zhang, linux-spi, Orson Zhai

On Tue, 2 Jun 2020 16:24:15 +0800, Chunyan Zhang wrote:
> The watchdog counter consists of WDG_LOAD_LOW and WDG_LOAD_HIGH,
> which would be loaded to watchdog counter once writing WDG_LOAD_LOW.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: sprd: switch the sequence of setting WDG_LOAD_LOW and _HIGH
      commit: 8bdd79dae1ff5397351b95e249abcae126572617

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-02 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02  8:24 [PATCH] spi: sprd: switch the sequence of setting WDG_LOAD_LOW and _HIGH Chunyan Zhang
2020-06-02 11:09 ` Mark Brown

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).