mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 22:50:41 +00:00
watchdog: keembay: MACRO for WDT enable and disable values
Introduced MACRO's for WDT enable and disable values for better readability Reviewed-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Kris Pan <kris.pan@intel.com> Signed-off-by: Shruthi Sanil <shruthi.sanil@intel.com> Link: https://lore.kernel.org/r/20210517174953.19404-8-shruthi.sanil@intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
parent
9eb2526927
commit
624873f1e7
@ -27,6 +27,8 @@
|
||||
#define WDT_TO_INT_MASK BIT(9)
|
||||
#define WDT_ISR_CLEAR 0x8200ff18
|
||||
#define WDT_UNLOCK 0xf1d0dead
|
||||
#define WDT_DISABLE 0x0
|
||||
#define WDT_ENABLE 0x1
|
||||
#define WDT_LOAD_MAX U32_MAX
|
||||
#define WDT_LOAD_MIN 1
|
||||
#define WDT_TIMEOUT 5
|
||||
@ -84,7 +86,7 @@ static int keembay_wdt_start(struct watchdog_device *wdog)
|
||||
{
|
||||
struct keembay_wdt *wdt = watchdog_get_drvdata(wdog);
|
||||
|
||||
keembay_wdt_writel(wdt, TIM_WDOG_EN, 1);
|
||||
keembay_wdt_writel(wdt, TIM_WDOG_EN, WDT_ENABLE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -93,7 +95,7 @@ static int keembay_wdt_stop(struct watchdog_device *wdog)
|
||||
{
|
||||
struct keembay_wdt *wdt = watchdog_get_drvdata(wdog);
|
||||
|
||||
keembay_wdt_writel(wdt, TIM_WDOG_EN, 0);
|
||||
keembay_wdt_writel(wdt, TIM_WDOG_EN, WDT_DISABLE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user