From: John Linn Date: Wed, 30 Nov 2011 00:54:52 +0000 (-0800) Subject: Xilinx: ARM: GEM driver cleanup of I/O functions X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c5eb51079b291d6432563e3e1ce6e7fc3328792;p=thirdparty%2Fu-boot.git Xilinx: ARM: GEM driver cleanup of I/O functions The memory barriers appeared to be wrong, this moves the barriers to be correct. --- diff --git a/board/xilinx/dfe/xemacpss_control.c b/board/xilinx/dfe/xemacpss_control.c index 439928696f6..5fed8d349f1 100644 --- a/board/xilinx/dfe/xemacpss_control.c +++ b/board/xilinx/dfe/xemacpss_control.c @@ -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; } +