From 8d9a9c91cc295a22957c2dcc62ea30f9360ea59b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=99=88=E4=BA=AE?= Date: Thu, 27 Mar 2014 19:37:08 -0700 Subject: [PATCH] rk3288: add watchdot support --- arch/arm/boot/dts/rk3288.dtsi | 13 +++++++++++++ drivers/watchdog/Kconfig | 25 ------------------------- drivers/watchdog/Makefile | 2 +- drivers/watchdog/rk29_wdt.c | 2 +- 4 files changed, 15 insertions(+), 27 deletions(-) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index 95813da0e493..286e0181d7b4 100755 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm/boot/dts/rk3288.dtsi @@ -231,6 +231,19 @@ rockchip,count-up = <1>; }; + watchdog:wdt@2004c000 { + compatible = "rockchip,watch dog"; + reg = <0xff800000 0x100>; + clocks = <&pclk_pd_alive>; + clock-names = "pclk_wdt"; + interrupts = ; + rockchip,irq = <0>; + rockchip,timeout = <60>; + rockchip,atboot = <1>; + rockchip,debug = <0>; + status = "disable"; + }; + amba { #address-cells = <1>; #size-cells = <1>; diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index d165a2557595..e89fc3133972 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -107,31 +107,6 @@ config WM8350_WATCHDOG # ARM Architecture -config RK29_WATCHDOG - tristate "RK29 watchdog" - help - Watchdog timer embedded into RK29xx chips. This will reboot your - system when the timeout is reached. - -config RK29_FEED_DOG_BY_INTE - bool "feed watchdog by interrupt" - depends on RK29_WATCHDOG - -config RK29_WATCHDOG_ATBOOT - bool "start watchdog at system boot" - depends on RK29_WATCHDOG - -config RK29_WATCHDOG_DEFAULT_TIME - int "set watchdog time out value (unit second)" - default 0 - depends on RK29_WATCHDOG - help - the real time out value is two times more than the setting value - -config RK29_WATCHDOG_DEBUG - bool "enable watchdog debug" - depends on RK29_WATCHDOG - config ARM_SP805_WATCHDOG tristate "ARM SP805 Watchdog" depends on ARM && ARM_AMBA diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile index 63ad0297c06f..7fe3d99052f2 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -50,7 +50,7 @@ obj-$(CONFIG_ORION_WATCHDOG) += orion_wdt.o obj-$(CONFIG_COH901327_WATCHDOG) += coh901327_wdt.o obj-$(CONFIG_STMP3XXX_RTC_WATCHDOG) += stmp3xxx_rtc_wdt.o obj-$(CONFIG_NUC900_WATCHDOG) += nuc900_wdt.o -obj-$(CONFIG_RK29_WATCHDOG) += rk29_wdt.o +obj-$(CONFIG_ARCH_ROCKCHIP) += rk29_wdt.o obj-$(CONFIG_TS72XX_WATCHDOG) += ts72xx_wdt.o obj-$(CONFIG_IMX2_WDT) += imx2_wdt.o obj-$(CONFIG_UX500_WATCHDOG) += ux500_wdt.o diff --git a/drivers/watchdog/rk29_wdt.c b/drivers/watchdog/rk29_wdt.c index 990b6d145575..78af00773a81 100644 --- a/drivers/watchdog/rk29_wdt.c +++ b/drivers/watchdog/rk29_wdt.c @@ -75,7 +75,7 @@ */ static int nowayout = WATCHDOG_NOWAYOUT; -static int tmr_margin = CONFIG_RK29_WATCHDOG_DEFAULT_TIME; +static int tmr_margin = 100;//CONFIG_RK29_WATCHDOG_DEFAULT_TIME; #ifdef CONFIG_RK29_WATCHDOG_ATBOOT static int tmr_atboot = 1; #else -- 2.34.1