Skip to content

Commit 64b33a0

Browse files
Graf Yangvapier
authored andcommitted
Blackfin: split watchdog definitions into a dedicated header file
This allows things to be shared between the different watchdog sources. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
1 parent 4ab069e commit 64b33a0

2 files changed

Lines changed: 31 additions & 15 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* bfin_watchdog.h - Blackfin watchdog definitions
3+
*
4+
* Copyright 2006-2010 Analog Devices Inc.
5+
*
6+
* Licensed under the GPL-2 or later.
7+
*/
8+
9+
#ifndef _BFIN_WATCHDOG_H
10+
#define _BFIN_WATCHDOG_H
11+
12+
/* Bit in SWRST that indicates boot caused by watchdog */
13+
#define SWRST_RESET_WDOG 0x4000
14+
15+
/* Bit in WDOG_CTL that indicates watchdog has expired (WDR0) */
16+
#define WDOG_EXPIRED 0x8000
17+
18+
/* Masks for WDEV field in WDOG_CTL register */
19+
#define ICTL_RESET 0x0
20+
#define ICTL_NMI 0x2
21+
#define ICTL_GPI 0x4
22+
#define ICTL_NONE 0x6
23+
#define ICTL_MASK 0x6
24+
25+
/* Masks for WDEN field in WDOG_CTL register */
26+
#define WDEN_MASK 0x0FF0
27+
#define WDEN_ENABLE 0x0000
28+
#define WDEN_DISABLE 0x0AD0
29+
30+
#endif

‎arch/blackfin/kernel/nmi.c‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,7 @@
2020
#include <asm/blackfin.h>
2121
#include <asm/atomic.h>
2222
#include <asm/cacheflush.h>
23-
24-
/* Bit in WDOG_CTL that indicates watchdog has expired (WDR0) */
25-
#define WDOG_EXPIRED 0x8000
26-
27-
/* Masks for WDEV field in WDOG_CTL register */
28-
#define ICTL_RESET 0x0
29-
#define ICTL_NMI 0x2
30-
#define ICTL_GPI 0x4
31-
#define ICTL_NONE 0x6
32-
#define ICTL_MASK 0x6
33-
34-
/* Masks for WDEN field in WDOG_CTL register */
35-
#define WDEN_MASK 0x0FF0
36-
#define WDEN_ENABLE 0x0000
37-
#define WDEN_DISABLE 0x0AD0
23+
#include <asm/bfin_watchdog.h>
3824

3925
#define DRV_NAME "nmi-wdt"
4026

0 commit comments

Comments
 (0)