Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204644
b: refs/heads/master
c: c8f7743
h: refs/heads/master
v: v3
  • Loading branch information
Michal Simek committed Aug 4, 2010
1 parent 1697109 commit b5e411a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 615748aefa61066e8e5ec9d27521f37037b4c1a7
refs/heads/master: c8f77436d11190d0d9379f4fb2c6f22a155c8d8e
9 changes: 5 additions & 4 deletions trunk/arch/microblaze/kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <asm/prom.h>
#include <asm/irq.h>
#include <asm/system.h>
#include <linux/cnt32_to_63.h>

#ifdef CONFIG_SELFMOD_TIMER
#include <asm/selfmod.h>
Expand Down Expand Up @@ -135,7 +136,7 @@ static void microblaze_timer_set_mode(enum clock_event_mode mode,
static struct clock_event_device clockevent_microblaze_timer = {
.name = "microblaze_clockevent",
.features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC,
.shift = 24,
.shift = 8,
.rating = 300,
.set_next_event = microblaze_timer_set_next_event,
.set_mode = microblaze_timer_set_mode,
Expand Down Expand Up @@ -195,7 +196,7 @@ static cycle_t microblaze_cc_read(const struct cyclecounter *cc)
static struct cyclecounter microblaze_cc = {
.read = microblaze_cc_read,
.mask = CLOCKSOURCE_MASK(32),
.shift = 24,
.shift = 8,
};

int __init init_microblaze_timecounter(void)
Expand All @@ -213,7 +214,7 @@ static struct clocksource clocksource_microblaze = {
.rating = 300,
.read = microblaze_read,
.mask = CLOCKSOURCE_MASK(32),
.shift = 24, /* I can shift it */
.shift = 8, /* I can shift it */
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};

Expand Down Expand Up @@ -302,7 +303,7 @@ unsigned long long notrace sched_clock(void)
{
if (timer_initialized) {
struct clocksource *cs = &clocksource_microblaze;
cycle_t cyc = cs->read(NULL);
cycle_t cyc = cnt32_to_63(cs->read(NULL));
return clocksource_cyc2ns(cyc, cs->mult, cs->shift);
}
return 0;
Expand Down

0 comments on commit b5e411a

Please sign in to comment.