Skip to contentSkip to conversation

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

PATCH New Becky Bruce 3 participants 3 messages Aug 4, 2008 – Aug 11, 2008

lore
Share & tools
lore
#0 lore raw

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

Perform sync/isync as required by the architecture.

---
 lib_ppc/bat_rw.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
lib_ppc/bat_rw.c +6 -0
index 8546333..a40b377 100644
@@ -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);
 }
 
Signature · 1 line
1.5.5.1
#1 lore raw

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

Quoted 25 lines · Becky Bruce

Perform sync/isync as required by the architecture.

---
 lib_ppc/bat_rw.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
lib_ppc/bat_rw.c +3 -0
index 8546333..a40b377 100644
@@ -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);

lib_ppc/bat_rw.c int write_bat (ppc_bat_t bat, unsigned long upper, unsigned long lower) · line 110

Quoted 9 lines
lib_ppc/bat_rw.c +3 -0
@@ -99,6 +102,9 @@ int write_bat (ppc_bat_t bat, unsigned long upper, unsigned long lower)
 		return (-1);
 	}
 
+	sync();
+	isync();
+
 	return (0);
 }
 

Thanks,
jdl

#2 lore raw

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

In reply to Becky Bruce

Dear Becky Bruce,

Quoted 6 lines · In message <[email protected]> you…

Perform sync/isync as required by the architecture.

---
 lib_ppc/bat_rw.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"We don't care.  We don't have to.  We're the Phone Company."