83xx: Use the proper sequence for updating IMMR.
PATCH 1/1 83xx: Use the proper sequence for updating IMMR.
This ensures that subsequent accesses properly hit the new window.
The dcbi during the NAND loop was accidentally working around this; it's no longer necessary, as the cache is not enabled.
Reported-by Suchit Lepcha <[email protected]>
Signed-off-by Scott Wood <[email protected]>
--- cpu/mpc83xx/start.S | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-)
cpu/mpc83xx/start.S +15 -3
@@ -161,9 +161,23 @@ boot_cold: /* time t 3 */ nop boot_warm: /* time t 5 */ mfmsr r5 /* save msr contents */ + + /* 83xx manuals prescribe a specific sequence for updating IMMRBAR. */ + bl 1f +1: mflr r7 + lis r3, CONFIG_SYS_IMMR at h ori r3, r3, CONFIG_SYS_IMMR at l + + lwz r6, IMMRBAR(r4) + isync + stw r3, IMMRBAR(r4) + lwz r6, 0(r7) /* Arbitrary external load */ + isync + + lwz r6, IMMRBAR(r3) + isync /* Initialise the E300 processor core */ /*------------------------------------------*/
@@ -173,9 +187,7 @@ boot_warm: /* time t 5 */ * is loaded. Wait for the rest before branching * to another flash page. */ - addi r7, r3, 0x50b0 -1: dcbi 0, r7 - lwz r6, 0(r7) +1: lwz r6, 0x50b0(r3) andi. r6, r6, 1 beq 1b #endif
Signature · 1 line
1.5.6.rc1.6.gc53ad
PATCH 1/1 83xx: Use the proper sequence for updating IMMR.
Quoted 8 lines · On Tue, 20 Jan 2009 11:56:11 -0600 Scott Wood <[email protected]> wrote:
This ensures that subsequent accesses properly hit the new window.
The dcbi during the NAND loop was accidentally working around this; it's no longer necessary, as the cache is not enabled.
Reported-by Suchit Lepcha <[email protected]>Signed-off-by Scott Wood <[email protected]>---
applied to u-boot-mpc83xx next.
Thanks,
Kim