[U-Boot] [PATCH] Wait till UPM completes the write to array.

Selvamuthukumar selva.muthukumar at e-coninfotech.com
Thu Oct 9 06:59:14 CEST 2008


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 <selva.muthukumar at e-coninfotech.com>
---
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



More information about the U-Boot mailing list