public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabian Cenedese <Cenedese@indel.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot] P2020 SPL L2 clearing
Date: Fri, 11 Feb 2011 15:34:31 +0100	[thread overview]
Message-ID: <5.2.0.9.1.20110211152920.03f2fea0@localhost> (raw)
In-Reply-To: <A82FF831-1DC5-4564-9936-28BB2A4E63BD@kernel.crashing.org>


>>> 2. Why does the cache to be cleared at all? L2-SRAM is usually
>>> just used to copy in the second part of the u-boot image, so
>>> the 0s will be overwritten again anyway.
>
>This needs to be done because we enable ECC.

I'm still trying to get my head around this. From looking at the code
this doesn't seem to be necessary. The ECC errors are disabled
before L2 is configured as SRAM:

cpu_init_f (NAND)
        /* set MBECCDIS=1, SBECCDIS=1 */
        out_be32(&l2cache->l2errdis,
                (MPC85xx_L2ERRDIS_MBECC | MPC85xx_L2ERRDIS_SBECC));

        /* set L2E=1 & L2SRAM=001 */
        out_be32(&l2cache->l2ctl,
                (MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2SRAM_ENTIRE));

And these ECC disable bits are only cleared once the u-boot has
already been copied to RAM and L2 is really used as cache:

cpu_init_r
                /* set MBECCDIS=0, SBECCDIS=0 */
                clrbits_be32(&l2cache->l2errdis,
                                (MPC85xx_L2ERRDIS_MBECC |
                                 MPC85xx_L2ERRDIS_SBECC));

So am I getting something wrong?

Thanks

bye  Fabi

  parent reply	other threads:[~2011-02-11 14:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-03 13:17 [U-Boot] P2020 SPL L2 clearing Fabian Cenedese
2011-02-07 10:22 ` Fabian Cenedese
2011-02-08 16:55   ` Kumar Gala
2011-02-09  8:06     ` Fabian Cenedese
2011-02-09 16:18       ` Kumar Gala
2011-02-11 14:34     ` Fabian Cenedese [this message]
2011-02-12 17:44       ` Kumar Gala

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=5.2.0.9.1.20110211152920.03f2fea0@localhost \
    --to=cenedese@indel.ch \
    --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