[U-Boot] [PATCH] zynq: sdhci: Define max clock by macro
Michal Simek
michal.simek at xilinx.com
Tue Oct 27 16:21:42 CET 2015
zc1571 with silicon can operate on 200MHz maximum frequency. Setup this
frequency by default and fix setting for ep108.
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---
drivers/mmc/zynq_sdhci.c | 2 +-
include/configs/xilinx_zynqmp.h | 3 +++
include/configs/xilinx_zynqmp_ep.h | 1 +
include/configs/zynq-common.h | 1 +
4 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index c69f5d4e2d44..e169b774932a 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -29,7 +29,7 @@ int zynq_sdhci_init(phys_addr_t regbase)
SDHCI_QUIRK_BROKEN_R1B;
host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
- add_sdhci(host, 52000000, 52000000 >> 9);
+ add_sdhci(host, CONFIG_ZYNQ_SDHCI_MAX_FREQ, 52000000 >> 9);
return 0;
}
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 32ee0fc149ff..921a3d48c045 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -96,6 +96,9 @@
# define CONFIG_SDHCI
# define CONFIG_ZYNQ_SDHCI
# define CONFIG_CMD_MMC
+# ifndef CONFIG_ZYNQ_SDHCI_MAX_FREQ
+# define CONFIG_ZYNQ_SDHCI_MAX_FREQ 200000000
+# endif
#endif
#if defined(CONFIG_ZYNQ_SDHCI)
diff --git a/include/configs/xilinx_zynqmp_ep.h b/include/configs/xilinx_zynqmp_ep.h
index e476eb1b496d..78e7a9dbaa3e 100644
--- a/include/configs/xilinx_zynqmp_ep.h
+++ b/include/configs/xilinx_zynqmp_ep.h
@@ -20,6 +20,7 @@
#define CONFIG_ZYNQ_SERIAL_UART0
#define CONFIG_ZYNQ_SDHCI0
+#define CONFIG_ZYNQ_SDHCI_MAX_FREQ 52000000
#define CONFIG_ZYNQ_I2C0
#define CONFIG_SYS_I2C_ZYNQ
#define CONFIG_ZYNQ_EEPROM
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 66b1e699c80b..d67df7b2131c 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -95,6 +95,7 @@
# define CONFIG_SDHCI
# define CONFIG_ZYNQ_SDHCI
# define CONFIG_CMD_MMC
+# define CONFIG_ZYNQ_SDHCI_MAX_FREQ 52000000
#endif
#ifdef CONFIG_ZYNQ_USB
--
2.5.0
More information about the U-Boot
mailing list