* [U-Boot] can't update U-boot when booting with BDI2000
@ 2009-02-04 14:34 hendrik
2009-02-04 15:43 ` Wolfgang Denk
0 siblings, 1 reply; 3+ messages in thread
From: hendrik @ 2009-02-04 14:34 UTC (permalink / raw)
To: u-boot
Hi
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 am booting the board using a BDI2000 by loading my u-boot.bin file to
the bootregion in my memory map (FFF80000) and running from the reset
vector. Uboot starts up and works fine. I am able to unprotected the
flash ( confirmed with flinfo) and can erase sectors other than the
bootsector. I have placed the output below.
UBoot=> protect off all
Un-Protect Flash Bank # 1
UBoot=> erase fff80000 ffffffff
.. done
Erased 2 sectors
UBoot=>
When I look at the erased memory using md the u-boot image that was
loaded into memory by the bdi is shown at the bootsector address fff80000
UBoot=> md fff80000
fff80000: 00300030 552d426f 6f742032 3030392e .0.0U-Boot 2009.
fff80010: 30312d30 30323236 2d673663 36653034 01-00226-g6c6e04
if i reboot the board not using the BDI the bootregion shows the old
uboot image and was not erased.
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?
thanks Hendrik
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] can't update U-boot when booting with BDI2000
2009-02-04 14:34 [U-Boot] can't update U-boot when booting with BDI2000 hendrik
@ 2009-02-04 15:43 ` Wolfgang Denk
2009-02-05 9:07 ` Pieter
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2009-02-04 15:43 UTC (permalink / raw)
To: u-boot
Dear hendrik,
In message <4989A792.2080503@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
--
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: wd at denx.de
Diplomacy is the art of saying "nice doggy" until you can find a rock.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] can't update U-boot when booting with BDI2000
2009-02-04 15:43 ` Wolfgang Denk
@ 2009-02-05 9:07 ` Pieter
0 siblings, 0 replies; 3+ messages in thread
From: Pieter @ 2009-02-05 9:07 UTC (permalink / raw)
To: u-boot
Wolfgang Denk wrote:
> Dear hendrik,
>
> In message <4989A792.2080503@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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-05 9:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-04 14:34 [U-Boot] can't update U-boot when booting with BDI2000 hendrik
2009-02-04 15:43 ` Wolfgang Denk
2009-02-05 9:07 ` Pieter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox