[PATCH] [POWERPC] 8xx: timebase frequency should not depend on bus-frequency

Anton Vorontsov cbouatmailru at gmail.com
Fri Feb 22 10:41:36 EST 2008


On Thu, Feb 21, 2008 at 03:20:10PM -0600, Scott Wood wrote:
> Anton Vorontsov wrote:
> > On Thu, Feb 21, 2008 at 02:06:58PM -0600, Scott Wood wrote:
> >> Current u-boots don't support device trees at all on 8xx.
> > 
> > Yes, vanilla u-boots. I assume many of us use some u-boot hacks to
> > actually boot with the device tree (no, not cuboots)... ;-)
> 
> Fine, but don't expect misbehavior from out-of-tree u-boots to be used 
> as justification for the kernel ignoring device tree content. :-)

You got me wrong, maybe I wasn't clear enough: it wasn't justification of
any kind. It's was just a remark regarding u-boot still not supporting
fdt for 8xx (20 lines of code we're lazy to cleanup, write annotation
to the patch and send it ;-).

Regarding timebase issue. This issue isn't introduced by the
u-boots. It is _Linux_ code that is buggy. I'm agree that ideally we
should get timebase-frequency from the device tree, but if we'll
start getting it from inside the current code, it will look like:

...linux setups tbfreq = cpu_clk / 16...
tbfreq = of_get_property(.."timebase-frequency"..);

You see? This is illogical, error-prone, and whatnot. :-)
I agree, to fix this right way, we should:
a) fix current u-boots;
b) rework 8xx/ Linux code; and
c) rework cuboot for compatibility;

Until that happen that tiny patch is a valid bug fix, right?

-- 
Anton Vorontsov
email: cbou at mail.ru
backup email: ya-cbou at yandex.ru
irc://irc.freenode.net/bd2



More information about the Linuxppc-dev mailing list