Skip to content

Commit eecd231

Browse files
committed
Merge tag 'linux-watchdog-5.15-rc7' of git://www.linux-watchdog.org/linux-watchdog
Pull watchdog fixes from Wim Van Sebroeck: "I overlooked Guenters request to sent this upstream earlier, so it's a bit late in the release cycle. This contains: - Revert "watchdog: iTCO_wdt: Account for rebooting on second timeout" - sbsa: only use 32-bit accessors - sbsa: drop unneeded MODULE_ALIAS - ixp4xx_wdt: Fix address space warning - Fix OMAP watchdog early handling" * tag 'linux-watchdog-5.15-rc7' of git://www.linux-watchdog.org/linux-watchdog: watchdog: Fix OMAP watchdog early handling watchdog: ixp4xx_wdt: Fix address space warning watchdog: sbsa: drop unneeded MODULE_ALIAS watchdog: sbsa: only use 32-bit accessors Revert "watchdog: iTCO_wdt: Account for rebooting on second timeout"
2 parents fc18cc8 + cd004d8 commit eecd231

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

drivers/watchdog/iTCO_wdt.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@
7171
#define TCOBASE(p) ((p)->tco_res->start)
7272
/* SMI Control and Enable Register */
7373
#define SMI_EN(p) ((p)->smi_res->start)
74-
#define TCO_EN (1 << 13)
75-
#define GBL_SMI_EN (1 << 0)
7674

7775
#define TCO_RLD(p) (TCOBASE(p) + 0x00) /* TCO Timer Reload/Curr. Value */
7876
#define TCOv1_TMR(p) (TCOBASE(p) + 0x01) /* TCOv1 Timer Initial Value*/
@@ -357,12 +355,8 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t)
357355

358356
tmrval = seconds_to_ticks(p, t);
359357

360-
/*
361-
* If TCO SMIs are off, the timer counts down twice before rebooting.
362-
* Otherwise, the BIOS generally reboots when the SMI triggers.
363-
*/
364-
if (p->smi_res &&
365-
(inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN))
358+
/* For TCO v1 the timer counts down twice before rebooting */
359+
if (p->iTCO_version == 1)
366360
tmrval /= 2;
367361

368362
/* from the specs: */
@@ -527,7 +521,7 @@ static int iTCO_wdt_probe(struct platform_device *pdev)
527521
* Disables TCO logic generating an SMI#
528522
*/
529523
val32 = inl(SMI_EN(p));
530-
val32 &= ~TCO_EN; /* Turn off SMI clearing watchdog */
524+
val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */
531525
outl(val32, SMI_EN(p));
532526
}
533527

drivers/watchdog/ixp4xx_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ static int ixp4xx_wdt_probe(struct platform_device *pdev)
119119
iwdt = devm_kzalloc(dev, sizeof(*iwdt), GFP_KERNEL);
120120
if (!iwdt)
121121
return -ENOMEM;
122-
iwdt->base = dev->platform_data;
122+
iwdt->base = (void __iomem *)dev->platform_data;
123123

124124
/*
125125
* Retrieve rate from a fixed clock from the device tree if

drivers/watchdog/omap_wdt.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,12 @@ static int omap_wdt_probe(struct platform_device *pdev)
268268
wdev->wdog.bootstatus = WDIOF_CARDRESET;
269269
}
270270

271-
if (!early_enable)
271+
if (early_enable) {
272+
omap_wdt_start(&wdev->wdog);
273+
set_bit(WDOG_HW_RUNNING, &wdev->wdog.status);
274+
} else {
272275
omap_wdt_disable(wdev);
276+
}
273277

274278
ret = watchdog_register_device(&wdev->wdog);
275279
if (ret) {

drivers/watchdog/sbsa_gwdt.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ static u64 sbsa_gwdt_reg_read(struct sbsa_gwdt *gwdt)
130130
if (gwdt->version == 0)
131131
return readl(gwdt->control_base + SBSA_GWDT_WOR);
132132
else
133-
return readq(gwdt->control_base + SBSA_GWDT_WOR);
133+
return lo_hi_readq(gwdt->control_base + SBSA_GWDT_WOR);
134134
}
135135

136136
static void sbsa_gwdt_reg_write(u64 val, struct sbsa_gwdt *gwdt)
137137
{
138138
if (gwdt->version == 0)
139139
writel((u32)val, gwdt->control_base + SBSA_GWDT_WOR);
140140
else
141-
writeq(val, gwdt->control_base + SBSA_GWDT_WOR);
141+
lo_hi_writeq(val, gwdt->control_base + SBSA_GWDT_WOR);
142142
}
143143

144144
/*
@@ -411,4 +411,3 @@ MODULE_AUTHOR("Suravee Suthikulpanit <[email protected]>");
411411
MODULE_AUTHOR("Al Stone <[email protected]>");
412412
MODULE_AUTHOR("Timur Tabi <[email protected]>");
413413
MODULE_LICENSE("GPL v2");
414-
MODULE_ALIAS("platform:" DRV_NAME);

0 commit comments

Comments
 (0)