Skip to content
Snippets Groups Projects
Commit 9de67149 authored by Becky Bruce's avatar Becky Bruce Committed by Wolfgang Denk
Browse files

POWERPC: Add synchronization to write_bat in lib_ppc/bat_rw.c


Perform sync/isync as required by the architecture.

Signed-off-by: default avatarBecky Bruce <becky.bruce@freescale.com>
Acked-by: default avatarJon Loeliger <jdl@freescale.com>
parent 23f935c0
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment