diff options
author | Sekhar Nori <nsekhar@ti.com> | 2014-06-06 17:36:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:08:08 -0400 |
commit | 92adb96aa4fcb460c6b174384cc74418e3d95cda (patch) | |
tree | 8788598840b9aceccede6da4158ce7ac7cd43b8e /drivers/rtc/rtc-omap.c | |
parent | 337b600f898583b50b67e0bbff0667db2393d614 (diff) |
drivers/rtc/rtc-omap.c: use BIT() macro
Use BIT() macro for RTC_HAS_<FEATURE> defines instead of hand-writing
bit masks.
Use BIT() macros for register bit field definitions.
While at it, fix indentation done using spaces.
No functional change in this patch.
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-omap.c')
-rw-r--r-- | drivers/rtc/rtc-omap.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index 70f51491809d..734e40804732 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c | |||
@@ -73,43 +73,43 @@ | |||
73 | #define OMAP_RTC_IRQWAKEEN 0x7c | 73 | #define OMAP_RTC_IRQWAKEEN 0x7c |
74 | 74 | ||
75 | /* OMAP_RTC_CTRL_REG bit fields: */ | 75 | /* OMAP_RTC_CTRL_REG bit fields: */ |
76 | #define OMAP_RTC_CTRL_SPLIT (1<<7) | 76 | #define OMAP_RTC_CTRL_SPLIT BIT(7) |
77 | #define OMAP_RTC_CTRL_DISABLE (1<<6) | 77 | #define OMAP_RTC_CTRL_DISABLE BIT(6) |
78 | #define OMAP_RTC_CTRL_SET_32_COUNTER (1<<5) | 78 | #define OMAP_RTC_CTRL_SET_32_COUNTER BIT(5) |
79 | #define OMAP_RTC_CTRL_TEST (1<<4) | 79 | #define OMAP_RTC_CTRL_TEST BIT(4) |
80 | #define OMAP_RTC_CTRL_MODE_12_24 (1<<3) | 80 | #define OMAP_RTC_CTRL_MODE_12_24 BIT(3) |
81 | #define OMAP_RTC_CTRL_AUTO_COMP (1<<2) | 81 | #define OMAP_RTC_CTRL_AUTO_COMP BIT(2) |
82 | #define OMAP_RTC_CTRL_ROUND_30S (1<<1) | 82 | #define OMAP_RTC_CTRL_ROUND_30S BIT(1) |
83 | #define OMAP_RTC_CTRL_STOP (1<<0) | 83 | #define OMAP_RTC_CTRL_STOP BIT(0) |
84 | 84 | ||
85 | /* OMAP_RTC_STATUS_REG bit fields: */ | 85 | /* OMAP_RTC_STATUS_REG bit fields: */ |
86 | #define OMAP_RTC_STATUS_POWER_UP (1<<7) | 86 | #define OMAP_RTC_STATUS_POWER_UP BIT(7) |
87 | #define OMAP_RTC_STATUS_ALARM (1<<6) | 87 | #define OMAP_RTC_STATUS_ALARM BIT(6) |
88 | #define OMAP_RTC_STATUS_1D_EVENT (1<<5) | 88 | #define OMAP_RTC_STATUS_1D_EVENT BIT(5) |
89 | #define OMAP_RTC_STATUS_1H_EVENT (1<<4) | 89 | #define OMAP_RTC_STATUS_1H_EVENT BIT(4) |
90 | #define OMAP_RTC_STATUS_1M_EVENT (1<<3) | 90 | #define OMAP_RTC_STATUS_1M_EVENT BIT(3) |
91 | #define OMAP_RTC_STATUS_1S_EVENT (1<<2) | 91 | #define OMAP_RTC_STATUS_1S_EVENT BIT(2) |
92 | #define OMAP_RTC_STATUS_RUN (1<<1) | 92 | #define OMAP_RTC_STATUS_RUN BIT(1) |
93 | #define OMAP_RTC_STATUS_BUSY (1<<0) | 93 | #define OMAP_RTC_STATUS_BUSY BIT(0) |
94 | 94 | ||
95 | /* OMAP_RTC_INTERRUPTS_REG bit fields: */ | 95 | /* OMAP_RTC_INTERRUPTS_REG bit fields: */ |
96 | #define OMAP_RTC_INTERRUPTS_IT_ALARM (1<<3) | 96 | #define OMAP_RTC_INTERRUPTS_IT_ALARM BIT(3) |
97 | #define OMAP_RTC_INTERRUPTS_IT_TIMER (1<<2) | 97 | #define OMAP_RTC_INTERRUPTS_IT_TIMER BIT(2) |
98 | 98 | ||
99 | /* OMAP_RTC_IRQWAKEEN bit fields: */ | 99 | /* OMAP_RTC_IRQWAKEEN bit fields: */ |
100 | #define OMAP_RTC_IRQWAKEEN_ALARM_WAKEEN (1<<1) | 100 | #define OMAP_RTC_IRQWAKEEN_ALARM_WAKEEN BIT(1) |
101 | 101 | ||
102 | /* OMAP_RTC_KICKER values */ | 102 | /* OMAP_RTC_KICKER values */ |
103 | #define KICK0_VALUE 0x83e70b13 | 103 | #define KICK0_VALUE 0x83e70b13 |
104 | #define KICK1_VALUE 0x95a4f1e0 | 104 | #define KICK1_VALUE 0x95a4f1e0 |
105 | 105 | ||
106 | #define OMAP_RTC_HAS_KICKER 0x1 | 106 | #define OMAP_RTC_HAS_KICKER BIT(0) |
107 | 107 | ||
108 | /* | 108 | /* |
109 | * Few RTC IP revisions has special WAKE-EN Register to enable Wakeup | 109 | * Few RTC IP revisions has special WAKE-EN Register to enable Wakeup |
110 | * generation for event Alarm. | 110 | * generation for event Alarm. |
111 | */ | 111 | */ |
112 | #define OMAP_RTC_HAS_IRQWAKEEN 0x2 | 112 | #define OMAP_RTC_HAS_IRQWAKEEN BIT(1) |
113 | 113 | ||
114 | static void __iomem *rtc_base; | 114 | static void __iomem *rtc_base; |
115 | 115 | ||