linux-watchdog 6.14-rc1 tag
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iEYEABECAAYFAmeTcTkACgkQ+iyteGJfRsq+jwCgvHWRGd0AE6TUgrgBCSfQWGWZ WXkAnAyliRpcK4QPW2XZ2pKzUr+/lFF1 =o+LK -----END PGP SIGNATURE----- Merge tag 'linux-watchdog-6.14-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - Add Qualcomm IPQ5424 DT binding - da9052_wdt: add support for bootstatus bits - Other small fixes and improvements * tag 'linux-watchdog-6.14-rc1' of git://www.linux-watchdog.org/linux-watchdog: dt-bindings: watchdog: Document Qualcomm IPQ5424 watchdog: rti_wdt: Fix an OF node leak in rti_wdt_probe() watchdog: max77620: fix excess field in kerneldoc watchdog: sp805_wdt: Drop documentation of non-existent `status` member watchdog: rzv2h_wdt: Use local `dev` pointer in probe watchdog: da9052_wdt: add support for bootstatus bits watchdog: sp805: Report correct timeleft at maximum watchdog: rti: Fix off-by-one in heartbeat recovery
This commit is contained in:
commit
eda061cccd
6 changed files with 25 additions and 13 deletions
|
@ -20,6 +20,7 @@ properties:
|
|||
- qcom,kpss-wdt-ipq4019
|
||||
- qcom,apss-wdt-ipq5018
|
||||
- qcom,apss-wdt-ipq5332
|
||||
- qcom,apss-wdt-ipq5424
|
||||
- qcom,apss-wdt-ipq9574
|
||||
- qcom,apss-wdt-msm8226
|
||||
- qcom,apss-wdt-msm8974
|
||||
|
|
|
@ -135,7 +135,11 @@ static int da9052_wdt_ping(struct watchdog_device *wdt_dev)
|
|||
}
|
||||
|
||||
static const struct watchdog_info da9052_wdt_info = {
|
||||
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
|
||||
.options = WDIOF_SETTIMEOUT |
|
||||
WDIOF_KEEPALIVEPING |
|
||||
WDIOF_CARDRESET |
|
||||
WDIOF_OVERHEAT |
|
||||
WDIOF_POWERUNDER,
|
||||
.identity = "DA9052 Watchdog",
|
||||
};
|
||||
|
||||
|
@ -169,6 +173,13 @@ static int da9052_wdt_probe(struct platform_device *pdev)
|
|||
da9052_wdt->parent = dev;
|
||||
watchdog_set_drvdata(da9052_wdt, driver_data);
|
||||
|
||||
if (da9052->fault_log & DA9052_FAULTLOG_TWDERROR)
|
||||
da9052_wdt->bootstatus |= WDIOF_CARDRESET;
|
||||
if (da9052->fault_log & DA9052_FAULTLOG_TEMPOVER)
|
||||
da9052_wdt->bootstatus |= WDIOF_OVERHEAT;
|
||||
if (da9052->fault_log & DA9052_FAULTLOG_VDDFAULT)
|
||||
da9052_wdt->bootstatus |= WDIOF_POWERUNDER;
|
||||
|
||||
ret = da9052_reg_update(da9052, DA9052_CONTROL_D_REG,
|
||||
DA9052_CONTROLD_TWDSCALE, 0);
|
||||
if (ret < 0) {
|
||||
|
|
|
@ -25,7 +25,6 @@ static bool nowayout = WATCHDOG_NOWAYOUT;
|
|||
|
||||
/**
|
||||
* struct max77620_variant - Data specific to a chip variant
|
||||
* @wdt_info: watchdog descriptor
|
||||
* @reg_onoff_cnfg2: ONOFF_CNFG2 register offset
|
||||
* @reg_cnfg_glbl2: CNFG_GLBL2 register offset
|
||||
* @reg_cnfg_glbl3: CNFG_GLBL3 register offset
|
||||
|
|
|
@ -273,7 +273,8 @@ static int rti_wdt_probe(struct platform_device *pdev)
|
|||
|
||||
set_bit(WDOG_HW_RUNNING, &wdd->status);
|
||||
time_left_ms = rti_wdt_get_timeleft_ms(wdd);
|
||||
heartbeat_ms = readl(wdt->base + RTIDWDPRLD);
|
||||
/* AM62x TRM: texp = (RTIDWDPRLD + 1) * (2^13) / RTICLK1 */
|
||||
heartbeat_ms = readl(wdt->base + RTIDWDPRLD) + 1;
|
||||
heartbeat_ms <<= WDT_PRELOAD_SHIFT;
|
||||
heartbeat_ms *= 1000;
|
||||
do_div(heartbeat_ms, wdt->freq);
|
||||
|
@ -301,6 +302,7 @@ static int rti_wdt_probe(struct platform_device *pdev)
|
|||
node = of_parse_phandle(pdev->dev.of_node, "memory-region", 0);
|
||||
if (node) {
|
||||
ret = of_address_to_resource(node, 0, &res);
|
||||
of_node_put(node);
|
||||
if (ret) {
|
||||
dev_err(dev, "No memory address assigned to the region.\n");
|
||||
goto err_iomap;
|
||||
|
|
|
@ -217,24 +217,24 @@ static int rzv2h_wdt_probe(struct platform_device *pdev)
|
|||
if (IS_ERR(priv->base))
|
||||
return PTR_ERR(priv->base);
|
||||
|
||||
priv->pclk = devm_clk_get_prepared(&pdev->dev, "pclk");
|
||||
priv->pclk = devm_clk_get_prepared(dev, "pclk");
|
||||
if (IS_ERR(priv->pclk))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(priv->pclk), "no pclk");
|
||||
return dev_err_probe(dev, PTR_ERR(priv->pclk), "no pclk");
|
||||
|
||||
priv->oscclk = devm_clk_get_prepared(&pdev->dev, "oscclk");
|
||||
priv->oscclk = devm_clk_get_prepared(dev, "oscclk");
|
||||
if (IS_ERR(priv->oscclk))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(priv->oscclk), "no oscclk");
|
||||
return dev_err_probe(dev, PTR_ERR(priv->oscclk), "no oscclk");
|
||||
|
||||
priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
|
||||
priv->rstc = devm_reset_control_get_exclusive(dev, NULL);
|
||||
if (IS_ERR(priv->rstc))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(priv->rstc),
|
||||
return dev_err_probe(dev, PTR_ERR(priv->rstc),
|
||||
"failed to get cpg reset");
|
||||
|
||||
priv->wdev.max_hw_heartbeat_ms = (MILLI * MAX_TIMEOUT_CYCLES * CLOCK_DIV_BY_256) /
|
||||
clk_get_rate(priv->oscclk);
|
||||
dev_dbg(dev, "max hw timeout of %dms\n", priv->wdev.max_hw_heartbeat_ms);
|
||||
|
||||
ret = devm_pm_runtime_enable(&pdev->dev);
|
||||
ret = devm_pm_runtime_enable(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -251,7 +251,7 @@ static int rzv2h_wdt_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
dev_warn(dev, "Specified timeout invalid, using default");
|
||||
|
||||
return devm_watchdog_register_device(&pdev->dev, &priv->wdev);
|
||||
return devm_watchdog_register_device(dev, &priv->wdev);
|
||||
}
|
||||
|
||||
static const struct of_device_id rzv2h_wdt_ids[] = {
|
||||
|
|
|
@ -62,7 +62,6 @@
|
|||
* @clk: (optional) clock structure of wdt
|
||||
* @rate: (optional) clock rate when provided via properties
|
||||
* @adev: amba device structure of wdt
|
||||
* @status: current status of wdt
|
||||
* @load_val: load value to be set for current timeout
|
||||
*/
|
||||
struct sp805_wdt {
|
||||
|
@ -128,7 +127,7 @@ static unsigned int wdt_timeleft(struct watchdog_device *wdd)
|
|||
|
||||
/*If the interrupt is inactive then time left is WDTValue + WDTLoad. */
|
||||
if (!(readl_relaxed(wdt->base + WDTRIS) & INT_MASK))
|
||||
load += wdt->load_val + 1;
|
||||
load += (u64)wdt->load_val + 1;
|
||||
spin_unlock(&wdt->lock);
|
||||
|
||||
return div_u64(load, wdt->rate);
|
||||
|
|
Loading…
Add table
Reference in a new issue