Commit 354b8bf2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'linux-watchdog-5.18-rc1' of git://www.linux-watchdog.org/linux-watchdog

Pull watchdog updates from Wim Van Sebroeck:

 - add support for BCM4908

 - renesas_wdt: add R-Car Gen4 support

 - improve watchdog_dev function documentation

 - sp5100_tco: replace the cd6h/cd7h port I/O with MMIO accesses during
   initialization

 - several other small improvements and fixes

* tag 'linux-watchdog-5.18-rc1' of git://www.linux-watchdog.org/linux-watchdog:
  Watchdog: sp5100_tco: Enable Family 17h+ CPUs
  Watchdog: sp5100_tco: Add initialization using EFCH MMIO
  Watchdog: sp5100_tco: Refactor MMIO base address initialization
  Watchdog: sp5100_tco: Move timer initialization into function
  watchdog: ixp4xx: Implement restart
  watchdog: orion_wdt: support pretimeout on Armada-XP
  watchdog: allow building BCM7038_WDT for BCM4908
  watchdog: renesas_wdt: Add R-Car Gen4 support
  dt-bindings: watchdog: renesas-wdt: Document r8a779f0 support
  watchdog: Improve watchdog_dev function documentation
  watchdog: aspeed: add nowayout support
  watchdog: rti-wdt: Add missing pm_runtime_disable() in probe function
  watchdog: imx2_wdg: Alow ping on suspend
parents d4f1db77 82627037
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -55,6 +55,11 @@ properties:
              - renesas,r8a779a0-wdt     # R-Car V3U
          - const: renesas,rcar-gen3-wdt # R-Car Gen3 and RZ/G2

      - items:
          - enum:
              - renesas,r8a779f0-wdt     # R-Car S4-8
          - const: renesas,rcar-gen4-wdt # R-Car Gen4

  reg:
    maxItems: 1

+1 −1
Original line number Diff line number Diff line
@@ -1779,7 +1779,7 @@ config BCM7038_WDT
	tristate "BCM63xx/BCM7038 Watchdog"
	select WATCHDOG_CORE
	depends on HAS_IOMEM
	depends on ARCH_BRCMSTB || BMIPS_GENERIC || BCM63XX || COMPILE_TEST
	depends on ARCH_BCM4908 || ARCH_BRCMSTB || BMIPS_GENERIC || BCM63XX || COMPILE_TEST
	help
	  Watchdog driver for the built-in hardware in Broadcom 7038 and
	  later SoCs used in set-top boxes.  BCM7038 was made public
+7 −0
Original line number Diff line number Diff line
@@ -13,6 +13,11 @@
#include <linux/platform_device.h>
#include <linux/watchdog.h>

static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
				__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");

struct aspeed_wdt {
	struct watchdog_device	wdd;
	void __iomem		*base;
@@ -266,6 +271,8 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
	wdt->wdd.timeout = WDT_DEFAULT_TIMEOUT;
	watchdog_init_timeout(&wdt->wdd, 0, dev);

	watchdog_set_nowayout(&wdt->wdd, nowayout);

	np = dev->of_node;

	ofdid = of_match_node(aspeed_wdt_of_table, np);
+20 −7
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ struct imx2_wdt_device {
	struct watchdog_device wdog;
	bool ext_reset;
	bool clk_is_on;
	bool no_ping;
};

static bool nowayout = WATCHDOG_NOWAYOUT;
@@ -312,11 +313,17 @@ static int __init imx2_wdt_probe(struct platform_device *pdev)

	wdev->ext_reset = of_property_read_bool(dev->of_node,
						"fsl,ext-reset-output");
	/*
	 * The i.MX7D doesn't support low power mode, so we need to ping the watchdog
	 * during suspend.
	 */
	wdev->no_ping = !of_device_is_compatible(dev->of_node, "fsl,imx7d-wdt");
	platform_set_drvdata(pdev, wdog);
	watchdog_set_drvdata(wdog, wdev);
	watchdog_set_nowayout(wdog, nowayout);
	watchdog_set_restart_priority(wdog, 128);
	watchdog_init_timeout(wdog, timeout, dev);
	if (wdev->no_ping)
		watchdog_stop_ping_on_suspend(wdog);

	if (imx2_wdt_is_running(wdev)) {
@@ -366,9 +373,11 @@ static int __maybe_unused imx2_wdt_suspend(struct device *dev)
		imx2_wdt_ping(wdog);
	}

	if (wdev->no_ping) {
		clk_disable_unprepare(wdev->clk);

		wdev->clk_is_on = false;
	}

	return 0;
}
@@ -380,11 +389,14 @@ static int __maybe_unused imx2_wdt_resume(struct device *dev)
	struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog);
	int ret;

	if (wdev->no_ping) {
		ret = clk_prepare_enable(wdev->clk);

		if (ret)
			return ret;

		wdev->clk_is_on = true;
	}

	if (watchdog_active(wdog) && !imx2_wdt_is_running(wdev)) {
		/*
@@ -407,6 +419,7 @@ static SIMPLE_DEV_PM_OPS(imx2_wdt_pm_ops, imx2_wdt_suspend,

static const struct of_device_id imx2_wdt_dt_ids[] = {
	{ .compatible = "fsl,imx21-wdt", },
	{ .compatible = "fsl,imx7d-wdt", },
	{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, imx2_wdt_dt_ids);
+14 −0
Original line number Diff line number Diff line
@@ -84,10 +84,24 @@ static int ixp4xx_wdt_set_timeout(struct watchdog_device *wdd,
	return 0;
}

static int ixp4xx_wdt_restart(struct watchdog_device *wdd,
                              unsigned long action, void *data)
{
	struct ixp4xx_wdt *iwdt = to_ixp4xx_wdt(wdd);

	__raw_writel(IXP4XX_WDT_KEY, iwdt->base + IXP4XX_OSWK_OFFSET);
	__raw_writel(0, iwdt->base + IXP4XX_OSWT_OFFSET);
	__raw_writel(IXP4XX_WDT_COUNT_ENABLE | IXP4XX_WDT_RESET_ENABLE,
		     iwdt->base + IXP4XX_OSWE_OFFSET);

	return 0;
}

static const struct watchdog_ops ixp4xx_wdt_ops = {
	.start = ixp4xx_wdt_start,
	.stop = ixp4xx_wdt_stop,
	.set_timeout = ixp4xx_wdt_set_timeout,
	.restart = ixp4xx_wdt_restart,
	.owner = THIS_MODULE,
};

Loading