[U-Boot] [PATCH] Wait till UPM completes the write to array.
Selvamuthukumar
selva.muthukumar at e-coninfotech.com
Thu Oct 9 06:42:08 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>
---
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
More information about the U-Boot
mailing list