From: Michal Simek Date: Tue, 25 Sep 2012 08:34:59 +0000 (+0200) Subject: zynq: common: Optimize XIo_Out32 and XIo_In32 fuctions X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eaf0d904957104da6afba4ad6abf3b77e1ad8e3b;p=thirdparty%2Fu-boot.git zynq: common: Optimize XIo_Out32 and XIo_In32 fuctions Signed-off-by: Michal Simek --- diff --git a/board/xilinx/zynq_common/board.c b/board/xilinx/zynq_common/board.c index 4f108abd0ae..90ce16b07f4 100644 --- a/board/xilinx/zynq_common/board.c +++ b/board/xilinx/zynq_common/board.c @@ -30,22 +30,19 @@ 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