[U-Boot] can't update U-boot when booting with BDI2000

Pieter phenning at vastech.co.za
Thu Feb 5 10:07:25 CET 2009


Wolfgang Denk wrote:
> Dear hendrik,
>
> In message <4989A792.2080503 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2722 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090205/8e1e5efe/attachment-0001.bin 


More information about the U-Boot mailing list