Skip to content

Commit 89d714a

Browse files
committed
Merge tag 'linux-watchdog-5.16-rc1' of git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck: - f71808e_wdt: convert to watchdog framework - db8500_wdt: Rename driver (was ux500_wdt.c) - sunxi: Add compatibles for R329 and D1 - mtk: add disable_wdt_extrst support - several other small fixes and improvements * tag 'linux-watchdog-5.16-rc1' of git://www.linux-watchdog.org/linux-watchdog: (30 commits) watchdog: db8500_wdt: Rename symbols watchdog: db8500_wdt: Rename driver watchdog: ux500_wdt: Drop platform data watchdog: bcm63xx_wdt: fix fallthrough warning watchdog: iTCO_wdt: No need to stop the timer in probe watchdog: s3c2410: describe driver in KConfig watchdog: sp5100_tco: Add support for get_timeleft watchdog: mtk: add disable_wdt_extrst support dt-bindings: watchdog: mtk-wdt: add disable_wdt_extrst support watchdog: rza_wdt: Use semicolons instead of commas watchdog: mlx-wdt: Use regmap_write_bits() watchdog: rti-wdt: Make use of the helper function devm_platform_ioremap_resource() watchdog: iTCO_wdt: Make use of the helper function devm_platform_ioremap_resource() watchdog: ar7_wdt: Make use of the helper function devm_platform_ioremap_resource_byname() watchdog: sunxi_wdt: Add support for D1 dt-bindings: watchdog: sunxi: Add compatibles for D1 ar7: fix kernel builds for compiler test dt-bindings: watchdog: sunxi: Add compatibles for R329 watchdog: meson_gxbb_wdt: add timeout parameter watchdog: meson_gxbb_wdt: add nowayout parameter ...
2 parents bd485d2 + c738888 commit 89d714a

File tree

22 files changed

+384
-795
lines changed

22 files changed

+384
-795
lines changed

Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,33 @@ properties:
2424
- allwinner,sun50i-a100-wdt
2525
- allwinner,sun50i-h6-wdt
2626
- allwinner,sun50i-h616-wdt
27+
- allwinner,sun50i-r329-wdt
28+
- allwinner,sun50i-r329-wdt-reset
2729
- const: allwinner,sun6i-a31-wdt
2830
- items:
2931
- const: allwinner,suniv-f1c100s-wdt
3032
- const: allwinner,sun4i-a10-wdt
33+
- const: allwinner,sun20i-d1-wdt
34+
- items:
35+
- const: allwinner,sun20i-d1-wdt-reset
36+
- const: allwinner,sun20i-d1-wdt
3137

3238
reg:
3339
maxItems: 1
3440

3541
clocks:
36-
maxItems: 1
42+
minItems: 1
43+
maxItems: 2
44+
items:
45+
- description: High-frequency oscillator input, divided internally
46+
- description: Low-frequency oscillator input, only found on some variants
47+
48+
clock-names:
49+
minItems: 1
50+
maxItems: 2
51+
items:
52+
- const: hosc
53+
- const: losc
3754

3855
interrupts:
3956
maxItems: 1
@@ -44,6 +61,35 @@ required:
4461
- clocks
4562
- interrupts
4663

64+
if:
65+
properties:
66+
compatible:
67+
contains:
68+
enum:
69+
- allwinner,sun20i-d1-wdt
70+
- allwinner,sun20i-d1-wdt-reset
71+
- allwinner,sun50i-r329-wdt
72+
- allwinner,sun50i-r329-wdt-reset
73+
74+
then:
75+
properties:
76+
clocks:
77+
minItems: 2
78+
79+
clock-names:
80+
minItems: 2
81+
82+
required:
83+
- clock-names
84+
85+
else:
86+
properties:
87+
clocks:
88+
maxItems: 1
89+
90+
clock-names:
91+
maxItems: 1
92+
4793
unevaluatedProperties: false
4894

4995
examples:

Documentation/devicetree/bindings/watchdog/mtk-wdt.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Required properties:
2222
- reg : Specifies base physical address and size of the registers.
2323

2424
Optional properties:
25+
- mediatek,disable-extrst: disable send output reset signal
2526
- interrupts: Watchdog pre-timeout (bark) interrupt.
2627
- timeout-sec: contains the watchdog timeout in seconds.
2728
- #reset-cells: Should be 1.
@@ -31,6 +32,7 @@ Example:
3132
watchdog: watchdog@10007000 {
3233
compatible = "mediatek,mt8183-wdt",
3334
"mediatek,mt6589-wdt";
35+
mediatek,disable-extrst;
3436
reg = <0 0x10007000 0 0x100>;
3537
interrupts = <GIC_SPI 139 IRQ_TYPE_NONE>;
3638
timeout-sec = <10>;

drivers/mfd/db8500-prcmu.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#include <linux/mfd/abx500/ab8500.h>
3737
#include <linux/regulator/db8500-prcmu.h>
3838
#include <linux/regulator/machine.h>
39-
#include <linux/platform_data/ux500_wdt.h>
4039
#include "db8500-prcmu-regs.h"
4140

4241
/* Index of different voltages to be used when accessing AVSData */
@@ -2939,18 +2938,8 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
29392938
},
29402939
};
29412940

2942-
static struct ux500_wdt_data db8500_wdt_pdata = {
2943-
.timeout = 600, /* 10 minutes */
2944-
.has_28_bits_resolution = true,
2945-
};
2946-
29472941
static const struct mfd_cell common_prcmu_devs[] = {
2948-
{
2949-
.name = "ux500_wdt",
2950-
.platform_data = &db8500_wdt_pdata,
2951-
.pdata_size = sizeof(db8500_wdt_pdata),
2952-
.id = -1,
2953-
},
2942+
MFD_CELL_NAME("db8500_wdt"),
29542943
MFD_CELL_NAME("db8500-cpuidle"),
29552944
};
29562945

drivers/watchdog/Kconfig

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -496,16 +496,18 @@ config S3C2410_WATCHDOG
496496
select WATCHDOG_CORE
497497
select MFD_SYSCON if ARCH_EXYNOS
498498
help
499-
Watchdog timer block in the Samsung SoCs. This will reboot
500-
the system when the timer expires with the watchdog enabled.
499+
Watchdog timer block in the Samsung S3C24xx, S3C64xx, S5Pv210 and
500+
Exynos SoCs. This will reboot the system when the timer expires with
501+
the watchdog enabled.
501502

502503
The driver is limited by the speed of the system's PCLK
503504
signal, so with reasonably fast systems (PCLK around 50-66MHz)
504505
then watchdog intervals of over approximately 20seconds are
505506
unavailable.
506507

508+
Choose Y/M here only if you build for such Samsung SoC.
507509
The driver can be built as a module by choosing M, and will
508-
be called s3c2410_wdt
510+
be called s3c2410_wdt.
509511

510512
config SA1100_WATCHDOG
511513
tristate "SA1100/PXA2xx watchdog"
@@ -561,22 +563,6 @@ config PNX4008_WATCHDOG
561563

562564
Say N if you are unsure.
563565

564-
config IOP_WATCHDOG
565-
tristate "IOP Watchdog"
566-
depends on ARCH_IOP13XX
567-
select WATCHDOG_NOWAYOUT if (ARCH_IOP32X || ARCH_IOP33X)
568-
help
569-
Say Y here if to include support for the watchdog timer
570-
in the Intel IOP3XX & IOP13XX I/O Processors. This driver can
571-
be built as a module by choosing M. The module will
572-
be called iop_wdt.
573-
574-
Note: The IOP13XX watchdog does an Internal Bus Reset which will
575-
affect both cores and the peripherals of the IOP. The ATU-X
576-
and/or ATUe configuration registers will remain intact, but if
577-
operating as an Root Complex and/or Central Resource, the PCI-X
578-
and/or PCIe busses will also be reset. THIS IS A VERY BIG HAMMER.
579-
580566
config DAVINCI_WATCHDOG
581567
tristate "DaVinci watchdog"
582568
depends on ARCH_DAVINCI || ARCH_KEYSTONE || COMPILE_TEST
@@ -743,17 +729,17 @@ config IMX7ULP_WDT
743729
To compile this driver as a module, choose M here: the
744730
module will be called imx7ulp_wdt.
745731

746-
config UX500_WATCHDOG
747-
tristate "ST-Ericsson Ux500 watchdog"
732+
config DB500_WATCHDOG
733+
tristate "ST-Ericsson DB800 watchdog"
748734
depends on MFD_DB8500_PRCMU
749735
select WATCHDOG_CORE
750736
default y
751737
help
752738
Say Y here to include Watchdog timer support for the watchdog
753-
existing in the prcmu of ST-Ericsson Ux500 series platforms.
739+
existing in the prcmu of ST-Ericsson DB8500 platform.
754740

755741
To compile this driver as a module, choose M here: the
756-
module will be called ux500_wdt.
742+
module will be called db500_wdt.
757743

758744
config RETU_WATCHDOG
759745
tristate "Retu watchdog"
@@ -1052,6 +1038,7 @@ config EBC_C384_WDT
10521038
config F71808E_WDT
10531039
tristate "Fintek F718xx, F818xx Super I/O Watchdog"
10541040
depends on X86
1041+
select WATCHDOG_CORE
10551042
help
10561043
This is the driver for the hardware watchdog on the Fintek F71808E,
10571044
F71862FG, F71868, F71869, F71882FG, F71889FG, F81803, F81865, and
@@ -1679,7 +1666,7 @@ config SIBYTE_WDOG
16791666

16801667
config AR7_WDT
16811668
tristate "TI AR7 Watchdog Timer"
1682-
depends on AR7 || (MIPS && COMPILE_TEST)
1669+
depends on AR7 || (MIPS && 32BIT && COMPILE_TEST)
16831670
help
16841671
Hardware driver for the TI AR7 Watchdog Timer.
16851672

drivers/watchdog/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ obj-$(CONFIG_SAMA5D4_WATCHDOG) += sama5d4_wdt.o
5656
obj-$(CONFIG_DW_WATCHDOG) += dw_wdt.o
5757
obj-$(CONFIG_EP93XX_WATCHDOG) += ep93xx_wdt.o
5858
obj-$(CONFIG_PNX4008_WATCHDOG) += pnx4008_wdt.o
59-
obj-$(CONFIG_IOP_WATCHDOG) += iop_wdt.o
6059
obj-$(CONFIG_DAVINCI_WATCHDOG) += davinci_wdt.o
6160
obj-$(CONFIG_K3_RTI_WATCHDOG) += rti_wdt.o
6261
obj-$(CONFIG_ORION_WATCHDOG) += orion_wdt.o
@@ -69,7 +68,7 @@ obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o
6968
obj-$(CONFIG_IMX2_WDT) += imx2_wdt.o
7069
obj-$(CONFIG_IMX_SC_WDT) += imx_sc_wdt.o
7170
obj-$(CONFIG_IMX7ULP_WDT) += imx7ulp_wdt.o
72-
obj-$(CONFIG_UX500_WATCHDOG) += ux500_wdt.o
71+
obj-$(CONFIG_DB500_WATCHDOG) += db8500_wdt.o
7372
obj-$(CONFIG_RETU_WATCHDOG) += retu_wdt.o
7473
obj-$(CONFIG_BCM2835_WDT) += bcm2835_wdt.o
7574
obj-$(CONFIG_MOXART_WDT) += moxart_wdt.o

drivers/watchdog/ar7_wdt.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ static DEFINE_SPINLOCK(wdt_lock);
6363
/* XXX currently fixed, allows max margin ~68.72 secs */
6464
#define prescale_value 0xffff
6565

66-
/* Resource of the WDT registers */
67-
static struct resource *ar7_regs_wdt;
6866
/* Pointer to the remapped WDT IO space */
6967
static struct ar7_wdt *ar7_wdt;
7068

@@ -265,9 +263,7 @@ static int ar7_wdt_probe(struct platform_device *pdev)
265263
{
266264
int rc;
267265

268-
ar7_regs_wdt =
269-
platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
270-
ar7_wdt = devm_ioremap_resource(&pdev->dev, ar7_regs_wdt);
266+
ar7_wdt = devm_platform_ioremap_resource_byname(pdev, "regs");
271267
if (IS_ERR(ar7_wdt))
272268
return PTR_ERR(ar7_wdt);
273269

drivers/watchdog/bcm63xx_wdt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ static long bcm63xx_wdt_ioctl(struct file *file, unsigned int cmd,
207207

208208
bcm63xx_wdt_pet();
209209

210+
fallthrough;
211+
210212
case WDIOC_GETTIMEOUT:
211213
return put_user(wdt_time, p);
212214

drivers/watchdog/da9062_wdt.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ static int da9062_wdt_ping(struct watchdog_device *wdd)
117117
struct da9062_watchdog *wdt = watchdog_get_drvdata(wdd);
118118
int ret;
119119

120+
/*
121+
* Prevent pings from occurring late in system poweroff/reboot sequence
122+
* and possibly locking out restart handler from accessing i2c bus.
123+
*/
124+
if (system_state > SYSTEM_RUNNING)
125+
return 0;
126+
120127
ret = da9062_reset_watchdog_timer(wdt);
121128
if (ret)
122129
dev_err(wdt->hw->dev, "Failed to ping the watchdog (err = %d)\n",

drivers/watchdog/da9063_wdt.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ static int da9063_wdt_ping(struct watchdog_device *wdd)
121121
struct da9063 *da9063 = watchdog_get_drvdata(wdd);
122122
int ret;
123123

124+
/*
125+
* Prevent pings from occurring late in system poweroff/reboot sequence
126+
* and possibly locking out restart handler from accessing i2c bus.
127+
*/
128+
if (system_state > SYSTEM_RUNNING)
129+
return 0;
130+
124131
ret = regmap_write(da9063->regmap, DA9063_REG_CONTROL_F,
125132
DA9063_WATCHDOG);
126133
if (ret)

0 commit comments

Comments
 (0)