public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Pieter <phenning@vastech.co.za>
To: u-boot@lists.denx.de
Subject: [U-Boot] can't update U-boot when booting with BDI2000
Date: Thu, 05 Feb 2009 11:07:25 +0200	[thread overview]
Message-ID: <498AAC4D.4040109@vastech.co.za> (raw)
In-Reply-To: <20090204154309.CECDC8322908@gemini.denx.de>

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 

      reply	other threads:[~2009-02-05  9:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=498AAC4D.4040109@vastech.co.za \
    --to=phenning@vastech.co.za \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox