Moved initialization of EEPRO100 Ethernet controller to board_eth_init()
[platform/kernel/u-boot.git] / lib_ppc / bat_rw.c
index 8546333..a40b377 100644 (file)
 #include <common.h>
 #include <asm/processor.h>
 #include <asm/mmu.h>
+#include <asm/io.h>
 
 int write_bat (ppc_bat_t bat, unsigned long upper, unsigned long lower)
 {
+       sync();
+
        switch (bat) {
        case DBAT0:
                mtspr (DBAT0L, lower);
@@ -99,6 +102,9 @@ int write_bat (ppc_bat_t bat, unsigned long upper, unsigned long lower)
                return (-1);
        }
 
+       sync();
+       isync();
+
        return (0);
 }