diff --git a/arch/arm/cpu/armv8/zynqmp/Kconfig b/arch/arm/cpu/armv8/zynqmp/Kconfig index 9e521ed874b65cec2fc9079c0f076cc7601efae8..8a311e1c894bfc85ee8da905a908b5ce5e3a947a 100644 --- a/arch/arm/cpu/armv8/zynqmp/Kconfig +++ b/arch/arm/cpu/armv8/zynqmp/Kconfig @@ -96,6 +96,9 @@ config SPL_ZYNQMP_ALT_BOOTMODE_ENABLED Overwrite bootmode selected via boot mode pins to tell SPL what should be the next boot device. +config ZYNQ_SDHCI_MAX_FREQ + default 200000000 + config SPL_ZYNQMP_ALT_BOOTMODE hex default 0x0 if JTAG_MODE diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig index b9cd45ba095f311a73f1bbf329698bda9be92d9b..87729047f9990ab92c7511db86f514181a71e136 100644 --- a/arch/arm/mach-zynq/Kconfig +++ b/arch/arm/mach-zynq/Kconfig @@ -63,4 +63,7 @@ config BOOT_INIT_FILE Add register writes to boot.bin format (max 256 pairs). Expect a table of register-value pairs, e.g. "0x12345678 0x4321" +config ZYNQ_SDHCI_MAX_FREQ + default 52000000 + endif diff --git a/configs/xilinx_zynqmp_ep_defconfig b/configs/xilinx_zynqmp_ep_defconfig index 7f8e774ec0861541ee7eec66bef0d76b6dc140b2..00db5e3607283a4e8f01e948e3a8d200772362ac 100644 --- a/configs/xilinx_zynqmp_ep_defconfig +++ b/configs/xilinx_zynqmp_ep_defconfig @@ -3,6 +3,7 @@ CONFIG_SYS_CONFIG_NAME="xilinx_zynqmp_ep" CONFIG_ARCH_ZYNQMP=y CONFIG_SYS_TEXT_BASE=0x8000000 CONFIG_SYS_MALLOC_F_LEN=0x8000 +CONFIG_ZYNQ_SDHCI_MAX_FREQ=52000000 CONFIG_ZYNQMP_USB=y CONFIG_DEFAULT_DEVICE_TREE="zynqmp-ep108" CONFIG_DEBUG_UART=y diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 88a13591adf330f5f7db38e1ed59a5447c551289..9967fffbd47d3663ddebddb6a971bc40a768decc 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -481,6 +481,12 @@ config MMC_SDHCI_ZYNQ help Support for Arasan SDHCI host controller on Zynq/ZynqMP ARM SoCs platform +config ZYNQ_SDHCI_MAX_FREQ + int "Set the maximum frequency of the controller" + depends on MMC_SDHCI_ZYNQ + help + Set the maximum frequency of the controller. + config MMC_SUNXI bool "Allwinner sunxi SD/MMC Host Controller support" depends on ARCH_SUNXI && !UART0_PORT_F diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index 825af80d23dfefd2151af9d27b386b791658cd49..f5fc24578c75f5dd5713e20c0873f3517fa66e4f 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -56,9 +56,6 @@ #if defined(CONFIG_MMC_SDHCI_ZYNQ) # define CONFIG_SUPPORT_EMMC_BOOT -# ifndef CONFIG_ZYNQ_SDHCI_MAX_FREQ -# define CONFIG_ZYNQ_SDHCI_MAX_FREQ 200000000 -# endif #endif #ifdef CONFIG_NAND_ARASAN diff --git a/include/configs/xilinx_zynqmp_ep.h b/include/configs/xilinx_zynqmp_ep.h index 3a572b7a6c2f4df9ae38ba860f70ab890ce4ab61..a77eeea8a25100a6a003f70a097225550a1d86a7 100644 --- a/include/configs/xilinx_zynqmp_ep.h +++ b/include/configs/xilinx_zynqmp_ep.h @@ -13,7 +13,6 @@ #ifndef __CONFIG_ZYNQMP_EP_H #define __CONFIG_ZYNQMP_EP_H -#define CONFIG_ZYNQ_SDHCI_MAX_FREQ 52000000 #define CONFIG_ZYNQ_SDHCI_MIN_FREQ (CONFIG_ZYNQ_SDHCI_MAX_FREQ >> 9) #define CONFIG_ZYNQ_EEPROM #define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR, \ diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h index 0ebb66b468e5576609b5c6567d1ab295934419d3..554fb666346c6329f243c70302d749e2127c20c4 100644 --- a/include/configs/zynq-common.h +++ b/include/configs/zynq-common.h @@ -73,11 +73,6 @@ #define CONFIG_MTD_DEVICE #endif -/* MMC */ -#if defined(CONFIG_MMC_SDHCI_ZYNQ) -# define CONFIG_ZYNQ_SDHCI_MAX_FREQ 52000000 -#endif - #ifdef CONFIG_USB_EHCI_ZYNQ # define CONFIG_EHCI_IS_TDI