]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Xilinx: ARM: GEM driver cleanup of I/O functions
authorJohn Linn <john.linn@xilinx.com>
Wed, 30 Nov 2011 00:54:52 +0000 (16:54 -0800)
committerJohn Linn <john.linn@xilinx.com>
Wed, 30 Nov 2011 00:54:52 +0000 (16:54 -0800)
The memory barriers appeared to be wrong, this moves the
barriers to be correct.

board/xilinx/dfe/xemacpss_control.c

index 439928696f6084c99a33d4c63472ca4e05f84d2a..5fed8d349f116952f1dcd2570ed1de13f24b3d39 100644 (file)
@@ -965,17 +965,20 @@ int XEmacPss_PhyWrite(XEmacPss *InstancePtr, u32 PhyAddress,
 }
 
 /* Data Memory Barrier */
+
 #define dmb() __asm__ __volatile__ ("dmb" : : : "memory")
 #define SYNCHRONIZE_IO dmb()
 
 void XIo_Out32(u32 OutAddress, u32 Value)
 {
-    SYNCHRONIZE_IO;
     *(volatile u32 *) OutAddress = Value;
+    SYNCHRONIZE_IO;
 }
 
 u32 XIo_In32(u32 InAddress)
 {
-    return *(volatile u32 *) InAddress;
+    volatile u32 * temp = *(volatile u32 *)InAddress;
     SYNCHRONIZE_IO;
+    return temp;
 }
+