From 88d67cb1b4425496607ceaadf893b46a61d304a8 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 3 Sep 2015 10:50:37 +0200 Subject: [PATCH] ARM: zynqmp: Extend cache handling - Add cache on/off functions to Kconfig. ARC has already done it and this should be the same for all platforms. - Disable caches for noatf dc1/dc2 configurations - Enable CMD_CACHE Signed-off-by: Michal Simek --- arch/arm/cpu/armv8/zynqmp/Kconfig | 8 ++++++++ configs/xilinx_zynqmp_zc1751_xm015_dc1_noatf_defconfig | 2 ++ configs/xilinx_zynqmp_zc1751_xm016_dc2_noatf_defconfig | 2 ++ include/configs/xilinx_zynqmp.h | 2 ++ 4 files changed, 14 insertions(+) diff --git a/arch/arm/cpu/armv8/zynqmp/Kconfig b/arch/arm/cpu/armv8/zynqmp/Kconfig index 3dba8b2ec1f..e87d217f47d 100644 --- a/arch/arm/cpu/armv8/zynqmp/Kconfig +++ b/arch/arm/cpu/armv8/zynqmp/Kconfig @@ -45,4 +45,12 @@ config NAND_ARASAN config ZYNQMP_USB bool "Configure ZynqMP USB" +config SYS_DCACHE_OFF + bool "Do not use Data Cache" + default n + +config SYS_ICACHE_OFF + bool "Do not use Instruction Cache" + default n + endif diff --git a/configs/xilinx_zynqmp_zc1751_xm015_dc1_noatf_defconfig b/configs/xilinx_zynqmp_zc1751_xm015_dc1_noatf_defconfig index a57b16085f7..7732f4247f4 100644 --- a/configs/xilinx_zynqmp_zc1751_xm015_dc1_noatf_defconfig +++ b/configs/xilinx_zynqmp_zc1751_xm015_dc1_noatf_defconfig @@ -1,4 +1,6 @@ CONFIG_ARM=y +CONFIG_SYS_ICACHE_OFF=y +CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_ZYNQMP=y CONFIG_TARGET_ZYNQMP_ZC1751_XM015_DC1=y CONFIG_SECURE_IOU=y diff --git a/configs/xilinx_zynqmp_zc1751_xm016_dc2_noatf_defconfig b/configs/xilinx_zynqmp_zc1751_xm016_dc2_noatf_defconfig index 29e6977468d..15db35f655b 100644 --- a/configs/xilinx_zynqmp_zc1751_xm016_dc2_noatf_defconfig +++ b/configs/xilinx_zynqmp_zc1751_xm016_dc2_noatf_defconfig @@ -1,4 +1,6 @@ CONFIG_ARM=y +CONFIG_SYS_ICACHE_OFF=y +CONFIG_SYS_DCACHE_OFF=y CONFIG_ARCH_ZYNQMP=y CONFIG_TARGET_ZYNQMP_ZC1751_XM016_DC2=y CONFIG_SECURE_IOU=y diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index 6bdae288dd0..ba531a5f3db 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -289,4 +289,6 @@ #define CONFIG_BOARD_EARLY_INIT_R #define CONFIG_CLOCKS +#define CONFIG_CMD_CACHE + #endif /* __XILINX_ZYNQMP_H */ -- 2.47.3