1
linux/arch/powerpc/platforms/8xx
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
..
adder875.c [POWERPC] 8xx: adder875, ep88xc: fix to match recent 8xx cleanups. 2008-02-05 23:29:58 -06:00
ep88xc.c [POWERPC] 8xx: adder875, ep88xc: fix to match recent 8xx cleanups. 2008-02-05 23:29:58 -06:00
Kconfig [POWERPC] 8xx: Analogue & Micro Adder875 board support. 2008-01-23 19:34:40 -06:00
m8xx_setup.c [POWERPC] 8xx: Timebase frequency should not depend on bus-frequency 2008-02-26 22:17:03 +11:00
Makefile [POWERPC] 8xx: Analogue & Micro Adder875 board support. 2008-01-23 19:34:40 -06:00
mpc8xx.h [POWERPC] 8xx: Remove sysdev/commproc.h 2008-01-28 08:31:02 -06:00
mpc86xads_setup.c [POWERPC] CPM: Rename commproc to cpm1 and cpm2_common.c to cpm2.c 2008-01-28 08:31:05 -06:00
mpc86xads.h [POWERPC] 8xx: Convert mpc866ads to the new device binding. 2007-12-13 22:45:35 -06:00
mpc885ads_setup.c [POWERPC] CPM: Rename commproc to cpm1 and cpm2_common.c to cpm2.c 2008-01-28 08:31:05 -06:00
mpc885ads.h [POWERPC] 8xx: mpc885ads cleanup 2007-10-04 11:02:38 -05:00