From 9de67149db576c91b9c2a0a182652331e7e44211 Mon Sep 17 00:00:00 2001 From: Becky Bruce Date: Mon, 4 Aug 2008 14:01:53 -0500 Subject: 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 Acked-by: Jon Loeliger --- lib_ppc/bat_rw.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 #include #include +#include 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); } -- cgit v1.1