All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PowerPC 440EPx: Sequoia bootwrapper
@ 2009-07-21 13:33 Bob Burke
  2009-07-21 14:06 ` Stefan Roese
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Burke @ 2009-07-21 13:33 UTC (permalink / raw)
  To: linuxppc-dev

The system clock frequency on the Sequoia board is 33.000000 MHz not
33.333333 MHz; this causes the system time to drift more than 30 seconds
per hour.

diff -ruN a/arch/powerpc/boot/cuboot-sequoia.c
b/arch/powerpc/boot/cuboot-sequoia.c
--- a/arch/powerpc/boot/cuboot-sequoia.c        2009-05-18
19:52:34.000000000 -0400
+++ b/arch/powerpc/boot/cuboot-sequoia.c        2009-07-21
09:13:13.000000000 -0400
@@ -37,7 +37,7 @@

 static void sequoia_fixups(void)
 {
-       unsigned long sysclk =3D 33333333;
+       unsigned long sysclk =3D 33000000;

        ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
        ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] PowerPC 440EPx: Sequoia bootwrapper
  2009-07-21 13:33 [PATCH] PowerPC 440EPx: Sequoia bootwrapper Bob Burke
@ 2009-07-21 14:06 ` Stefan Roese
  2009-07-21 15:56   ` Bob Burke
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Roese @ 2009-07-21 14:06 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Bob Burke

On Tuesday 21 July 2009 15:33:20 Bob Burke wrote:
> The system clock frequency on the Sequoia board is 33.000000 MHz not
> 33.333333 MHz; this causes the system time to drift more than 30 seconds
> per hour.
>
> diff -ruN a/arch/powerpc/boot/cuboot-sequoia.c
> b/arch/powerpc/boot/cuboot-sequoia.c
> --- a/arch/powerpc/boot/cuboot-sequoia.c        2009-05-18
> 19:52:34.000000000 -0400
> +++ b/arch/powerpc/boot/cuboot-sequoia.c        2009-07-21
> 09:13:13.000000000 -0400
> @@ -37,7 +37,7 @@
>
>  static void sequoia_fixups(void)
>  {
> -       unsigned long sysclk = 33333333;
> +       unsigned long sysclk = 33000000;
>
>         ibm440ep_fixup_clocks(sysclk, 11059200, 50000000);
>         ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");

Unfortunately it's not that easy. Earlier Sequoia board revisions are equipped 
with an 33.333MHz oscillator. This can be detected via a CPLD register though. 
Here the "code" from U-Boot (just as an example):

/* Detect Sequoia PLL input clock automatically via CPLD bit            */
#define CONFIG_SYS_BCSR_BASE            0xc0000000
#define CONFIG_SYS_CLK_FREQ    ((in8(CONFIG_SYS_BCSR_BASE + 3) & 0x80) ? \
                                33333333 : 33000000)

But why are you using the boot wrapper? If your U-Boot isn't too old, you can 
boot uImage directly (with dtb of course). No need for the wrapper.

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] PowerPC 440EPx: Sequoia bootwrapper
  2009-07-21 14:06 ` Stefan Roese
@ 2009-07-21 15:56   ` Bob Burke
  2009-07-21 16:52     ` Stefan Roese
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Burke @ 2009-07-21 15:56 UTC (permalink / raw)
  To: Stefan Roese, linuxppc-dev

On Tue, 21 Jul 2009 16:06:53 Stefan Roese wrote:
>  Unfortunately it's not that easy. Earlier Sequoia board revisions are
>  equipped with an 33.333MHz oscillator. This can be detected via a
CPLD
>  register though.

Thanks, I didn't realize that. FYI our deployed platform is similar to
Sequoia,
but is a custom design. It has a 33 MHz system clock.

>  But why are you using the boot wrapper? If your U-Boot isn't too old,
you can
>  boot uImage directly (with dtb of course). No need for the wrapper.

Since we have deployed product, using a non OF kernel, we have made the
decision
not to upgrade U-Boot in the field.

Thanks,
Bob

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] PowerPC 440EPx: Sequoia bootwrapper
  2009-07-21 15:56   ` Bob Burke
@ 2009-07-21 16:52     ` Stefan Roese
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2009-07-21 16:52 UTC (permalink / raw)
  To: Bob Burke; +Cc: linuxppc-dev

On Tuesday 21 July 2009 17:56:40 Bob Burke wrote:
> On Tue, 21 Jul 2009 16:06:53 Stefan Roese wrote:
> >  Unfortunately it's not that easy. Earlier Sequoia board revisions are
> >  equipped with an 33.333MHz oscillator. This can be detected via a
> >  CPLD register though.
>
> Thanks, I didn't realize that. FYI our deployed platform is similar to
> Sequoia,
> but is a custom design. It has a 33 MHz system clock.

OK. Then you should add a new target for your custom board (cuboot-namexyz.c).

> >  But why are you using the boot wrapper? If your U-Boot isn't too old,
> >  you can  boot uImage directly (with dtb of course). No need for the
> >  wrapper.
>
> Since we have deployed product, using a non OF kernel, we have made the
> decision not to upgrade U-Boot in the field.

OK, understood.

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-21 16:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 13:33 [PATCH] PowerPC 440EPx: Sequoia bootwrapper Bob Burke
2009-07-21 14:06 ` Stefan Roese
2009-07-21 15:56   ` Bob Burke
2009-07-21 16:52     ` Stefan Roese

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.