mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-17 12:41:32 +00:00
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>
This commit is contained in:
parent
23f935c073
commit
9de67149db
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue