Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Pull watchdog updates from Wim Van Sebroeck:
 - lots of devm_ conversions and cleanup
 - platform_set_drvdata cleanups
 - s3c2410: dev_err/dev_info + dev_pm_ops
 - watchdog_core: don't try to stop device if not running fix
 - wdrtas: use print_hex_dump
 - xilinx cleanups
 - orion_wdt fixes
 - softdog cleanup
 - hpwdt: check on UEFI bits
 - deletion of mpcore_wdt driver
 - addition of broadcom BCM2835 watchdog timer driver
 - addition of MEN A21 watcdog devices

* git://www.linux-watchdog.org/linux-watchdog: (38 commits)
  watchdog: hpwdt: Add check for UEFI bits
  watchdog: softdog: remove replaceable ping operation
  watchdog: New watchdog driver for MEN A21 watchdogs
  Watchdog: fix clearing of the watchdog interrupt
  Watchdog: allow orion_wdt to be built for Dove
  watchdog: Add Broadcom BCM2835 watchdog timer driver
  watchdog: delete mpcore_wdt driver
  watchdog: xilinx: Setup the origin compatible string
  watchdog: xilinx: Fix driver header
  watchdog: wdrtas: don't use custom version of print_hex_dump
  watchdog: core: don't try to stop device if not running
  watchdog: jz4740: Pass device to clk_get
  watchdog: twl4030: Remove redundant platform_set_drvdata()
  watchdog: mpcore: Remove redundant platform_set_drvdata()
  watchdog: da9055: use platform_{get,set}_drvdata()
  watchdog: da9052: use platform_{get,set}_drvdata()
  watchdog: cpwd: use platform_{get,set}_drvdata()
  watchdog: s3c2410_wdt: convert s3c2410wdt to dev_pm_ops
  watchdog: s3c2410_wdt: use dev_err()/dev_info() instead of pr_err()/pr_info()
  watchdog: wm831x: use platform_{get,set}_drvdata()
  ...
  • Loading branch information
torvalds committed Jul 13, 2013
2 parents c552441 + cce78da commit 833e683
Show file tree
Hide file tree
Showing 39 changed files with 629 additions and 740 deletions.
25 changes: 25 additions & 0 deletions Documentation/devicetree/bindings/gpio/men-a021-wdt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Bindings for MEN A21 Watchdog device connected to GPIO lines

Required properties:
- compatible: "men,a021-wdt"
- gpios: Specifies the pins that control the Watchdog, order:
1: Watchdog enable
2: Watchdog fast-mode
3: Watchdog trigger
4: Watchdog reset cause bit 0
5: Watchdog reset cause bit 1
6: Watchdog reset cause bit 2

Optional properties:
- None

Example:
watchdog {
compatible ="men,a021-wdt";
gpios = <&gpio3 9 1 /* WD_EN */
&gpio3 10 1 /* WD_FAST */
&gpio3 11 1 /* WD_TRIG */
&gpio3 6 1 /* RST_CAUSE[0] */
&gpio3 7 1 /* RST_CAUSE[1] */
&gpio3 8 1>; /* RST_CAUSE[2] */
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ Required properties:
- compatible : should be "brcm,bcm2835-pm-wdt"
- reg : Specifies base physical address and size of the registers.

Optional properties:

- timeout-sec : Contains the watchdog timeout in seconds

Example:

watchdog {
compatible = "brcm,bcm2835-pm-wdt";
reg = <0x7e100000 0x28>;
timeout-sec = <10>;
};
8 changes: 0 additions & 8 deletions Documentation/watchdog/watchdog-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,6 @@ reset: Watchdog Interrupt/Reset Mode. 0 = interrupt, 1 = reset
nowayout: Watchdog cannot be stopped once started
(default=kernel config parameter)
-------------------------------------------------
mpcore_wdt:
mpcore_margin: MPcore timer margin in seconds.
(0 < mpcore_margin < 65536, default=60)
nowayout: Watchdog cannot be stopped once started
(default=kernel config parameter)
mpcore_noboot: MPcore watchdog action, set to 1 to ignore reboots,
0 to reboot (default=0
-------------------------------------------------
mv64x60_wdt:
nowayout: Watchdog cannot be stopped once started
(default=kernel config parameter)
Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5387,6 +5387,12 @@ F: drivers/mtd/
F: include/linux/mtd/
F: include/uapi/mtd/

MEN A21 WATCHDOG DRIVER
M: Johannes Thumshirn <[email protected]>
L: [email protected]
S: Supported
F: drivers/watchdog/mena21_wdt.c

METAG ARCHITECTURE
M: James Hogan <[email protected]>
S: Supported
Expand Down
1 change: 0 additions & 1 deletion arch/arm/configs/spear13xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_PL061=y
# CONFIG_HWMON is not set
CONFIG_WATCHDOG=y
CONFIG_MPCORE_WATCHDOG=y
# CONFIG_HID_SUPPORT is not set
CONFIG_USB=y
# CONFIG_USB_DEVICE_CLASS is not set
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-dove/include/mach/bridge-regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c)
#define SOFT_RESET 0x00000001

#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE + 0x0110)
#define BRIDGE_INT_TIMER1_CLR (~0x0004)

#define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE + 0x0200)
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-kirkwood/include/mach/bridge-regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@
#define CPU_RESET 0x00000002

#define RSTOUTn_MASK (BRIDGE_VIRT_BASE + 0x0108)
#define WDT_RESET_OUT_EN 0x00000002
#define SOFT_RESET_OUT_EN 0x00000004

#define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE + 0x010c)
#define SOFT_RESET 0x00000001

#define BRIDGE_CAUSE (BRIDGE_VIRT_BASE + 0x0110)
#define WDT_INT_REQ 0x0008

#define BRIDGE_INT_TIMER1_CLR (~0x0004)

Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-orion5x/include/mach/bridge-regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@
#define CPU_CTRL (ORION5X_BRIDGE_VIRT_BASE + 0x104)

#define RSTOUTn_MASK (ORION5X_BRIDGE_VIRT_BASE + 0x108)
#define WDT_RESET_OUT_EN 0x0002

#define CPU_SOFT_RESET (ORION5X_BRIDGE_VIRT_BASE + 0x10c)

#define BRIDGE_CAUSE (ORION5X_BRIDGE_VIRT_BASE + 0x110)

#define POWER_MNG_CTRL_REG (ORION5X_BRIDGE_VIRT_BASE + 0x11C)

#define WDT_INT_REQ 0x0008

#define BRIDGE_INT_TIMER1_CLR (~0x0004)

#define MAIN_IRQ_CAUSE (ORION5X_BRIDGE_VIRT_BASE + 0x200)
Expand Down
34 changes: 24 additions & 10 deletions drivers/watchdog/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,6 @@ config DW_WATCHDOG
To compile this driver as a module, choose M here: the
module will be called dw_wdt.

config MPCORE_WATCHDOG
tristate "MPcore watchdog"
depends on HAVE_ARM_TWD
help
Watchdog timer embedded into the MPcore system.

To compile this driver as a module, choose M here: the
module will be called mpcore_wdt.

config EP93XX_WATCHDOG
tristate "EP93xx Watchdog"
depends on ARCH_EP93XX
Expand Down Expand Up @@ -291,7 +282,7 @@ config DAVINCI_WATCHDOG

config ORION_WATCHDOG
tristate "Orion watchdog"
depends on ARCH_ORION5X || ARCH_KIRKWOOD
depends on ARCH_ORION5X || ARCH_KIRKWOOD || ARCH_DOVE
select WATCHDOG_CORE
help
Say Y here if to include support for the watchdog timer
Expand Down Expand Up @@ -1109,6 +1100,17 @@ config BCM63XX_WDT
To compile this driver as a loadable module, choose M here.
The module will be called bcm63xx_wdt.

config BCM2835_WDT
tristate "Broadcom BCM2835 hardware watchdog"
depends on ARCH_BCM2835
select WATCHDOG_CORE
help
Watchdog driver for the built in watchdog hardware in Broadcom
BCM2835 SoC.

To compile this driver as a loadable module, choose M here.
The module will be called bcm2835_wdt.

config LANTIQ_WDT
tristate "Lantiq SoC watchdog"
depends on LANTIQ
Expand Down Expand Up @@ -1183,6 +1185,18 @@ config BOOKE_WDT_DEFAULT_TIMEOUT

The value can be overridden by the wdt_period command-line parameter.

config MEN_A21_WDT
tristate "MEN A21 VME CPU Carrier Board Watchdog Timer"
select WATCHDOG_CORE
depends on GPIOLIB
help
Watchdog driver for MEN A21 VMEbus CPU Carrier Boards.

The driver can also be built as a module. If so, the module will be
called mena21_wdt.

If unsure select N here.

# PPC64 Architecture

config WATCHDOG_RTAS
Expand Down
3 changes: 2 additions & 1 deletion drivers/watchdog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ obj-$(CONFIG_KS8695_WATCHDOG) += ks8695_wdt.o
obj-$(CONFIG_S3C2410_WATCHDOG) += s3c2410_wdt.o
obj-$(CONFIG_SA1100_WATCHDOG) += sa1100_wdt.o
obj-$(CONFIG_DW_WATCHDOG) += dw_wdt.o
obj-$(CONFIG_MPCORE_WATCHDOG) += mpcore_wdt.o
obj-$(CONFIG_EP93XX_WATCHDOG) += ep93xx_wdt.o
obj-$(CONFIG_PNX4008_WATCHDOG) += pnx4008_wdt.o
obj-$(CONFIG_IOP_WATCHDOG) += iop_wdt.o
Expand All @@ -54,6 +53,7 @@ obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o
obj-$(CONFIG_IMX2_WDT) += imx2_wdt.o
obj-$(CONFIG_UX500_WATCHDOG) += ux500_wdt.o
obj-$(CONFIG_RETU_WATCHDOG) += retu_wdt.o
obj-$(CONFIG_BCM2835_WDT) += bcm2835_wdt.o

# AVR32 Architecture
obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o
Expand Down Expand Up @@ -144,6 +144,7 @@ obj-$(CONFIG_8xxx_WDT) += mpc8xxx_wdt.o
obj-$(CONFIG_MV64X60_WDT) += mv64x60_wdt.o
obj-$(CONFIG_PIKA_WDT) += pika_wdt.o
obj-$(CONFIG_BOOKE_WDT) += booke_wdt.o
obj-$(CONFIG_MEN_A21_WDT) += mena21_wdt.o

# PPC64 Architecture
obj-$(CONFIG_WATCHDOG_RTAS) += wdrtas.o
Expand Down
17 changes: 5 additions & 12 deletions drivers/watchdog/at32ap700x_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,14 @@ static int __init at32_wdt_probe(struct platform_device *pdev)
return -ENXIO;
}

wdt = kzalloc(sizeof(struct wdt_at32ap700x), GFP_KERNEL);
wdt = devm_kzalloc(&pdev->dev, sizeof(struct wdt_at32ap700x),
GFP_KERNEL);
if (!wdt) {
dev_dbg(&pdev->dev, "no memory for wdt structure\n");
return -ENOMEM;
}

wdt->regs = ioremap(regs->start, resource_size(regs));
wdt->regs = devm_ioremap(&pdev->dev, regs->start, resource_size(regs));
if (!wdt->regs) {
ret = -ENOMEM;
dev_dbg(&pdev->dev, "could not map I/O memory\n");
Expand All @@ -342,7 +343,7 @@ static int __init at32_wdt_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "CPU must be reset with external "
"reset or POR due to silicon errata.\n");
ret = -EIO;
goto err_iounmap;
goto err_free;
} else {
wdt->users = 0;
}
Expand All @@ -364,7 +365,7 @@ static int __init at32_wdt_probe(struct platform_device *pdev)
ret = misc_register(&wdt->miscdev);
if (ret) {
dev_dbg(&pdev->dev, "failed to register wdt miscdev\n");
goto err_register;
goto err_free;
}

dev_info(&pdev->dev,
Expand All @@ -373,12 +374,7 @@ static int __init at32_wdt_probe(struct platform_device *pdev)

return 0;

err_register:
platform_set_drvdata(pdev, NULL);
err_iounmap:
iounmap(wdt->regs);
err_free:
kfree(wdt);
wdt = NULL;
return ret;
}
Expand All @@ -391,10 +387,7 @@ static int __exit at32_wdt_remove(struct platform_device *pdev)
at32_wdt_stop();

misc_deregister(&wdt->miscdev);
iounmap(wdt->regs);
kfree(wdt);
wdt = NULL;
platform_set_drvdata(pdev, NULL);
}
return 0;
}
Expand Down
Loading

0 comments on commit 833e683

Please sign in to comment.