summaryrefslogtreecommitdiffstats
path: root/arch/mips/mach-xburst
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2012-06-28 22:32:34 +0400
committerSascha Hauer <s.hauer@pengutronix.de>2012-06-29 10:20:00 +0200
commitc325d97cfdaf44df8e497725fcb34500f228a712 (patch)
tree5e042d70a083028b3b9579d55082541cb15bb842 /arch/mips/mach-xburst
parentdbf834072701075078fb460fcbaf60e407cae7a8 (diff)
downloadbarebox-c325d97cfdaf44df8e497725fcb34500f228a712.tar.gz
barebox-c325d97cfdaf44df8e497725fcb34500f228a712.tar.xz
MIPS: XBurst: use clocks_calc_mult_shift() for JZ4755's clocksource
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/mach-xburst')
-rw-r--r--arch/mips/mach-xburst/csrc-jz4750.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/mach-xburst/csrc-jz4750.c b/arch/mips/mach-xburst/csrc-jz4750.c
index dc7135a4c4..36e401e480 100644
--- a/arch/mips/mach-xburst/csrc-jz4750.c
+++ b/arch/mips/mach-xburst/csrc-jz4750.c
@@ -38,12 +38,13 @@ static uint64_t jz4750_cs_read(void)
static struct clocksource jz4750_cs = {
.read = jz4750_cs_read,
.mask = CLOCKSOURCE_MASK(32),
- .shift = 10,
};
static int clocksource_init(void)
{
- jz4750_cs.mult = clocksource_hz2mult(JZ_TIMER_CLOCK, jz4750_cs.shift);
+ clocks_calc_mult_shift(&jz4750_cs.mult, &jz4750_cs.shift,
+ JZ_TIMER_CLOCK, NSEC_PER_SEC, 10);
+
init_clock(&jz4750_cs);
__raw_writel(TCU_OSTCSR_PRESCALE1 | TCU_OSTCSR_EXT_EN,