Commit 12418ece authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull watchdog updates from Wim Van Sebroeck:

 - add support for Amlogic C3 and S4 SoCs

 - add IT8613 ID

 - add MSM8226 and MSM8974 compatibles

 - other small fixes and improvements

* tag 'linux-watchdog-6.7-rc1' of git://www.linux-watchdog.org/linux-watchdog: (24 commits)
  dt-bindings: watchdog: Add support for Amlogic C3 and S4 SoCs
  watchdog: mlx-wdt: Parameter desctiption warning fix
  watchdog: aspeed: Add support for aspeed,reset-mask DT property
  dt-bindings: watchdog: aspeed-wdt: Add aspeed,reset-mask property
  watchdog: apple: Deactivate on suspend
  dt-bindings: watchdog: qcom-wdt: Add MSM8226 and MSM8974 compatibles
  dt-bindings: watchdog: fsl-imx7ulp-wdt: Add 'fsl,ext-reset-output'
  wdog: imx7ulp: Enable wdog int_en bit for watchdog any reset
  drivers: watchdog: marvell_gti: Program the max_hw_heartbeat_ms
  drivers: watchdog: marvell_gti: fix zero pretimeout handling
  watchdog: marvell_gti: Replace of_platform.h with explicit includes
  watchdog: imx_sc_wdt: continue if the wdog already enabled
  watchdog: st_lpc: Use device_get_match_data()
  watchdog: wdat_wdt: Add timeout value as a param in ping method
  watchdog: gpio_wdt: Make use of device properties
  sbsa_gwdt: Calculate timeout with 64-bit math
  watchdog: ixp4xx: Make sure restart always works
  watchdog: it87_wdt: add IT8613 ID
  watchdog: marvell_gti_wdt: Fix error code in probe()
  Watchdog: marvell_gti_wdt: Remove redundant dev_err_probe() for platform_get_irq()
  ...
parents f3bfe643 9d08e590
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -15,9 +15,15 @@ allOf:

properties:
  compatible:
    enum:
    oneOf:
      - enum:
          - amlogic,meson-gxbb-wdt
          - amlogic,t7-wdt
      - items:
          - enum:
              - amlogic,c3-wdt
              - amlogic,s4-wdt
          - const: amlogic,t7-wdt

  reg:
    maxItems: 1
+17 −1
Original line number Diff line number Diff line
@@ -47,7 +47,15 @@ Optional properties for AST2500-compatible watchdogs:
			   is configured as push-pull, then set the pulse
			   polarity to active-high. The default is active-low.

Example:
Optional properties for AST2500- and AST2600-compatible watchdogs:
 - aspeed,reset-mask: A bitmask indicating which peripherals will be reset if
		      the watchdog timer expires.  On AST2500 this should be a
		      single word defined using the AST2500_WDT_RESET_* macros;
		      on AST2600 this should be a two-word array with the first
		      word defined using the AST2600_WDT_RESET1_* macros and the
		      second word defined using the AST2600_WDT_RESET2_* macros.

Examples:

	wdt1: watchdog@1e785000 {
		compatible = "aspeed,ast2400-wdt";
@@ -55,3 +63,11 @@ Example:
		aspeed,reset-type = "system";
		aspeed,external-signal;
	};

	#include <dt-bindings/watchdog/aspeed-wdt.h>
	wdt2: watchdog@1e785040 {
		compatible = "aspeed,ast2600-wdt";
		reg = <0x1e785040 0x40>;
		aspeed,reset-mask = <AST2600_WDT_RESET1_DEFAULT
				     (AST2600_WDT_RESET2_DEFAULT & ~AST2600_WDT_RESET2_LPC)>;
	};
+5 −0
Original line number Diff line number Diff line
@@ -30,6 +30,11 @@ properties:
  clocks:
    maxItems: 1

  fsl,ext-reset-output:
    description:
      When set, wdog can generate external reset from the wdog_any pin.
    type: boolean

required:
  - compatible
  - interrupts
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ properties:
              - qcom,apss-wdt-ipq5018
              - qcom,apss-wdt-ipq5332
              - qcom,apss-wdt-ipq9574
              - qcom,apss-wdt-msm8226
              - qcom,apss-wdt-msm8974
              - qcom,apss-wdt-msm8994
              - qcom,apss-wdt-qcm2290
              - qcom,apss-wdt-qcs404
+25 −0
Original line number Diff line number Diff line
@@ -173,6 +173,8 @@ static int apple_wdt_probe(struct platform_device *pdev)
	if (!wdt->clk_rate)
		return -EINVAL;

	platform_set_drvdata(pdev, wdt);

	wdt->wdd.ops = &apple_wdt_ops;
	wdt->wdd.info = &apple_wdt_info;
	wdt->wdd.max_timeout = U32_MAX / wdt->clk_rate;
@@ -190,6 +192,28 @@ static int apple_wdt_probe(struct platform_device *pdev)
	return devm_watchdog_register_device(dev, &wdt->wdd);
}

static int apple_wdt_resume(struct device *dev)
{
	struct apple_wdt *wdt = dev_get_drvdata(dev);

	if (watchdog_active(&wdt->wdd) || watchdog_hw_running(&wdt->wdd))
		apple_wdt_start(&wdt->wdd);

	return 0;
}

static int apple_wdt_suspend(struct device *dev)
{
	struct apple_wdt *wdt = dev_get_drvdata(dev);

	if (watchdog_active(&wdt->wdd) || watchdog_hw_running(&wdt->wdd))
		apple_wdt_stop(&wdt->wdd);

	return 0;
}

static DEFINE_SIMPLE_DEV_PM_OPS(apple_wdt_pm_ops, apple_wdt_suspend, apple_wdt_resume);

static const struct of_device_id apple_wdt_of_match[] = {
	{ .compatible = "apple,wdt" },
	{},
@@ -200,6 +224,7 @@ static struct platform_driver apple_wdt_driver = {
	.driver = {
		.name = "apple-watchdog",
		.of_match_table = apple_wdt_of_match,
		.pm = pm_sleep_ptr(&apple_wdt_pm_ops),
	},
	.probe = apple_wdt_probe,
};
Loading