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]>
---
 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..ab0a374 100644
--- a/cpu/mpc83xx/cpu.c
+++ b/cpu/mpc83xx/cpu.c
@@ -174,7 +174,8 @@ 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 
*/
+               while(((*mxmr & 0x3f) != ((i + 1) & 0x3f)));
                __asm__ __volatile__ ("sync");
        }
 
-- 
1.5.5

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

Reply via email to