~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/microblaze/kernel/timer.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#define TIMER_BASE      timer_baseaddr
39
39
#endif
40
40
 
41
 
unsigned int freq_div_hz;
42
 
unsigned int timer_clock_freq;
 
41
static unsigned int freq_div_hz;
 
42
static unsigned int timer_clock_freq;
43
43
 
44
44
#define TCSR0   (0x00)
45
45
#define TLR0    (0x04)
202
202
        .shift = 8,
203
203
};
204
204
 
205
 
int __init init_microblaze_timecounter(void)
 
205
static int __init init_microblaze_timecounter(void)
206
206
{
207
207
        microblaze_cc.mult = div_sc(timer_clock_freq, NSEC_PER_SEC,
208
208
                                microblaze_cc.shift);
217
217
        .rating         = 300,
218
218
        .read           = microblaze_read,
219
219
        .mask           = CLOCKSOURCE_MASK(32),
220
 
        .shift          = 8, /* I can shift it */
221
220
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
222
221
};
223
222
 
224
223
static int __init microblaze_clocksource_init(void)
225
224
{
226
 
        clocksource_microblaze.mult =
227
 
                        clocksource_hz2mult(timer_clock_freq,
228
 
                                                clocksource_microblaze.shift);
229
 
        if (clocksource_register(&clocksource_microblaze))
 
225
        if (clocksource_register_hz(&clocksource_microblaze, timer_clock_freq))
230
226
                panic("failed to register clocksource");
231
227
 
232
228
        /* stop timer1 */