summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/mach-xburst/csrc-jz4750.c7
-rw-r--r--arch/ppc/mach-mpc85xx/include/mach/clocks.h2
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);