linux/arch/powerpc
Anton Vorontsov 5053037816 [POWERPC] 8xx: Timebase frequency should not depend on bus-frequency
m8xx_setup.c says:
   /* Force all 8xx processors to use divide by 16 processor clock. */

And at the same time it is using bus-frequency for calculating
timebase.  It is okay for most setups because bus-frequency is
equal to clock-frequency.

The problem emerges when cpu frequency is > 66MHz, quoting
u-boot/cpu/mpc8xx/speed.c:

        if (gd->cpu_clk <= 66000000) {
                sccr_reg |= SCCR_EBDF00;        /* bus division factor = 1 */
                gd->bus_clk = gd->cpu_clk;
        } else {
                sccr_reg |= SCCR_EBDF01;        /* bus division factor = 2 */
                gd->bus_clk = gd->cpu_clk / 2;
        }

So in case of cpu clock > 66MHz, bus_clk = cpu_clk / 2. An then, from
Linux, we calculate timebase frequency as tb_freq = bus_clk / 16,
that is cpu_clk / 2 / 16, which is wrong.

This fixes the system time drifting problem on the EP885C board
running at 133MHz.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-02-26 22:17:03 +11:00
..
boot [POWERPC] Fix bootwrapper builds with older gcc versions 2008-02-20 13:33:37 +11:00
configs [POWERPC] 44x: Add multiplatform defconfig 2008-02-16 08:01:10 -06:00
kernel [POWERPC] Remove dead code at KernelAltiVec 2008-02-26 22:17:03 +11:00
lib [POWERPC] rheap: Changes config mechanism 2007-10-16 17:09:21 -06:00
math-emu [POWERPC] Fix carry bug in 128-bit unsigned integer adding 2008-01-23 19:34:21 -06:00
mm [POWERPC] Add code for removing HPTEs for parts of the linear mapping 2008-02-26 22:17:03 +11:00
oprofile d_path: Make get_dcookie() use a struct path argument 2008-02-14 21:17:08 -08:00
platforms [POWERPC] 8xx: Timebase frequency should not depend on bus-frequency 2008-02-26 22:17:03 +11:00
sysdev [POWERPC] mpic: Make sparse happy 2008-02-26 22:17:03 +11:00
xmon [POWERPC] Make setjmp/longjmp code usable outside of xmon 2008-01-25 22:52:50 +11:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
Kconfig Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/lmb-2.6 2008-02-26 21:08:45 +11:00
Kconfig.debug [POWERPC] 4xx: Base support for 440GX Taishan eval board 2007-12-23 13:13:33 -06:00
Makefile x86: fix vdso_install breaks user "make install" 2008-02-19 16:18:34 +01:00