summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/aspeed_wdt.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-12-02 03:01:03 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2019-12-02 03:01:03 +0100
commit4a08fe5792583d81bf237a75ebc803f756204e46 (patch)
treef0c8e4ae35c0b3b0599be7da4e33adb70585b866 /drivers/watchdog/aspeed_wdt.c
parentMerge tag 'gpio-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linu... (diff)
parentwatchdog: jz4740: Drop dependency on MACH_JZ47xx (diff)
downloadlinux-4a08fe5792583d81bf237a75ebc803f756204e46.tar.xz
linux-4a08fe5792583d81bf237a75ebc803f756204e46.zip
Merge tag 'linux-watchdog-5.5-rc1' of git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck: - support for NCT6116D - several small fixes and improvements * tag 'linux-watchdog-5.5-rc1' of git://www.linux-watchdog.org/linux-watchdog: (24 commits) watchdog: jz4740: Drop dependency on MACH_JZ47xx watchdog: jz4740: Use regmap provided by TCU driver watchdog: jz4740: Use WDT clock provided by TCU driver dt-bindings: watchdog: sama5d4_wdt: add microchip,sam9x60-wdt compatible watchdog: sama5d4_wdt: cleanup the bit definitions watchdog: sprd: Fix the incorrect pointer getting from driver data watchdog: aspeed: Fix clock behaviour for ast2600 watchdog: imx7ulp: Fix reboot hang watchdog: make nowayout sysfs file writable watchdog: prevent deferral of watchdogd wakeup on RT watchdog: imx7ulp: Use definitions instead of magic values watchdog: imx7ulp: Remove inline annotations watchdog: imx7ulp: Remove unused structure member watchdog: imx7ulp: Pass the wdog instance inimx7ulp_wdt_enable() watchdog: wdat_wdt: Spelling s/configrable/configurable/ watchdog: bd70528: Trivial function documentation fix watchdog: cadence: Do not show error in case of deferred probe watchdog: Fix the race between the release of watchdog_core_data and cdev watchdog: sbc7240_wdt: Fix yet another -Wimplicit-fallthrough warning watchdog: intel-mid_wdt: Add WATCHDOG_NOWAYOUT support ...
Diffstat (limited to 'drivers/watchdog/aspeed_wdt.c')
-rw-r--r--drivers/watchdog/aspeed_wdt.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
index 4ec0906bf12c..7e00960651fa 100644
--- a/drivers/watchdog/aspeed_wdt.c
+++ b/drivers/watchdog/aspeed_wdt.c
@@ -258,11 +258,6 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
if (IS_ERR(wdt->base))
return PTR_ERR(wdt->base);
- /*
- * The ast2400 wdt can run at PCLK, or 1MHz. The ast2500 only
- * runs at 1MHz. We chose to always run at 1MHz, as there's no
- * good reason to have a faster watchdog counter.
- */
wdt->wdd.info = &aspeed_wdt_info;
wdt->wdd.ops = &aspeed_wdt_ops;
wdt->wdd.max_hw_heartbeat_ms = WDT_MAX_TIMEOUT_MS;
@@ -278,7 +273,16 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
return -EINVAL;
config = ofdid->data;
- wdt->ctrl = WDT_CTRL_1MHZ_CLK;
+ /*
+ * On clock rates:
+ * - ast2400 wdt can run at PCLK, or 1MHz
+ * - ast2500 only runs at 1MHz, hard coding bit 4 to 1
+ * - ast2600 always runs at 1MHz
+ *
+ * Set the ast2400 to run at 1MHz as it simplifies the driver.
+ */
+ if (of_device_is_compatible(np, "aspeed,ast2400-wdt"))
+ wdt->ctrl = WDT_CTRL_1MHZ_CLK;
/*
* Control reset on a per-device basis to ensure the