zynq: sdhci: Define max clock by macro
authorMichal Simek <michal.simek@xilinx.com>
Mon, 28 Sep 2015 23:27:13 +0000 (01:27 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 19 Nov 2015 13:03:05 +0000 (14:03 +0100)
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@xilinx.com>
drivers/mmc/zynq_sdhci.c
include/configs/xilinx_zynqmp.h
include/configs/xilinx_zynqmp_ep.h
include/configs/zynq-common.h

index c69f5d4e2d44ac52f90ca24251593f95ed660f55..e169b774932aa91e91cc95afcf6ef2ed578aaee7 100644 (file)
@@ -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;
 }
 
index 574f788500bf9afcc4448ce3e1d7f7305d9a1d62..e990512083e849b6136283f4ef9651361b423d89 100644 (file)
@@ -94,6 +94,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)
index ed6023a7bfabc55d789d5e83c0b2fb6e6d29fc70..8bdb5c9c6d5c4fcc66471cc90b6437b6982fffe0 100644 (file)
@@ -19,6 +19,7 @@
 #define CONFIG_ZYNQ_GEM_PHY_ADDR0      7
 
 #define CONFIG_ZYNQ_SDHCI0
+#define CONFIG_ZYNQ_SDHCI_MAX_FREQ     52000000
 #define CONFIG_ZYNQ_I2C0
 #define CONFIG_SYS_I2C_ZYNQ
 #define CONFIG_ZYNQ_EEPROM
index f33a3bcc68ac6b694047b3677c4a2ea81411c60a..d10f1ddacaf51f5078f89a15b4f83cc371665606 100644 (file)
 # define CONFIG_SDHCI
 # define CONFIG_ZYNQ_SDHCI
 # define CONFIG_CMD_MMC
+# define CONFIG_ZYNQ_SDHCI_MAX_FREQ    52000000
 #endif
 
 #ifdef CONFIG_ZYNQ_USB