Dear Kumar Gala, In message <1248187378-5970-1-git-send-email-ga...@kernel.crashing.org> you wrote: > The p2020DS, MPC8536DS, MPC8572DS, MPC8544DS boards are capable of > swizzling the upper address bits of the NOR flash we boot out of which > creates the concept of "virtual" banks. This is useful in that we can > flash a test of image of u-boot and reset to one of the virtual banks > while still maintaining a working image in "bank 0". > > The PIXIS FPGA exposes registers on LBC which we can use to determine > which "bank" we are booting out of (as well as setting which bank to > boot out of). > > Signed-off-by: Kumar Gala <ga...@kernel.crashing.org> > --- > * This is a merged version of previous patches that covers all the 85xx boards > > board/freescale/mpc8536ds/mpc8536ds.c | 18 ++++++++++++++++-- > board/freescale/mpc8544ds/mpc8544ds.c | 11 +++++++++-- > board/freescale/mpc8572ds/mpc8572ds.c | 21 ++++++++++++++++++++- > board/freescale/p2020ds/p2020ds.c | 12 +++++++++++- > 4 files changed, 56 insertions(+), 6 deletions(-) > > diff --git a/board/freescale/mpc8536ds/mpc8536ds.c > b/board/freescale/mpc8536ds/mpc8536ds.c > index 28b27ee..91fb87b 100644 > --- a/board/freescale/mpc8536ds/mpc8536ds.c > +++ b/board/freescale/mpc8536ds/mpc8536ds.c > @@ -60,10 +60,24 @@ int board_early_init_f (void) > > int checkboard (void) > { > - printf ("Board: MPC8536DS, System ID: 0x%02x, " > - "System Version: 0x%02x, FPGA Version: 0x%02x\n", > + u8 vboot; > + > + puts("Board: MPC8536DS "); > +#ifdef CONFIG_PHYS_64BIT > + puts("(36-bit addrmap) "); > +#endif > + > + printf ("Sys ID: 0x%02x, " > + "Sys Ver: 0x%02x, FPGA Ver: 0x%02x, ", > in8(PIXIS_BASE + PIXIS_ID), in8(PIXIS_BASE + PIXIS_VER), > in8(PIXIS_BASE + PIXIS_PVER)); > + > + vboot = in8(PIXIS_BASE + 0x16); > + if ((vboot >> 7) & 0x1) > + puts ("Promjet\n"); > + else > + printf ("vBank: %d\n", ((vboot >> 5) & 0x3)); > + > return 0; > }
So how many boards are copying this mostly identical code? How about factoring out the big common parts? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Mirrors should reflect a little before throwing back images. - Jean Cocteau _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot