diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-07-02 11:04:38 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-07-02 11:04:38 +0200 |
commit | 93d4ea2ac8ab696de04d053d1381944cbc85e3df (patch) | |
tree | 0f1fa535533e402bcb7bd8fcc93aad6d6a73a283 /arch | |
parent | 62fe47768b26b7dceda983a16b042ddc4b59d246 (diff) | |
parent | c325d97cfdaf44df8e497725fcb34500f228a712 (diff) | |
download | barebox-93d4ea2ac8ab696de04d053d1381944cbc85e3df.tar.gz barebox-93d4ea2ac8ab696de04d053d1381944cbc85e3df.tar.xz |
Merge branch 'for-next/mips-clocksource'
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/mach-xburst/csrc-jz4750.c | 7 | ||||
-rw-r--r-- | arch/ppc/mach-mpc85xx/include/mach/clocks.h | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/arch/mips/mach-xburst/csrc-jz4750.c b/arch/mips/mach-xburst/csrc-jz4750.c index f625b703a1..36e401e480 100644 --- a/arch/mips/mach-xburst/csrc-jz4750.c +++ b/arch/mips/mach-xburst/csrc-jz4750.c @@ -28,7 +28,7 @@ #include <io.h> #include <mach/jz4750d_regs.h> -#define JZ_TIMER_CLOCK 40000 +#define JZ_TIMER_CLOCK 24000000 static uint64_t jz4750_cs_read(void) { @@ -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, diff --git a/arch/ppc/mach-mpc85xx/include/mach/clocks.h b/arch/ppc/mach-mpc85xx/include/mach/clocks.h index 94771682e8..2ab367b2ec 100644 --- a/arch/ppc/mach-mpc85xx/include/mach/clocks.h +++ b/arch/ppc/mach-mpc85xx/include/mach/clocks.h @@ -10,8 +10,6 @@ struct sys_info { unsigned long freqLocalBus; }; -#define NSEC_PER_SEC 1000000000L - unsigned long fsl_get_bus_freq(ulong dummy); unsigned long fsl_get_timebase_clock(void); void fsl_get_sys_info(struct sys_info *sysInfo); |