Skip to content

Commit

Permalink
ARM: spear: update clock source registration
Browse files Browse the repository at this point in the history
In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new
interfaces were added which simplify (and optimize) the selection of the
divisor shift/mult constants.  Switch over to using this new interface.

Acked-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Dec 22, 2010
1 parent 8492fd2 commit e038732
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions arch/arm/plat-spear/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ static struct clocksource clksrc = {
.rating = 200, /* its a pretty decent clock */
.read = clocksource_read_cycles,
.mask = 0xFFFF, /* 16 bits */
.mult = 0, /* to be computed */
.shift = 0, /* to be computed */
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};

Expand All @@ -105,10 +103,8 @@ static void spear_clocksource_init(void)
val |= CTRL_ENABLE ;
writew(val, gpt_base + CR(CLKSRC));

clocksource_calc_mult_shift(&clksrc, tick_rate, SPEAR_MIN_RANGE);

/* register the clocksource */
clocksource_register(&clksrc);
clocksource_register_hz(&clksrc, tick_rate);
}

static struct clock_event_device clkevt = {
Expand Down

0 comments on commit e038732

Please sign in to comment.