From: Jon Loeliger Date: Mon, 11 Aug 2008 11:24:43 -0500 Subject: [U-Boot] [U-Boot-Users] [PATCH] POWERPC: Add synchronization to write_bat in lib_ppc/bat_rw.c In-Reply-To: <1217876513-4043-1-git-send-email-becky.bruce@freescale.com> References: <1217876513-4043-1-git-send-email-becky.bruce@freescale.com> Message-ID: <1218471883.12261.15.camel@ld0161-tx32> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 2008-08-04 at 14:01 -0500, Becky Bruce wrote: > Perform sync/isync as required by the architecture. > > Signed-off-by: Becky Bruce > --- > lib_ppc/bat_rw.c | 6 ++++++ > 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 > #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); > } > Acked-by: Jon Loeliger Thanks, jdl