diff options
author | John Stultz <johnstul@us.ibm.com> | 2010-04-26 23:21:52 -0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2011-11-21 22:01:01 -0500 |
commit | 010f3f1692b22f8ddabdccc6526915e181e49447 (patch) | |
tree | 05f7b55fcdedb4c3c2a2b7f8d22fbf295858c50e | |
parent | 5f724e84f91550985a9ae3deb6e0dbc8d8396ed7 (diff) |
clocksource: m86k: Convert to clocksource_register_hz/khz
This converts the m86k clocksources to use clocksource_register_hz/khz
CC: Geert Uytterhoeven <geert@linux-m68k.org>
CC: Greg Ungerer <gerg@uclinux.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
-rw-r--r-- | arch/m68k/platform/68328/timers.c | 4 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/dma_timer.c | 5 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/pit.c | 4 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/sltimers.c | 4 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/timers.c | 4 |
5 files changed, 5 insertions, 16 deletions
diff --git a/arch/m68k/platform/68328/timers.c b/arch/m68k/platform/68328/timers.c index 309f725995bf..f2678866067b 100644 --- a/arch/m68k/platform/68328/timers.c +++ b/arch/m68k/platform/68328/timers.c | |||
@@ -93,7 +93,6 @@ static struct clocksource m68328_clk = { | |||
93 | .name = "timer", | 93 | .name = "timer", |
94 | .rating = 250, | 94 | .rating = 250, |
95 | .read = m68328_read_clk, | 95 | .read = m68328_read_clk, |
96 | .shift = 20, | ||
97 | .mask = CLOCKSOURCE_MASK(32), | 96 | .mask = CLOCKSOURCE_MASK(32), |
98 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 97 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
99 | }; | 98 | }; |
@@ -115,8 +114,7 @@ void hw_timer_init(void) | |||
115 | 114 | ||
116 | /* Enable timer 1 */ | 115 | /* Enable timer 1 */ |
117 | TCTL |= TCTL_TEN; | 116 | TCTL |= TCTL_TEN; |
118 | m68328_clk.mult = clocksource_hz2mult(TICKS_PER_JIFFY*HZ, m68328_clk.shift); | 117 | clocksource_register_hz(&m68328_clk, TICKS_PER_JIFFY*HZ); |
119 | clocksource_register(&m68328_clk); | ||
120 | } | 118 | } |
121 | 119 | ||
122 | /***************************************************************************/ | 120 | /***************************************************************************/ |
diff --git a/arch/m68k/platform/coldfire/dma_timer.c b/arch/m68k/platform/coldfire/dma_timer.c index a5f562823d7a..235ad57c4707 100644 --- a/arch/m68k/platform/coldfire/dma_timer.c +++ b/arch/m68k/platform/coldfire/dma_timer.c | |||
@@ -44,7 +44,6 @@ static struct clocksource clocksource_cf_dt = { | |||
44 | .rating = 200, | 44 | .rating = 200, |
45 | .read = cf_dt_get_cycles, | 45 | .read = cf_dt_get_cycles, |
46 | .mask = CLOCKSOURCE_MASK(32), | 46 | .mask = CLOCKSOURCE_MASK(32), |
47 | .shift = 20, | ||
48 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 47 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
49 | }; | 48 | }; |
50 | 49 | ||
@@ -60,9 +59,7 @@ static int __init init_cf_dt_clocksource(void) | |||
60 | __raw_writeb(0x00, DTER0); | 59 | __raw_writeb(0x00, DTER0); |
61 | __raw_writel(0x00000000, DTRR0); | 60 | __raw_writel(0x00000000, DTRR0); |
62 | __raw_writew(DMA_DTMR_CLK_DIV_16 | DMA_DTMR_ENABLE, DTMR0); | 61 | __raw_writew(DMA_DTMR_CLK_DIV_16 | DMA_DTMR_ENABLE, DTMR0); |
63 | clocksource_cf_dt.mult = clocksource_hz2mult(DMA_FREQ, | 62 | return clocksource_register_hz(&clocksource_cf_dt, DMA_FREQ); |
64 | clocksource_cf_dt.shift); | ||
65 | return clocksource_register(&clocksource_cf_dt); | ||
66 | } | 63 | } |
67 | 64 | ||
68 | arch_initcall(init_cf_dt_clocksource); | 65 | arch_initcall(init_cf_dt_clocksource); |
diff --git a/arch/m68k/platform/coldfire/pit.c b/arch/m68k/platform/coldfire/pit.c index c2b980926bec..02663d25822d 100644 --- a/arch/m68k/platform/coldfire/pit.c +++ b/arch/m68k/platform/coldfire/pit.c | |||
@@ -144,7 +144,6 @@ static struct clocksource pit_clk = { | |||
144 | .name = "pit", | 144 | .name = "pit", |
145 | .rating = 100, | 145 | .rating = 100, |
146 | .read = pit_read_clk, | 146 | .read = pit_read_clk, |
147 | .shift = 20, | ||
148 | .mask = CLOCKSOURCE_MASK(32), | 147 | .mask = CLOCKSOURCE_MASK(32), |
149 | }; | 148 | }; |
150 | 149 | ||
@@ -162,8 +161,7 @@ void hw_timer_init(void) | |||
162 | 161 | ||
163 | setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &pit_irq); | 162 | setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &pit_irq); |
164 | 163 | ||
165 | pit_clk.mult = clocksource_hz2mult(FREQ, pit_clk.shift); | 164 | clocksource_register_hz(&pit_clk, FREQ); |
166 | clocksource_register(&pit_clk); | ||
167 | } | 165 | } |
168 | 166 | ||
169 | /***************************************************************************/ | 167 | /***************************************************************************/ |
diff --git a/arch/m68k/platform/coldfire/sltimers.c b/arch/m68k/platform/coldfire/sltimers.c index 6a85daf9a7fd..b7f822b552bb 100644 --- a/arch/m68k/platform/coldfire/sltimers.c +++ b/arch/m68k/platform/coldfire/sltimers.c | |||
@@ -114,7 +114,6 @@ static struct clocksource mcfslt_clk = { | |||
114 | .name = "slt", | 114 | .name = "slt", |
115 | .rating = 250, | 115 | .rating = 250, |
116 | .read = mcfslt_read_clk, | 116 | .read = mcfslt_read_clk, |
117 | .shift = 20, | ||
118 | .mask = CLOCKSOURCE_MASK(32), | 117 | .mask = CLOCKSOURCE_MASK(32), |
119 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 118 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
120 | }; | 119 | }; |
@@ -136,8 +135,7 @@ void hw_timer_init(void) | |||
136 | 135 | ||
137 | setup_irq(MCF_IRQ_TIMER, &mcfslt_timer_irq); | 136 | setup_irq(MCF_IRQ_TIMER, &mcfslt_timer_irq); |
138 | 137 | ||
139 | mcfslt_clk.mult = clocksource_hz2mult(MCF_BUSCLK, mcfslt_clk.shift); | 138 | clocksource_register_hz(&mcfslt_clk, MCF_BUSCLK); |
140 | clocksource_register(&mcfslt_clk); | ||
141 | 139 | ||
142 | #ifdef CONFIG_HIGHPROFILE | 140 | #ifdef CONFIG_HIGHPROFILE |
143 | mcfslt_profile_init(); | 141 | mcfslt_profile_init(); |
diff --git a/arch/m68k/platform/coldfire/timers.c b/arch/m68k/platform/coldfire/timers.c index 60242f65fea9..0d90da32fcdb 100644 --- a/arch/m68k/platform/coldfire/timers.c +++ b/arch/m68k/platform/coldfire/timers.c | |||
@@ -88,7 +88,6 @@ static struct clocksource mcftmr_clk = { | |||
88 | .name = "tmr", | 88 | .name = "tmr", |
89 | .rating = 250, | 89 | .rating = 250, |
90 | .read = mcftmr_read_clk, | 90 | .read = mcftmr_read_clk, |
91 | .shift = 20, | ||
92 | .mask = CLOCKSOURCE_MASK(32), | 91 | .mask = CLOCKSOURCE_MASK(32), |
93 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 92 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
94 | }; | 93 | }; |
@@ -109,8 +108,7 @@ void hw_timer_init(void) | |||
109 | __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | | 108 | __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | |
110 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); | 109 | MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); |
111 | 110 | ||
112 | mcftmr_clk.mult = clocksource_hz2mult(FREQ, mcftmr_clk.shift); | 111 | clocksource_register_hz(&mcftmr_clk, FREQ); |
113 | clocksource_register(&mcftmr_clk); | ||
114 | 112 | ||
115 | setup_irq(MCF_IRQ_TIMER, &mcftmr_timer_irq); | 113 | setup_irq(MCF_IRQ_TIMER, &mcftmr_timer_irq); |
116 | 114 | ||