mvebu: backport mainline patches from kernel 3.13
[openwrt/staging/yousong.git] / target / linux / mvebu / patches-3.10 / 0166-clocksource-armada-370-xp-Use-BIT.patch
1 From ea331be867c791bca8200e6d707499845d8dfa87 Mon Sep 17 00:00:00 2001
2 From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
3 Date: Tue, 13 Aug 2013 11:43:10 -0300
4 Subject: [PATCH 166/203] clocksource: armada-370-xp: Use BIT()
5
6 This is a purely cosmetic commit: we replace hardcoded values that
7 representing bits by BIT(), which is slightly more readable.
8
9 Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
10 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
11 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
12 ---
13 drivers/clocksource/time-armada-370-xp.c | 12 ++++++------
14 1 file changed, 6 insertions(+), 6 deletions(-)
15
16 --- a/drivers/clocksource/time-armada-370-xp.c
17 +++ b/drivers/clocksource/time-armada-370-xp.c
18 @@ -35,13 +35,13 @@
19 * Timer block registers.
20 */
21 #define TIMER_CTRL_OFF 0x0000
22 -#define TIMER0_EN 0x0001
23 -#define TIMER0_RELOAD_EN 0x0002
24 -#define TIMER0_25MHZ 0x0800
25 +#define TIMER0_EN BIT(0)
26 +#define TIMER0_RELOAD_EN BIT(1)
27 +#define TIMER0_25MHZ BIT(11)
28 #define TIMER0_DIV(div) ((div) << 19)
29 -#define TIMER1_EN 0x0004
30 -#define TIMER1_RELOAD_EN 0x0008
31 -#define TIMER1_25MHZ 0x1000
32 +#define TIMER1_EN BIT(2)
33 +#define TIMER1_RELOAD_EN BIT(3)
34 +#define TIMER1_25MHZ BIT(12)
35 #define TIMER1_DIV(div) ((div) << 22)
36 #define TIMER_EVENTS_STATUS 0x0004
37 #define TIMER0_CLR_MASK (~0x1)