[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] PPC440 bus frequencies and timers

From: luigi burdo
Subject: Re: [Qemu-ppc] PPC440 bus frequencies and timers
Date: Thu, 15 Mar 2018 10:24:58 +0000

Hi Zoltan,

i had been ask in the amigaos scene plus i ask to Max Tretene (Acube uboot dev) some help about the sam infos that you need.

for now they send me this datasheet links hope it can help your project.




Da: BALATON Zoltan <address@hidden>
Inviato: martedì 13 marzo 2018 23:13
A: luigi burdo
Cc: address@hidden
Oggetto: Re: [Qemu-ppc] PPC440 bus frequencies and timers
On Tue, 13 Mar 2018, luigi burdo wrote:
> check in the patched uboot if this utility is included. i found this

I could not find this command either in the old u-boot but also not in the
newer 2015.a version so I'm not sure where is it. But u-boot has bdinfo
command which prints some frequencies.

> message in mos forum
> Edit: Acube has a nice utility to check the reference clock
> (checkbaseclock). It's included with the new version of uboot. I just
> executed this utility again, and indeed it says my sam has a 50 Mhz.
> clock.

I think we emulate a 50MHz clock as we have this line now:

ppc_booke_timers_init(cpu, 50000000, 0);

Which matches CONFIG_SYS_CLK_FREQ in u-boot Sam460ex_config.

The other part of this forum thread


"My sam runs at 1115 Mhz but, showconfig says it runs at 1265 Mhz.
The boot screen also says it runs at 1265 Mhz."

"1265 MHz is indeed wrong and that is what causes your timing/clock
issues. There have been some Sam460 boards which use a different onboard
reference clock, namely 50Mhz instead of 55Mhz. The [MorphOS] 3.9 boot.img
assumes a 55MHz clock which causes the off by factor 1.1 result."

But I don't see a timing problem of 1.1 times off but more like a 20-30
times slowdown with clock multipliers set to values that result in u-boot
printing 1115 MHz clock. Without the multipliers (SDR0_STRP0 set to 0) it
prints 50 MHz system clock in bdinfo command and seconds advance normally
so I think problem may be with some multipliers but I don't know anything
about this hardware and its registers so some help from someone with more
knowledge would be welcome.

AROS also seems to have 55 MHz hardcoded in
arch/ppc-sam440/kernel/kernel_startup.c:SetupClocking460() so maybe these
should be changed in U-Boot and QEMU to match the expectation from at
least two guests but I don't think this alone will resolve the timing
problem with multipliers or 20-30 times slower clock in AROS so maybe
something else is also needed.

I don't have time for this now but anyone is welcome to test and submit
patches that improve this machine model.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]