diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/watchdog/at32ap700x_wdt.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/watchdog/at32ap700x_wdt.c b/drivers/char/watchdog/at32ap700x_wdt.c index 745d38f25190..8abe1c77ac1f 100644 --- a/drivers/char/watchdog/at32ap700x_wdt.c +++ b/drivers/char/watchdog/at32ap700x_wdt.c | |||
@@ -32,11 +32,11 @@ | |||
32 | #define WDT_CLR 0x04 | 32 | #define WDT_CLR 0x04 |
33 | 33 | ||
34 | #define WDT_BIT(name) (1 << WDT_##name) | 34 | #define WDT_BIT(name) (1 << WDT_##name) |
35 | #define WDT_BF(name,value) ((value) << WDT_##name) | 35 | #define WDT_BF(name, value) ((value) << WDT_##name) |
36 | 36 | ||
37 | #define wdt_readl(dev,reg) \ | 37 | #define wdt_readl(dev, reg) \ |
38 | __raw_readl((dev)->regs + WDT_##reg) | 38 | __raw_readl((dev)->regs + WDT_##reg) |
39 | #define wdt_writel(dev,reg,value) \ | 39 | #define wdt_writel(dev, reg, value) \ |
40 | __raw_writel((value), (dev)->regs + WDT_##reg) | 40 | __raw_writel((value), (dev)->regs + WDT_##reg) |
41 | 41 | ||
42 | struct wdt_at32ap700x { | 42 | struct wdt_at32ap700x { |
@@ -51,7 +51,7 @@ static struct wdt_at32ap700x *wdt; | |||
51 | /* | 51 | /* |
52 | * Disable the watchdog. | 52 | * Disable the watchdog. |
53 | */ | 53 | */ |
54 | static void inline at32_wdt_stop(void) | 54 | static inline void at32_wdt_stop(void) |
55 | { | 55 | { |
56 | unsigned long psel = wdt_readl(wdt, CTRL) & WDT_BF(CTRL_PSEL, 0x0f); | 56 | unsigned long psel = wdt_readl(wdt, CTRL) & WDT_BF(CTRL_PSEL, 0x0f); |
57 | wdt_writel(wdt, CTRL, psel | WDT_BF(CTRL_KEY, 0x55)); | 57 | wdt_writel(wdt, CTRL, psel | WDT_BF(CTRL_KEY, 0x55)); |
@@ -61,7 +61,7 @@ static void inline at32_wdt_stop(void) | |||
61 | /* | 61 | /* |
62 | * Enable and reset the watchdog. | 62 | * Enable and reset the watchdog. |
63 | */ | 63 | */ |
64 | static void inline at32_wdt_start(void) | 64 | static inline void at32_wdt_start(void) |
65 | { | 65 | { |
66 | /* 0xf is 2^16 divider = 2 sec, 0xe is 2^15 divider = 1 sec */ | 66 | /* 0xf is 2^16 divider = 2 sec, 0xe is 2^15 divider = 1 sec */ |
67 | unsigned long psel = (wdt->timeout > 1) ? 0xf : 0xe; | 67 | unsigned long psel = (wdt->timeout > 1) ? 0xf : 0xe; |
@@ -77,7 +77,7 @@ static void inline at32_wdt_start(void) | |||
77 | /* | 77 | /* |
78 | * Pat the watchdog timer. | 78 | * Pat the watchdog timer. |
79 | */ | 79 | */ |
80 | static void inline at32_wdt_pat(void) | 80 | static inline void at32_wdt_pat(void) |
81 | { | 81 | { |
82 | wdt_writel(wdt, CLR, 0x42); | 82 | wdt_writel(wdt, CLR, 0x42); |
83 | } | 83 | } |