From: Michal Simek Date: Mon, 24 Sep 2012 14:39:54 +0000 (+0200) Subject: zynq: Remove PLATFORM_CPPFLAGS X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cddc710ca754d0fccef048c7efb68e21d23cfa0f;p=thirdparty%2Fu-boot.git zynq: Remove PLATFORM_CPPFLAGS We don't need it. Signed-off-by: Michal Simek --- diff --git a/arch/arm/cpu/armv7/zynq/config.mk b/arch/arm/cpu/armv7/zynq/config.mk index dd6179cf4da..85996f3255f 100644 --- a/arch/arm/cpu/armv7/zynq/config.mk +++ b/arch/arm/cpu/armv7/zynq/config.mk @@ -20,10 +20,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # -PLATFORM_RELFLAGS += -fno-strict-aliasing +PLATFORM_RELFLAGS += -fno-strict-aliasing # Xilinx, added to prevent unaligned accesses which started happening # with GCC 4.5.2 tools PLATFORM_RELFLAGS += -mno-unaligned-access - -PLATFORM_CPPFLAGS += -I$(TOPDIR)/board/xilinx/common -PLATFORM_CPPFLAGS += -I$(TOPDIR)/board/$(BOARDDIR) - diff --git a/drivers/mtd/nand/zynq_nand.c b/drivers/mtd/nand/zynq_nand.c index f06a817b225..4f2c9443d1b 100644 --- a/drivers/mtd/nand/zynq_nand.c +++ b/drivers/mtd/nand/zynq_nand.c @@ -16,7 +16,7 @@ /* * This driver is based on plat_nand.c and mxc_nand.c drivers */ -#include "xbasic_types.h" +//#include "xbasic_types.h" #include #include @@ -29,6 +29,22 @@ #include #include "zynq_nand.h" +#define dmbp() __asm__ __volatile__ ("dmb" : : : "memory") + +static void XIo_Out32(u32 OutAddress, u32 Value) +{ + *(volatile u32 *) OutAddress = Value; + dmbp(); +} + +static u32 XIo_In32(u32 InAddress) +{ + volatile u32 temp = *(volatile u32 *)InAddress; + dmbp(); + return temp; +} + + /********** stubs - Make Linux code compile in this environment **************/ #define EIO 5 #define ENXIO 6 diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c index e9ff45b41b7..642241d0fc2 100755 --- a/drivers/spi/zynq_qspi.c +++ b/drivers/spi/zynq_qspi.c @@ -27,7 +27,7 @@ #include #else -#include "xbasic_types.h" +//#include "xbasic_types.h" #include #include @@ -44,6 +44,21 @@ #endif +#define dmbp() __asm__ __volatile__ ("dmb" : : : "memory") + +static void XIo_Out32(u32 OutAddress, u32 Value) +{ + *(volatile u32 *) OutAddress = Value; + dmbp(); +} + +static u32 XIo_In32(u32 InAddress) +{ + volatile u32 temp = *(volatile u32 *)InAddress; + dmbp(); + return temp; +} + /****** stubs to make this Linux driver build in this environment **/ #define spin_lock_irqsave(__X__, flags) \