Reference manual states that MxMR[MAD] increment is the indication
of write to UPM array is complete. Honour that. Also, make the dummy
write explicit.

Signed-off-by: Selvamuthukumar <[EMAIL PROTECTED]>
---
Ignore the previous patch. Sequence of doing things were wroing in
that.
 cpu/mpc83xx/cpu.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
index be47a20..63aa8a4 100644
--- a/cpu/mpc83xx/cpu.c
+++ b/cpu/mpc83xx/cpu.c
@@ -174,8 +174,9 @@ void upmconfig (uint upm, uint *table, uint size)
        for (i = 0; i < size; i++) {
                lbus->mdr = table[i];
                __asm__ __volatile__ ("sync");
-               *dummy; /* Write the value to memory and increment MAD */
+               *dummy = 0;     /* Write the value to memory and increment MAD 
*/
                __asm__ __volatile__ ("sync");
+               while(((*mxmr & 0x3f) != ((i + 1) & 0x3f)));
        }
 
        /* Set the OP field in the MxMR to "normal" and the MAD field to 000000 
*/
-- 
1.5.5

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to