]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
zynq: common: Optimize XIo_Out32 and XIo_In32 fuctions
authorMichal Simek <monstr@monstr.eu>
Tue, 25 Sep 2012 08:34:59 +0000 (10:34 +0200)
committerMichal Simek <monstr@monstr.eu>
Fri, 5 Oct 2012 13:07:13 +0000 (15:07 +0200)
Signed-off-by: Michal Simek <monstr@monstr.eu>
board/xilinx/zynq_common/board.c

index 4f108abd0aeacc5f624b43ea2a832bd35da6d776..90ce16b07f45065b7a74fda0240d829184a4cc48 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/* Common IO for xgmac and xnand */
-/* Data Memory Barrier */
-#define dmb() __asm__ __volatile__ ("dmb" : : : "memory")
-#define SYNCHRONIZE_IO dmb()
+#define dmbp() __asm__ __volatile__ ("dmb" : : : "memory")
 
-void XIo_Out32(u32 OutAddress, u32 Value)
+static void XIo_Out32(u32 OutAddress, u32 Value)
 {
-       *(volatile u32 *) OutAddress = Value;
-       SYNCHRONIZE_IO;
+    *(volatile u32 *) OutAddress = Value;
+    dmbp();
 }
 
-u32 XIo_In32(u32 InAddress)
+static u32 XIo_In32(u32 InAddress)
 {
-       volatile u32 temp = *(volatile u32 *)InAddress;
-       SYNCHRONIZE_IO;
-       return temp;
+    volatile u32 temp = *(volatile u32 *)InAddress;
+    dmbp();
+    return temp;
 }
 
 #ifdef CONFIG_FPGA