83xx NAND boot: wait for LTESR[CC]
authorLepcha Suchit <Suchit.Lepcha@freescale.com>
Thu, 16 Oct 2008 18:38:00 +0000 (13:38 -0500)
committerScott Wood <scottwood@freescale.com>
Fri, 17 Oct 2008 15:39:18 +0000 (10:39 -0500)
At least some revisions of the 8313, and possibly other chips, do not
wait for all pages of the initial 4K NAND region to be loaded before
beginning execution; thus, we wait for it before branching out of the
first NAND page.

This fixes warm reset problems when booting from NAND on 8313erdb.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cpu/mpc83xx/start.S

index 14bfbda..6ff6682 100644 (file)
@@ -167,6 +167,18 @@ boot_warm: /* time t 5 */
        /* Initialise the E300 processor core           */
        /*------------------------------------------*/
 
+#ifdef CONFIG_NAND_SPL
+       /* The FCM begins execution after only the first page
+        * is loaded.  Wait for the rest before branching
+        * to another flash page.
+        */
+       addi    r7, r3, 0x50b0
+1:     dcbi    0, r7
+       lwz     r6, 0(r7)
+       andi.   r6, r6, 1
+       beq     1b
+#endif
+
        bl      init_e300_core
 
 #ifdef CFG_FLASHBOOT