summaryrefslogtreecommitdiff
path: root/lib_ppc/bat_rw.c
diff options
context:
space:
mode:
authorBecky Bruce <becky.bruce@freescale.com>2008-08-04 14:01:53 -0500
committerWolfgang Denk <wd@denx.de>2008-08-11 23:52:49 +0200
commit9de67149db576c91b9c2a0a182652331e7e44211 (patch)
tree923cab679ebd74edb3279ca9b761c76e52cce248 /lib_ppc/bat_rw.c
parent23f935c073e7578c6066804fd2f9ee116cae6ffe (diff)
downloadu-boot-imx-9de67149db576c91b9c2a0a182652331e7e44211.zip
u-boot-imx-9de67149db576c91b9c2a0a182652331e7e44211.tar.gz
u-boot-imx-9de67149db576c91b9c2a0a182652331e7e44211.tar.bz2
POWERPC: Add synchronization to write_bat in lib_ppc/bat_rw.c
Perform sync/isync as required by the architecture. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Acked-by: Jon Loeliger <jdl@freescale.com>
Diffstat (limited to 'lib_ppc/bat_rw.c')
-rw-r--r--lib_ppc/bat_rw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib_ppc/bat_rw.c b/lib_ppc/bat_rw.c
index 8546333..a40b377 100644
--- a/lib_ppc/bat_rw.c
+++ b/lib_ppc/bat_rw.c
@@ -25,9 +25,12 @@
#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);
}