forked from Minki/linux
watchdog: kempld_wdt: Fix bit mask definition
STAGE_CFG bits are defined as [5:4] bits. However, '(((x) & 0x30) << 4)' handles [9:8] bits. Thus, it should be fixed in order to handle [5:4] bits. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This commit is contained in:
parent
8612ed0d97
commit
4c4e45669d
@ -35,7 +35,7 @@
|
||||
#define KEMPLD_WDT_STAGE_TIMEOUT(x) (0x1b + (x) * 4)
|
||||
#define KEMPLD_WDT_STAGE_CFG(x) (0x18 + (x))
|
||||
#define STAGE_CFG_GET_PRESCALER(x) (((x) & 0x30) >> 4)
|
||||
#define STAGE_CFG_SET_PRESCALER(x) (((x) & 0x30) << 4)
|
||||
#define STAGE_CFG_SET_PRESCALER(x) (((x) & 0x3) << 4)
|
||||
#define STAGE_CFG_PRESCALER_MASK 0x30
|
||||
#define STAGE_CFG_ACTION_MASK 0x7
|
||||
#define STAGE_CFG_ASSERT (1 << 3)
|
||||
|
Loading…
Reference in New Issue
Block a user