Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

watchdog: davinci: reuse driver for keystone arch

The keystone arch uses the same IP watchdog, so add "ti,keystone-wdt"
compatible and correct identity.

The Keystone arch is using clocks in DT and source clock for watchdog
has to be specified, so add this to binding.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

authored by

Ivan Khoronzhuk and committed by
Wim Van Sebroeck
8832b200 4fa5daa9

+13 -5
+10 -2
Documentation/devicetree/bindings/watchdog/davinci-wdt.txt
··· 1 - DaVinci Watchdog Timer (WDT) Controller 1 + Texas Instruments DaVinci/Keystone Watchdog Timer (WDT) Controller 2 2 3 3 Required properties: 4 - - compatible : Should be "ti,davinci-wdt" 4 + - compatible : Should be "ti,davinci-wdt", "ti,keystone-wdt" 5 5 - reg : Should contain WDT registers location and length 6 6 7 7 Optional properties: 8 8 - timeout-sec : Contains the watchdog timeout in seconds 9 + - clocks : the clock feeding the watchdog timer. 10 + Needed if platform uses clocks. 11 + See clock-bindings.txt 12 + 13 + Documentation: 14 + Davinci DM646x - http://www.ti.com/lit/ug/spruer5b/spruer5b.pdf 15 + Keystone - http://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf 9 16 10 17 Examples: 11 18 ··· 20 13 compatible = "ti,davinci-wdt"; 21 14 reg = <0x02320000 0x80>; 22 15 timeout-sec = <30>; 16 + clocks = <&clkwdtimer0>; 23 17 };
+2 -2
drivers/watchdog/Kconfig
··· 270 270 271 271 config DAVINCI_WATCHDOG 272 272 tristate "DaVinci watchdog" 273 - depends on ARCH_DAVINCI 273 + depends on ARCH_DAVINCI || ARCH_KEYSTONE 274 274 select WATCHDOG_CORE 275 275 help 276 276 Say Y here if to include support for the watchdog timer 277 - in the DaVinci DM644x/DM646x processors. 277 + in the DaVinci DM644x/DM646x or Keystone processors. 278 278 To compile this driver as a module, choose M here: the 279 279 module will be called davinci_wdt. 280 280
+1 -1
drivers/watchdog/davinci_wdt.c
··· 143 143 144 144 static const struct watchdog_info davinci_wdt_info = { 145 145 .options = WDIOF_KEEPALIVEPING, 146 - .identity = "DaVinci Watchdog", 146 + .identity = "DaVinci/Keystone Watchdog", 147 147 }; 148 148 149 149 static const struct watchdog_ops davinci_wdt_ops = {