]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Xilinx: ARM: Making XIo_Out32 and XIo_In32 in a board file
authorJagan <jaganna@xilinx.com>
Tue, 29 May 2012 12:46:45 +0000 (18:16 +0530)
committerJagan <jaganna@xilinx.com>
Thu, 31 May 2012 08:00:46 +0000 (13:30 +0530)
As we compiled the code based on the board selection,
we placed the IO macros on board file where xgmac and xnand
can use.

Signed-off-by: Jagan <jaganna@xilinx.com>
board/xilinx/zynq_common/board.c
board/xilinx/zynq_common/xemacpss_control.c
board/xilinx/zynq_common/xilinx_nandpss.c

index 5a1da9f894027f55e7f74cfa6c63400f10a43f40..2cbd2fe2f90928aacdccedc5d60c21bb0dfb58a5 100644 (file)
@@ -48,6 +48,24 @@ static u8 In8(u32 InAddress)
     return *(u8 *) InAddress;
 }
 
+/* Common IO for xgmac and xnand */
+/* Data Memory Barrier */
+#define dmb() __asm__ __volatile__ ("dmb" : : : "memory")
+#define SYNCHRONIZE_IO dmb()
+
+void XIo_Out32(u32 OutAddress, u32 Value)
+{
+       *(volatile u32 *) OutAddress = Value;
+       SYNCHRONIZE_IO;
+}
+
+u32 XIo_In32(u32 InAddress)
+{
+       volatile u32 * temp = *(volatile u32 *)InAddress;
+       SYNCHRONIZE_IO;
+       return temp;
+}
+
 #ifndef CONFIG_SYS_NO_FLASH
 /*
  * init_nor_flash init the parameters of pl353 for the M29EW Flash
index 5fed8d349f116952f1dcd2570ed1de13f24b3d39..f1ae479a0b59b3ed45593f0988d7cf4fb231ec0a 100644 (file)
@@ -963,22 +963,3 @@ int XEmacPss_PhyWrite(XEmacPss *InstancePtr, u32 PhyAddress,
 
        return (XST_SUCCESS);
 }
-
-/* Data Memory Barrier */
-
-#define dmb() __asm__ __volatile__ ("dmb" : : : "memory")
-#define SYNCHRONIZE_IO dmb()
-
-void XIo_Out32(u32 OutAddress, u32 Value)
-{
-    *(volatile u32 *) OutAddress = Value;
-    SYNCHRONIZE_IO;
-}
-
-u32 XIo_In32(u32 InAddress)
-{
-    volatile u32 * temp = *(volatile u32 *)InAddress;
-    SYNCHRONIZE_IO;
-    return temp;
-}
-
index f237e65399e4d30ade6accc19ebe6f80f944f90f..25017712396d843625cd10341e83277581b9a074 100644 (file)
 #include <linux/mtd/nand_ecc.h>
 #include "xilinx_nand_smc.h"
 
-/* Data Memory Barrier */
-#define dmb() __asm__ __volatile__ ("dmb" : : : "memory")
-#define SYNCHRONIZE_IO dmb()
-
-void XIo_Out32(u32 OutAddress, u32 Value)
-{
-       *(volatile u32 *) OutAddress = Value;
-       SYNCHRONIZE_IO;
-}
-
-u32 XIo_In32(u32 InAddress)
-{
-       volatile u32 * temp = *(volatile u32 *)InAddress;
-       SYNCHRONIZE_IO;
-       return temp;
-}
-
 /********** stubs - Make Linux code compile in this environment **************/
 #define EIO              5
 #define ENXIO            6