Message ID | 49B19AE0.3080609@embeddedarm.com (mailing list archive) |
---|---|
State | Changes Requested, archived |
Headers | show |
Hello, Let's try this one more time. The last patch was using the clocks for a custom board based on the Yosemite board and was referencing a non-existent ethNadr( I forgot to pull out this code out). Signed-off-by: Eddie Dawydiuk <eddie@embeddedarm.com> diff -urN linux-2.6.28.orig/arch/powerpc/boot/simpleboot-yosemite.c linux-2.6.28/arch/powerpc/boot/simpleboot-yosemite.c --- linux-2.6.28.orig/arch/powerpc/boot/simpleboot-yosemite.c 1969-12-31 17:00:00.000000000 -0700 +++ linux-2.6.28/arch/powerpc/boot/simpleboot-yosemite.c 2009-03-06 15:33:24.000000000 -0700 @@ -0,0 +1,23 @@ +#include "ops.h" +#include "stdio.h" +#include "4xx.h" +#include "44x.h" + +#define TARGET_4xx +#define TARGET_44x +#include "ppcboot.h" + +static void yosemite_fixups(void) +{ + unsigned long sysclk = 66666666; + + ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); + ibm4xx_sdram_fixup_memsize(); +} + +void platform_specific_init(void) +{ + platform_ops.fixups = yosemite_fixups; + platform_ops.exit = ibm44x_dbcr_reset; +} > diff -urN linux-2.6.28.orig/arch/powerpc/boot/simpleboot-yosemite.c > linux-2.6.28/arch/powerpc/boot/simpleboot-yosemite.c > --- linux-2.6.28.orig/arch/powerpc/boot/simpleboot-yosemite.c > 1969-12-31 17:00:00.000000000 -0700 > +++ linux-2.6.28/arch/powerpc/boot/simpleboot-yosemite.c > 2009-03-06 14:55:46.000000000 -0700 > @@ -0,0 +1,24 @@ > +#include "ops.h" > +#include "stdio.h" > +#include "4xx.h" > +#include "44x.h" > + > +#define TARGET_4xx > +#define TARGET_44x > +#include "ppcboot.h" > + > +static void yosemite_fixups(void) > +{ > + unsigned long sysclk = 50000000; > + > + ibm440ep_fixup_clocks(sysclk, 11059200, 400000000); > + ibm4xx_sdram_fixup_memsize(); > + dt_fixup_mac_address_by_alias("ethernet0", eth0adr); > + dt_fixup_mac_address_by_alias("ethernet1", eth1adr); > +} > + > +void platform_specific_init(void) > +{ > + platform_ops.fixups = yosemite_fixups; > + platform_ops.exit = ibm44x_dbcr_reset; > +} >
On Fri, Mar 6, 2009 at 3:32 PM, Eddie Dawydiuk <eddie@embeddedarm.com> wrote: > Hello, > > Let's try this one more time. The last patch was using the clocks for a > custom board based on the Yosemite board and was referencing a non-existent > ethNadr( I forgot to pull out this code out). But the question remains: Why do you need simpleboot support for Yosemite when you can use a uImage or cuImage with u-boot? g. > > Signed-off-by: Eddie Dawydiuk <eddie@embeddedarm.com> > > diff -urN linux-2.6.28.orig/arch/powerpc/boot/simpleboot-yosemite.c > linux-2.6.28/arch/powerpc/boot/simpleboot-yosemite.c > --- linux-2.6.28.orig/arch/powerpc/boot/simpleboot-yosemite.c 1969-12-31 > 17:00:00.000000000 -0700 > +++ linux-2.6.28/arch/powerpc/boot/simpleboot-yosemite.c 2009-03-06 > 15:33:24.000000000 -0700 > @@ -0,0 +1,23 @@ > +#include "ops.h" > +#include "stdio.h" > +#include "4xx.h" > +#include "44x.h" > + > +#define TARGET_4xx > +#define TARGET_44x > +#include "ppcboot.h" > + > +static void yosemite_fixups(void) > +{ > + unsigned long sysclk = 66666666; > + > + ibm440ep_fixup_clocks(sysclk, 11059200, 50000000); > + ibm4xx_sdram_fixup_memsize(); > +} > + > +void platform_specific_init(void) > +{ > + platform_ops.fixups = yosemite_fixups; > + platform_ops.exit = ibm44x_dbcr_reset; > +} > >> diff -urN linux-2.6.28.orig/arch/powerpc/boot/simpleboot-yosemite.c >> linux-2.6.28/arch/powerpc/boot/simpleboot-yosemite.c >> --- linux-2.6.28.orig/arch/powerpc/boot/simpleboot-yosemite.c 1969-12-31 >> 17:00:00.000000000 -0700 >> +++ linux-2.6.28/arch/powerpc/boot/simpleboot-yosemite.c 2009-03-06 >> 14:55:46.000000000 -0700 >> @@ -0,0 +1,24 @@ >> +#include "ops.h" >> +#include "stdio.h" >> +#include "4xx.h" >> +#include "44x.h" >> + >> +#define TARGET_4xx >> +#define TARGET_44x >> +#include "ppcboot.h" >> + >> +static void yosemite_fixups(void) >> +{ >> + unsigned long sysclk = 50000000; >> + >> + ibm440ep_fixup_clocks(sysclk, 11059200, 400000000); >> + ibm4xx_sdram_fixup_memsize(); >> + dt_fixup_mac_address_by_alias("ethernet0", eth0adr); >> + dt_fixup_mac_address_by_alias("ethernet1", eth1adr); >> +} >> + >> +void platform_specific_init(void) >> +{ >> + platform_ops.fixups = yosemite_fixups; >> + platform_ops.exit = ibm44x_dbcr_reset; >> +} >> > > > -- > Best Regards, > ________________________________________________________________ > Eddie Dawydiuk, Technologic Systems | voice: (480) 837-5200 > 16525 East Laser Drive | fax: (480) 837-5300 > Fountain Hills, AZ 85268 | web: www.embeddedARM.com > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev >
On Fri, Mar 6, 2009 at 9:22 PM, Grant Likely <grant.likely@secretlab.ca> wrote: > On Fri, Mar 6, 2009 at 3:32 PM, Eddie Dawydiuk <eddie@embeddedarm.com> wrote: >> Hello, >> >> Let's try this one more time. The last patch was using the clocks for a >> custom board based on the Yosemite board and was referencing a non-existent >> ethNadr( I forgot to pull out this code out). > > But the question remains: Why do you need simpleboot support for > Yosemite when you can use a uImage or cuImage with u-boot? On a more general note; this patch also diverges from the original model for simple image. The idea behind simpleimage was that it would contain a fully formed device tree, with no fixups necessary. I want to think carefully before diverging from that. Cheers, g.
Hello, > But the question remains: Why do you need simpleboot support for > Yosemite when you can use a uImage or cuImage with u-boot? We are developing a new board based upon the Yosemite board. Seeing as though the Yosemite board was supported in the mainline kernel I decided to start with that code base. After looking at what different options/images were available for device trees vs open firmware I decided the simpleImage would be the ideal format for our new board. I then read how to build a simpleImage for the Yosemite board, which build without any compiler errors. Although I found the image didn't work, so I figured it might be helpful for others if the image just worked without modifications. Although shortly I will be submitting support for our custom board using this same approach. So if you have any suggestions on this approach using the simpleImage please let me know. On another note, can you tell me/point me to some documentation on how to get a unique machine ID for a new board? -- Best Regards,
Hello, > On a more general note; this patch also diverges from the original > model for simple image. The idea behind simpleimage was that it would > contain a fully formed device tree, with no fixups necessary. I want > to think carefully before diverging from that. I wasn't aware of these design goals... I believe one can also modify the default dts file such that the RAM size is not dynamically detected so the fixups aren't required(although keep in mind I haven't tested this). Although it is quite convenient to add the fixed-head.o so one can jump into the simpleImage at offset 0 rather than having to check what the offset should be each time a change is made. //Eddie
On Sat, Mar 7, 2009 at 8:21 AM, Eddie Dawydiuk <eddie@embeddedarm.com> wrote: > Hello, > >> On a more general note; this patch also diverges from the original >> model for simple image. The idea behind simpleimage was that it would >> contain a fully formed device tree, with no fixups necessary. I want >> to think carefully before diverging from that. > > I wasn't aware of these design goals... I believe one can also modify the > default dts file such that the RAM size is not dynamically detected so the > fixups aren't required(although keep in mind I haven't tested this). Just to be clear, I'm not saying 'no'. I'm just not saying 'yes' yet either. However, if you can fully form the dts file then that is definitely my preference. > Although it is quite convenient to add the fixed-head.o so one can jump > into the simpleImage at offset 0 rather than having to check what the > offset should be each time a change is made. The missing fixed-head thing is a bug. I have no issue with that change. g.
On Sat, Mar 7, 2009 at 8:14 AM, Eddie Dawydiuk <eddie@embeddedarm.com> wrote: > Hello, > >> But the question remains: Why do you need simpleboot support for >> Yosemite when you can use a uImage or cuImage with u-boot? > > We are developing a new board based upon the Yosemite board. Seeing as > though the Yosemite board was supported in the mainline kernel I decided > to start with that code base. After looking at what different > options/images were available for device trees vs open firmware I decided > the simpleImage would be the ideal format for our new board. I then read > how to build a simpleImage for the Yosemite board, which build without any > compiler errors. Although I found the image didn't work, so I figured it > might be helpful for others if the image just worked without > modifications. Although shortly I will be submitting support for our > custom board using this same approach. So if you have any suggestions on > this approach using the simpleImage please let me know. Before I answer this, what bootloader are you using? > On another note, can you tell me/point me to some documentation on how to > get a unique machine ID for a new board? What do you mean? Are you referring to the top level compatible and model properties? g.
On Sat, 7 Mar 2009 08:14:41 -0700 (MST) "Eddie Dawydiuk" <eddie@embeddedarm.com> wrote: > On another note, can you tell me/point me to some documentation on > how to get a unique machine ID for a new board? Do you mean the model in the dts, like "amcc,yosemite"? You just pick one. It is just company name, board name. We based the Pika Warp on the yosemite board but our model name is pika,warp since it is too far removed to use the stock yosemite to use the same DTS. Cheers, Sean
diff -urN linux-2.6.28.orig/arch/powerpc/boot/wrapper linux-2.6.28/arch/powerpc/boot/wrapper --- linux-2.6.28.orig/arch/powerpc/boot/wrapper 2008-12-24 16:26:37.000000000 -0700 +++ linux-2.6.28/arch/powerpc/boot/wrapper 2009-03-05 17:36:10.000000000 -0700 @@ -214,8 +214,12 @@ platformo="$object/simpleboot.o $object/virtex.o" binary=y ;; +simpleboot-yosemite) + platformo="$object/fixed-head.o $object/simpleboot.o $object/simpleboot-yosemite.o" + binary=y + ;; simpleboot-*) - platformo="$object/simpleboot.o" + platformo="$object/fixed-head.o $object/simpleboot.o" binary=y ;;