Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/arm/dts/sc57x.dtsi
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* (C) Copyright 2024 - Analog Devices, Inc.
Expand Down Expand Up @@ -113,7 +113,7 @@

&wdog {
clocks = <&clk ADSP_SC57X_CLK_CGU0_SCLK0>;
secid = <3>;
adi,secid = <3>;
};

&eth0 {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/sc58x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@

&wdog {
clocks = <&clk ADSP_SC58X_CLK_CGU0_SCLK0>;
secid = <3>;
adi,secid = <3>;
};

&eth0 {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/sc594-som.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

&wdog {
clocks = <&clk ADSP_SC594_CLK_CGU0_SCLK0>;
secid = <3>;
adi,secid = <3>;
};

&i2c0 {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/sc598-som.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@

&wdog {
clocks = <&clk ADSP_SC598_CLK_CGU0_SCLK0>;
secid = <3>;
adi,secid = <3>;
};

&i2c0 {
Expand Down
9 changes: 5 additions & 4 deletions drivers/watchdog/adi_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <clk.h>
#include <dm.h>
#include <wdt.h>
#include <dm/device_compat.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/io.h>
Expand Down Expand Up @@ -71,7 +72,7 @@
*/
iowrite32(0xc0, priv->sec_base + SEC_FCTL);
iowrite32(0xc1, priv->sec_base + SEC_FCTL);

Check warning on line 75 in drivers/watchdog/adi_wdt.c

View workflow job for this annotation

GitHub Actions / checks / checks

checkpatch: spaces preferred around that '*' (ctx:VxV) + setbits_32(priv->sec_base + SEC_SCTL0 + (3*8), 0x6); ^
/* enable SEC fault source for watchdog0 */
setbits_32(priv->sec_base + SEC_SCTL0 + (priv->secid * 8), 0x6);

Expand All @@ -96,7 +97,6 @@
struct adi_wdt_priv *priv = dev_get_priv(dev);
int ret;
struct resource res;
u32 secid;

ret = dev_read_resource_byname(dev, "rcu", &res);
if (ret)
Expand All @@ -113,10 +113,11 @@
return ret;
priv->wdt_base = devm_ioremap(dev, res.start, resource_size(&res));

ret = dev_read_u32(dev, "secid", &secid);
if (ret)
ret = dev_read_u32(dev, "adi,secid", &priv->secid);
if (ret) {
dev_err(dev, "Missing property 'adi,secid'\n");
return ret;
priv->secid = secid;
}

ret = clk_get_by_name(dev, "sclk0", &priv->clock);
if (ret < 0) {
Expand Down