diff options
| -rw-r--r-- | drivers/watchdog/Kconfig | 17 | ||||
| -rw-r--r-- | drivers/watchdog/booke_wdt.c | 8 | 
2 files changed, 18 insertions, 7 deletions
| diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index a6812eb31fa1..c356146bd712 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
| @@ -966,6 +966,23 @@ config BOOKE_WDT | |||
| 966 | Please see Documentation/watchdog/watchdog-api.txt for | 966 | Please see Documentation/watchdog/watchdog-api.txt for | 
| 967 | more information. | 967 | more information. | 
| 968 | 968 | ||
| 969 | config BOOKE_WDT_DEFAULT_TIMEOUT | ||
| 970 | int "PowerPC Book-E Watchdog Timer Default Timeout" | ||
| 971 | depends on BOOKE_WDT | ||
| 972 | default 38 if FSL_BOOKE | ||
| 973 | range 0 63 if FSL_BOOKE | ||
| 974 | default 3 if !FSL_BOOKE | ||
| 975 | range 0 3 if !FSL_BOOKE | ||
| 976 | help | ||
| 977 | Select the default watchdog timer period to be used by the PowerPC | ||
| 978 | Book-E watchdog driver. A watchdog "event" occurs when the bit | ||
| 979 | position represented by this number transitions from zero to one. | ||
| 980 | |||
| 981 | For Freescale Book-E processors, this is a number between 0 and 63. | ||
| 982 | For other Book-E processors, this is a number between 0 and 3. | ||
| 983 | |||
| 984 | The value can be overidden by the wdt_period command-line parameter. | ||
| 985 | |||
| 969 | # PPC64 Architecture | 986 | # PPC64 Architecture | 
| 970 | 987 | ||
| 971 | config WATCHDOG_RTAS | 988 | config WATCHDOG_RTAS | 
| diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index a9899981fd97..d11ffb091b0d 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c | |||
| @@ -33,14 +33,8 @@ | |||
| 33 | * occur, and the final time the board will reset. | 33 | * occur, and the final time the board will reset. | 
| 34 | */ | 34 | */ | 
| 35 | 35 | ||
| 36 | #ifdef CONFIG_FSL_BOOKE | ||
| 37 | #define WDT_PERIOD_DEFAULT 38 /* Ex. wdt_period=28 bus=333Mhz,reset=~40sec */ | ||
| 38 | #else | ||
| 39 | #define WDT_PERIOD_DEFAULT 3 /* Refer to the PPC40x and PPC4xx manuals */ | ||
| 40 | #endif /* for timing information */ | ||
| 41 | |||
| 42 | u32 booke_wdt_enabled; | 36 | u32 booke_wdt_enabled; | 
| 43 | u32 booke_wdt_period = WDT_PERIOD_DEFAULT; | 37 | u32 booke_wdt_period = CONFIG_BOOKE_WDT_DEFAULT_TIMEOUT; | 
| 44 | 38 | ||
| 45 | #ifdef CONFIG_FSL_BOOKE | 39 | #ifdef CONFIG_FSL_BOOKE | 
| 46 | #define WDTP(x) ((((x)&0x3)<<30)|(((x)&0x3c)<<15)) | 40 | #define WDTP(x) ((((x)&0x3)<<30)|(((x)&0x3c)<<15)) | 
