aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/smp_twd.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-05-17 05:58:54 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-05-17 14:16:41 -0400
commit4c5158d4c3ab1f2927a740372a0ee9c3fed7ba47 (patch)
treeb828df4daa822008044129b3dbaf530ec622ac64 /arch/arm/kernel/smp_twd.c
parentf32f4ce25745209f16a5a6cef7442144b596c68a (diff)
[ARM] smp: fix style issues in smp_twd.c
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/smp_twd.c')
-rw-r--r--arch/arm/kernel/smp_twd.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index aabd62d6bd19..d8c88c633c6f 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -48,7 +48,7 @@ static void twd_set_mode(enum clock_event_mode mode,
48{ 48{
49 unsigned long ctrl; 49 unsigned long ctrl;
50 50
51 switch(mode) { 51 switch (mode) {
52 case CLOCK_EVT_MODE_PERIODIC: 52 case CLOCK_EVT_MODE_PERIODIC:
53 /* timer load already set up */ 53 /* timer load already set up */
54 ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE 54 ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE
@@ -72,8 +72,10 @@ static int twd_set_next_event(unsigned long evt,
72{ 72{
73 unsigned long ctrl = __raw_readl(twd_base + TWD_TIMER_CONTROL); 73 unsigned long ctrl = __raw_readl(twd_base + TWD_TIMER_CONTROL);
74 74
75 ctrl |= TWD_TIMER_CONTROL_ENABLE;
76
75 __raw_writel(evt, twd_base + TWD_TIMER_COUNTER); 77 __raw_writel(evt, twd_base + TWD_TIMER_COUNTER);
76 __raw_writel(ctrl | TWD_TIMER_CONTROL_ENABLE, twd_base + TWD_TIMER_CONTROL); 78 __raw_writel(ctrl, twd_base + TWD_TIMER_CONTROL);
77 79
78 return 0; 80 return 0;
79} 81}
@@ -104,7 +106,7 @@ static void __cpuinit twd_calibrate_rate(void)
104 * the timer ticks 106 * the timer ticks
105 */ 107 */
106 if (twd_timer_rate == 0) { 108 if (twd_timer_rate == 0) {
107 printk("Calibrating local timer... "); 109 printk(KERN_INFO "Calibrating local timer... ");
108 110
109 /* Wait for a tick to start */ 111 /* Wait for a tick to start */
110 waitjiffies = get_jiffies_64() + 1; 112 waitjiffies = get_jiffies_64() + 1;
@@ -146,15 +148,15 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk)
146 148
147 twd_calibrate_rate(); 149 twd_calibrate_rate();
148 150
149 clk->name = "local_timer"; 151 clk->name = "local_timer";
150 clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; 152 clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
151 clk->rating = 350; 153 clk->rating = 350;
152 clk->set_mode = twd_set_mode; 154 clk->set_mode = twd_set_mode;
153 clk->set_next_event = twd_set_next_event; 155 clk->set_next_event = twd_set_next_event;
154 clk->shift = 20; 156 clk->shift = 20;
155 clk->mult = div_sc(twd_timer_rate, NSEC_PER_SEC, clk->shift); 157 clk->mult = div_sc(twd_timer_rate, NSEC_PER_SEC, clk->shift);
156 clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk); 158 clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk);
157 clk->min_delta_ns = clockevent_delta2ns(0xf, clk); 159 clk->min_delta_ns = clockevent_delta2ns(0xf, clk);
158 160
159 /* Make sure our local interrupt controller has this enabled */ 161 /* Make sure our local interrupt controller has this enabled */
160 local_irq_save(flags); 162 local_irq_save(flags);