linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* watchdog: sp5100_tco support for AMD V/R/E series
@ 2020-09-07 11:20 Jan Kiszka
  2020-09-07 15:31 ` Guenter Roeck
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2020-09-07 11:20 UTC (permalink / raw)
  To: Guenter Roeck, linux-watchdog
  Cc: Wim Van Sebroeck, linux-kernel, Awan, Arsalan, Hombourger,
	Cedric, Farnsworth, Wade

Hi all,

Arsalan reported that the upstream driver for sp5100_tco does not work
for embedded Ryzen. Meanwhile, I was able to confirm that on an R1505G:

[   11.607251] sp5100_tco: SP5100/SB800 TCO WatchDog Timer Driver
[   11.607337] sp5100-tco sp5100-tco: Using 0xfed80b00 for watchdog MMIO address
[   11.607344] sp5100-tco sp5100-tco: Watchdog hardware is disabled

..and fix it:

diff --git a/drivers/watchdog/sp5100_tco.c b/drivers/watchdog/sp5100_tco.c
index 85e9664318c9..5482154fde42 100644
--- a/drivers/watchdog/sp5100_tco.c
+++ b/drivers/watchdog/sp5100_tco.c
@@ -193,7 +193,8 @@ static void tco_timer_enable(struct sp5100_tco *tco)
 		/* Set the Watchdog timer resolution to 1 sec and enable */
 		sp5100_tco_update_pm_reg8(EFCH_PM_DECODEEN3,
 					  ~EFCH_PM_WATCHDOG_DISABLE,
-					  EFCH_PM_DECODEEN_SECOND_RES);
+					  EFCH_PM_DECODEEN_SECOND_RES |
+					  EFCH_PM_DECODEEN_WDT_TMREN);
 		break;
 	}
 }

Does anyone have an idea if such unconditional setting could be 
problematic on older/different efch? We probe for that bit in
sp5100_tco_setupdevice but we never set it so far.

I'm missing specs...

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

end of thread, other threads:[~2020-09-10  6:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-07 11:20 watchdog: sp5100_tco support for AMD V/R/E series Jan Kiszka
2020-09-07 15:31 ` Guenter Roeck
2020-09-07 15:46   ` Jan Kiszka
2020-09-07 19:18     ` Guenter Roeck
2020-09-07 20:45       ` Guenter Roeck
2020-09-09 16:04         ` Guenter Roeck
2020-09-10  6:09           ` Jan Kiszka

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