Wolfgang Denk wrote: > Dear hendrik, > > In message <4989a792.2080...@gmail.com> you wrote: > >> Im new to U-boot and need help. I am using U-boot-2009.10 and a MPC8548 >> board with 512MB DDR and 128Mb nor Flash(using cfi) >> > ... > >> I think the sram is mapped over the flash boot region and when i try to >> erase and cp to the bootreagion the commands and date gets lost. Can >> anyone help me find the problem? >> > > Fix your BDI2000 config file. Try and not map SRAM at all. Or simply > start the board using "reset run" so the init statements are not > executed. > > Best regards, > > Wolfgang Denk What happens is that booting with the BDI2000 your cpu's cache is used as SRAM into witch the BDI loads your u-boot image. The old uboot used to return this mapped SRAM to normal L2 cache, but in the new U-boot the L2 cache is not set to back to cache due to an if statement which checks if cache is enabled but does not check to see if the L2 cache is used as SRAM or cache( cpu_init_r()) .( I would like to know the reason for this ?)
An easy workaround to unmap the SRAM and gain access to your flash is to write a u-boot script or simply do the following: find the addres of your relocated CCSRBAR , in my case: 0xe000 0000 get the offset for L2 Control Register L2CTL from data sheet: 0x0002 0000 (mpc8548) now simply write 0x20000000 to CCSRBAR + L2CTL(offset): mw 0xe0020000 0x20000000 this unmappes the SRAM making your flash available and sets up the L2 cache
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot