summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/Kconfig2
-rw-r--r--drivers/mmc/am654_sdhci.c1
-rw-r--r--drivers/mmc/arm_pl180_mmci.c2
-rw-r--r--drivers/mmc/bcm2835_sdhci.c1
-rw-r--r--drivers/mmc/bcm2835_sdhost.c3
-rw-r--r--drivers/mmc/davinci_mmc.c1
-rw-r--r--drivers/mmc/dw_mmc.c3
-rw-r--r--drivers/mmc/fsl_esdhc.c3
-rw-r--r--drivers/mmc/fsl_esdhc_imx.c4
-rw-r--r--drivers/mmc/ftsdc010_mci.c2
-rw-r--r--drivers/mmc/gen_atmel_mci.c2
-rw-r--r--drivers/mmc/iproc_sdhci.c1
-rw-r--r--drivers/mmc/jz_mmc.c2
-rw-r--r--drivers/mmc/kona_sdhci.c1
-rw-r--r--drivers/mmc/meson_gx_mmc.c1
-rw-r--r--drivers/mmc/mmc-uclass.c1
-rw-r--r--drivers/mmc/mmc.c4
-rw-r--r--drivers/mmc/mmc_boot.c1
-rw-r--r--drivers/mmc/mmc_legacy.c1
-rw-r--r--drivers/mmc/mmc_spi.c2
-rw-r--r--drivers/mmc/mmc_write.c1
-rw-r--r--drivers/mmc/mvebu_mmc.c1
-rw-r--r--drivers/mmc/mxsmmc.c3
-rw-r--r--drivers/mmc/omap_hsmmc.c4
-rw-r--r--drivers/mmc/pxa_mmc_gen.c1
-rw-r--r--drivers/mmc/renesas-sdhi.c3
-rw-r--r--drivers/mmc/rockchip_dw_mmc.c2
-rw-r--r--drivers/mmc/rpmb.c1
-rw-r--r--drivers/mmc/s5p_sdhci.c1
-rw-r--r--drivers/mmc/sandbox_mmc.c1
-rw-r--r--drivers/mmc/sdhci-cadence.c2
-rw-r--r--drivers/mmc/sdhci.c24
-rw-r--r--drivers/mmc/sh_mmcif.c3
-rw-r--r--drivers/mmc/sh_sdhi.c4
-rw-r--r--drivers/mmc/socfpga_dw_mmc.c1
-rw-r--r--drivers/mmc/sti_sdhci.c1
-rw-r--r--drivers/mmc/stm32_sdmmc2.c7
-rw-r--r--drivers/mmc/sunxi_mmc.c2
-rw-r--r--drivers/mmc/tegra_mmc.c3
-rw-r--r--drivers/mmc/tmio-common.c1
-rw-r--r--drivers/mmc/tmio-common.h1
-rw-r--r--drivers/mmc/xenon_sdhci.c2
-rw-r--r--drivers/mmc/zynq_sdhci.c17
43 files changed, 103 insertions, 21 deletions
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 8f0df568b9..3c4f057373 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -616,7 +616,7 @@ config MMC_SDHCI_TANGIER
config MMC_SDHCI_TEGRA
bool "SDHCI platform support for the Tegra SD/MMC Controller"
- depends on TEGRA
+ depends on ARCH_TEGRA
select BOUNCE_BUFFER
default y
help
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index ca76e1f559..cbc531dc53 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -13,6 +13,7 @@
#include <regmap.h>
#include <sdhci.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/err.h>
/* CTL_CFG Registers */
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index d396afc14c..846622892a 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -14,6 +14,7 @@
#include "common.h"
#include <clk.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <mmc.h>
#include <dm/device_compat.h>
@@ -22,6 +23,7 @@
#include <asm-generic/gpio.h>
#include "arm_pl180_mmci.h"
+#include <linux/delay.h>
#ifdef CONFIG_DM_MMC
#include <dm.h>
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 39c93db275..dc3dffb657 100644
--- a/drivers/mmc/bcm2835_sdhci.c
+++ b/drivers/mmc/bcm2835_sdhci.c
@@ -38,6 +38,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include <sdhci.h>
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index 8cebf99c58..c4876e81f8 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -37,7 +37,10 @@
#include <asm/arch/mbox.h>
#include <asm/unaligned.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
+#include <linux/bug.h>
#include <linux/compat.h>
+#include <linux/delay.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/sizes.h>
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index ef5cd4e723..2408a687d2 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <asm/arch/sdmmc_defs.h>
#include <asm-generic/gpio.h>
+#include <linux/delay.h>
#define DAVINCI_MAX_BLOCKS (32)
#define WATCHDOG_COUNT (100000)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 1224540811..7702f4be3f 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -9,11 +9,14 @@
#include <common.h>
#include <cpu_func.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include <mmc.h>
#include <dwmmc.h>
#include <wait_bit.h>
+#include <asm/cache.h>
+#include <linux/delay.h>
#include <power/regulator.h>
#define PAGE_SIZE 4096
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 386781da03..d5d955846c 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -20,9 +20,12 @@
#include <malloc.h>
#include <fsl_esdhc.h>
#include <fdt_support.h>
+#include <asm/cache.h>
#include <asm/io.h>
#include <dm.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 6bca2a9c82..588d6a9d76 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -17,9 +17,13 @@
#include <cpu_func.h>
#include <errno.h>
#include <hwconfig.h>
+#include <log.h>
#include <mmc.h>
#include <part.h>
+#include <asm/cache.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/err.h>
#include <power/regulator.h>
#include <malloc.h>
diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c
index 9c15eb36d6..b37523e26f 100644
--- a/drivers/mmc/ftsdc010_mci.c
+++ b/drivers/mmc/ftsdc010_mci.c
@@ -11,9 +11,11 @@
#include <common.h>
#include <clk.h>
+#include <log.h>
#include <malloc.h>
#include <part.h>
#include <mmc.h>
+#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/errno.h>
#include <asm/byteorder.h>
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index 93b88d17d4..9d20e28383 100644
--- a/drivers/mmc/gen_atmel_mci.c
+++ b/drivers/mmc/gen_atmel_mci.c
@@ -11,10 +11,12 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <log.h>
#include <mmc.h>
#include <part.h>
#include <malloc.h>
#include <asm/io.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/byteorder.h>
#include <asm/arch/clk.h>
diff --git a/drivers/mmc/iproc_sdhci.c b/drivers/mmc/iproc_sdhci.c
index c2319b4134..91e2e3f0b8 100644
--- a/drivers/mmc/iproc_sdhci.c
+++ b/drivers/mmc/iproc_sdhci.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <malloc.h>
#include <sdhci.h>
+#include <linux/delay.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c
index 8d4f886cb4..d3f1eddf45 100644
--- a/drivers/mmc/jz_mmc.c
+++ b/drivers/mmc/jz_mmc.c
@@ -13,6 +13,8 @@
#include <asm/unaligned.h>
#include <errno.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <mach/jz4780.h>
#include <wait_bit.h>
diff --git a/drivers/mmc/kona_sdhci.c b/drivers/mmc/kona_sdhci.c
index f5e1f2cbbd..2bbe673b91 100644
--- a/drivers/mmc/kona_sdhci.c
+++ b/drivers/mmc/kona_sdhci.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <malloc.h>
#include <sdhci.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/kona-common/clk.h>
diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c
index 86c1a7164a..b7f793cd04 100644
--- a/drivers/mmc/meson_gx_mmc.c
+++ b/drivers/mmc/meson_gx_mmc.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <asm/gpio.h>
#include <asm/arch/sd_emmc.h>
+#include <linux/delay.h>
#include <linux/log2.h>
static inline void *get_regbase(const struct mmc *mmc)
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index f313bc1734..c5b7872900 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <mmc.h>
#include <dm.h>
#include <dm/device-internal.h>
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 523c055967..620bb93064 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -8,12 +8,16 @@
#include <config.h>
#include <common.h>
+#include <blk.h>
#include <command.h>
#include <dm.h>
+#include <log.h>
#include <dm/device-internal.h>
#include <errno.h>
#include <mmc.h>
#include <part.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <power/regulator.h>
#include <malloc.h>
#include <memalign.h>
diff --git a/drivers/mmc/mmc_boot.c b/drivers/mmc/mmc_boot.c
index 64dc147a47..0a74b1fb77 100644
--- a/drivers/mmc/mmc_boot.c
+++ b/drivers/mmc/mmc_boot.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <mmc.h>
#include "mmc_private.h"
diff --git a/drivers/mmc/mmc_legacy.c b/drivers/mmc/mmc_legacy.c
index b0f5cf58a2..2bb12ceeaf 100644
--- a/drivers/mmc/mmc_legacy.c
+++ b/drivers/mmc/mmc_legacy.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <mmc.h>
#include "mmc_private.h"
diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index c693fb2d17..e76ab54838 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -8,10 +8,12 @@
*/
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <part.h>
#include <mmc.h>
#include <stdlib.h>
+#include <linux/bitops.h>
#include <u-boot/crc.h>
#include <linux/crc7.h>
#include <asm/byteorder.h>
diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c
index b52ff9f3bc..6a4453ca02 100644
--- a/drivers/mmc/mmc_write.c
+++ b/drivers/mmc/mmc_write.c
@@ -8,6 +8,7 @@
#include <config.h>
#include <common.h>
+#include <blk.h>
#include <dm.h>
#include <part.h>
#include <div64.h>
diff --git a/drivers/mmc/mvebu_mmc.c b/drivers/mmc/mvebu_mmc.c
index 958ac17954..8e7745e233 100644
--- a/drivers/mmc/mvebu_mmc.c
+++ b/drivers/mmc/mvebu_mmc.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <part.h>
#include <mmc.h>
diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
index 9414eff42b..e3c352b44a 100644
--- a/drivers/mmc/mxsmmc.c
+++ b/drivers/mmc/mxsmmc.c
@@ -21,8 +21,11 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <mmc.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 4d0dc33936..8636cd713a 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -25,6 +25,7 @@
#include <config.h>
#include <common.h>
#include <cpu_func.h>
+#include <log.h>
#include <malloc.h>
#include <memalign.h>
#include <mmc.h>
@@ -33,6 +34,7 @@
#if defined(CONFIG_OMAP54XX) || defined(CONFIG_OMAP44XX)
#include <palmas.h>
#endif
+#include <asm/cache.h>
#include <asm/io.h>
#include <asm/arch/mmc_host_def.h>
#ifdef CONFIG_OMAP54XX
@@ -48,6 +50,8 @@
#endif
#include <dm.h>
#include <dm/devres.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/err.h>
#include <power/regulator.h>
#include <thermal.h>
diff --git a/drivers/mmc/pxa_mmc_gen.c b/drivers/mmc/pxa_mmc_gen.c
index a4dcdb5cff..cc6014703c 100644
--- a/drivers/mmc/pxa_mmc_gen.c
+++ b/drivers/mmc/pxa_mmc_gen.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <asm/arch/hardware.h>
#include <asm/arch/regs-mmc.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <asm/io.h>
#include <malloc.h>
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
index 88a7160b0a..d6ea99d2ce 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -7,11 +7,14 @@
#include <bouncebuf.h>
#include <clk.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
#include <mmc.h>
#include <dm.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
#include <linux/compat.h>
+#include <linux/delay.h>
#include <linux/dma-direction.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index a0e1be8794..638107a7ff 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -9,12 +9,14 @@
#include <dt-structs.h>
#include <dwmmc.h>
#include <errno.h>
+#include <log.h>
#include <mapmem.h>
#include <pwrseq.h>
#include <syscon.h>
#include <asm/gpio.h>
#include <asm/arch-rockchip/clock.h>
#include <asm/arch-rockchip/periph.h>
+#include <linux/delay.h>
#include <linux/err.h>
struct rockchip_mmc_plat {
diff --git a/drivers/mmc/rpmb.c b/drivers/mmc/rpmb.c
index ee6dbe30db..ea7e506666 100644
--- a/drivers/mmc/rpmb.c
+++ b/drivers/mmc/rpmb.c
@@ -9,6 +9,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <memalign.h>
#include <mmc.h>
#include <sdhci.h>
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
index b5fe828dd6..24f599e868 100644
--- a/drivers/mmc/s5p_sdhci.c
+++ b/drivers/mmc/s5p_sdhci.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <malloc.h>
#include <sdhci.h>
#include <fdtdec.h>
diff --git a/drivers/mmc/sandbox_mmc.c b/drivers/mmc/sandbox_mmc.c
index 899952d773..e86ea8fe09 100644
--- a/drivers/mmc/sandbox_mmc.c
+++ b/drivers/mmc/sandbox_mmc.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <fdtdec.h>
+#include <log.h>
#include <mmc.h>
#include <asm/test.h>
diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c
index 2d38c2270e..7b5010b655 100644
--- a/drivers/mmc/sdhci-cadence.c
+++ b/drivers/mmc/sdhci-cadence.c
@@ -8,6 +8,8 @@
#include <dm.h>
#include <dm/device_compat.h>
#include <linux/bitfield.h>
+#include <linux/bitops.h>
+#include <linux/bug.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/sizes.h>
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 520c9f9feb..92cc8434af 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -11,11 +11,16 @@
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <mmc.h>
#include <sdhci.h>
#include <dm.h>
+#include <asm/cache.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/dma-mapping.h>
+#include <phys2bus.h>
static void sdhci_reset(struct sdhci_host *host, u8 mask)
{
@@ -150,7 +155,8 @@ static void sdhci_prepare_dma(struct sdhci_host *host, struct mmc_data *data,
mmc_get_dma_dir(data));
if (host->flags & USE_SDMA) {
- sdhci_writel(host, host->start_addr, SDHCI_DMA_ADDRESS);
+ sdhci_writel(host, phys_to_bus((ulong)host->start_addr),
+ SDHCI_DMA_ADDRESS);
} else if (host->flags & (USE_ADMA | USE_ADMA64)) {
sdhci_prepare_adma_table(host, data);
@@ -204,7 +210,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data)
start_addr &=
~(SDHCI_DEFAULT_BOUNDARY_SIZE - 1);
start_addr += SDHCI_DEFAULT_BOUNDARY_SIZE;
- sdhci_writel(host, start_addr,
+ sdhci_writel(host, phys_to_bus((ulong)start_addr),
SDHCI_DMA_ADDRESS);
}
}
@@ -739,13 +745,12 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
debug("%s, caps: 0x%x\n", __func__, caps);
#ifdef CONFIG_MMC_SDHCI_SDMA
- if (!(caps & SDHCI_CAN_DO_SDMA)) {
- printf("%s: Your controller doesn't support SDMA!!\n",
- __func__);
- return -EINVAL;
+ if ((caps & SDHCI_CAN_DO_SDMA)) {
+ host->flags |= USE_SDMA;
+ } else {
+ debug("%s: Your controller doesn't support SDMA!!\n",
+ __func__);
}
-
- host->flags |= USE_SDMA;
#endif
#if CONFIG_IS_ENABLED(MMC_SDHCI_ADMA)
if (!(caps & SDHCI_CAN_DO_ADMA2)) {
@@ -839,8 +844,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
cfg->host_caps &= ~MMC_MODE_HS_52MHz;
}
- if (!(cfg->voltages & MMC_VDD_165_195) ||
- (host->quirks & SDHCI_QUIRK_NO_1_8_V))
+ if (!(cfg->voltages & MMC_VDD_165_195))
caps_1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
SDHCI_SUPPORT_DDR50);
diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c
index 29bbb4b3a6..2e994d0178 100644
--- a/drivers/mmc/sh_mmcif.c
+++ b/drivers/mmc/sh_mmcif.c
@@ -7,6 +7,7 @@
#include <config.h>
#include <common.h>
+#include <log.h>
#include <watchdog.h>
#include <command.h>
#include <mmc.h>
@@ -14,6 +15,8 @@
#include <dm.h>
#include <malloc.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/compat.h>
#include <linux/io.h>
diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c
index 2202158c88..772fe943e4 100644
--- a/drivers/mmc/sh_sdhi.c
+++ b/drivers/mmc/sh_sdhi.c
@@ -10,10 +10,14 @@
*/
#include <common.h>
+#include <log.h>
#include <malloc.h>
#include <mmc.h>
#include <dm.h>
+#include <part.h>
#include <dm/device_compat.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/compat.h>
#include <linux/io.h>
diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c
index 786cdc700a..892222d27d 100644
--- a/drivers/mmc/socfpga_dw_mmc.c
+++ b/drivers/mmc/socfpga_dw_mmc.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <log.h>
#include <asm/arch/clock_manager.h>
#include <asm/arch/system_manager.h>
#include <clk.h>
diff --git a/drivers/mmc/sti_sdhci.c b/drivers/mmc/sti_sdhci.c
index d6c75ea601..9bcd8ce5f6 100644
--- a/drivers/mmc/sti_sdhci.c
+++ b/drivers/mmc/sti_sdhci.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
+#include <log.h>
#include <mmc.h>
#include <reset-uclass.h>
#include <sdhci.h>
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index 6f3b2ad653..6d50356217 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -9,7 +9,12 @@
#include <cpu_func.h>
#include <dm.h>
#include <fdtdec.h>
+#include <log.h>
#include <malloc.h>
+#include <asm/bitops.h>
+#include <asm/cache.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <mmc.h>
#include <reset.h>
@@ -674,7 +679,7 @@ static int stm32_sdmmc2_probe(struct udevice *dev)
cfg->f_max = dev_read_u32_default(dev, "max-frequency", 52000000);
cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
- cfg->name = "STM32 SDMMC2";
+ cfg->name = "STM32 SD/MMC";
cfg->host_caps = 0;
if (cfg->f_max > 25000000)
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index 9f426661c4..0e03b07ce5 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <malloc.h>
#include <mmc.h>
#include <clk.h>
@@ -20,6 +21,7 @@
#include <asm/arch/gpio.h>
#include <asm/arch/mmc.h>
#include <asm-generic/gpio.h>
+#include <linux/delay.h>
#ifdef CONFIG_DM_MMC
struct sunxi_mmc_variant {
diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index 2b041562a6..cc78a2f2f0 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -10,10 +10,13 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <log.h>
#include <mmc.h>
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/arch-tegra/tegra_mmc.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/err.h>
#if defined(CONFIG_TEGRA30) || defined(CONFIG_TEGRA210)
#include <asm/arch/clock.h>
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c
index 1dc13db9ea..20cd237ef0 100644
--- a/drivers/mmc/tmio-common.c
+++ b/drivers/mmc/tmio-common.c
@@ -13,6 +13,7 @@
#include <dm/device_compat.h>
#include <dm/pinctrl.h>
#include <linux/compat.h>
+#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/drivers/mmc/tmio-common.h b/drivers/mmc/tmio-common.h
index 2f671df4bc..9062300c64 100644
--- a/drivers/mmc/tmio-common.h
+++ b/drivers/mmc/tmio-common.h
@@ -7,6 +7,7 @@
#ifndef __TMIO_COMMON_H__
#define __TMIO_COMMON_H__
+#include <linux/bitops.h>
#define TMIO_SD_CMD 0x000 /* command */
#define TMIO_SD_CMD_NOSTOP BIT(14) /* No automatic CMD12 issue */
#define TMIO_SD_CMD_MULTI BIT(13) /* multiple block transfer */
diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c
index 829b75683b..e765dd384a 100644
--- a/drivers/mmc/xenon_sdhci.c
+++ b/drivers/mmc/xenon_sdhci.c
@@ -17,6 +17,8 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/libfdt.h>
#include <malloc.h>
#include <sdhci.h>
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index da3ff53da1..de404aa956 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -9,7 +9,9 @@
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
+#include <linux/delay.h>
#include "mmc_private.h"
+#include <log.h>
#include <dm/device_compat.h>
#include <linux/err.h>
#include <linux/libfdt.h>
@@ -22,14 +24,12 @@ DECLARE_GLOBAL_DATA_PTR;
struct arasan_sdhci_plat {
struct mmc_config cfg;
struct mmc mmc;
- unsigned int f_max;
};
struct arasan_sdhci_priv {
struct sdhci_host *host;
u8 deviceid;
u8 bank;
- u8 no_1p8;
};
#if defined(CONFIG_ARCH_ZYNQMP)
@@ -238,8 +238,11 @@ static int arasan_sdhci_probe(struct udevice *dev)
host->quirks |= SDHCI_QUIRK_BROKEN_HISPD_MODE;
#endif
- if (priv->no_1p8)
- host->quirks |= SDHCI_QUIRK_NO_1_8_V;
+ plat->cfg.f_max = CONFIG_ZYNQ_SDHCI_MAX_FREQ;
+
+ ret = mmc_of_parse(dev, &plat->cfg);
+ if (ret)
+ return ret;
host->max_clk = clock;
@@ -247,7 +250,7 @@ static int arasan_sdhci_probe(struct udevice *dev)
host->mmc->dev = dev;
host->mmc->priv = host;
- ret = sdhci_setup_cfg(&plat->cfg, host, plat->f_max,
+ ret = sdhci_setup_cfg(&plat->cfg, host, plat->cfg.f_max,
CONFIG_ZYNQ_SDHCI_MIN_FREQ);
if (ret)
return ret;
@@ -258,7 +261,6 @@ static int arasan_sdhci_probe(struct udevice *dev)
static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
{
- struct arasan_sdhci_plat *plat = dev_get_platdata(dev);
struct arasan_sdhci_priv *priv = dev_get_priv(dev);
priv->host = calloc(1, sizeof(struct sdhci_host));
@@ -277,10 +279,7 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev)
priv->deviceid = dev_read_u32_default(dev, "xlnx,device_id", -1);
priv->bank = dev_read_u32_default(dev, "xlnx,mio_bank", -1);
- priv->no_1p8 = dev_read_bool(dev, "no-1-8-v");
- plat->f_max = dev_read_u32_default(dev, "max-frequency",
- CONFIG_ZYNQ_SDHCI_MAX_FREQ);
return 0;
}