b/arch/arm/plat-pxa/include/plat/sdhci.h
@@ -16,6 +16,8 @@
/* pxa specific flag */
/* Require clock free running */
#define PXA_FLAG_DISABLE_CLOCK_GATING (1<<0)
+#define PXA_FLAG_FORCE_1_BIT_DATA (1<<2)
+#define PXA_FLAG_CAN_DO_8_BIT_DATA (1<<3)
/*
* struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
@@ -147,6 +147,11 @@ static int __devinit sdhci_pxa_probe(struct
platform_device *pdev)
goto out;
}
+ if (pxa->pdata->flags & PXA_FLAG_FORCE_1_BIT_DATA)
+ host->mmc->caps &= ~(MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA);
+ if (pxa->pdata->flags & PXA_FLAG_CAN_DO_8_BIT_DATA)
+ host->mmc->caps |= MMC_CAP_8_BIT_DATA;
+
if (pxa->pdata->max_speed)
host->mmc->f_max = pxa->pdata->max_speed;
@@ -1858,9 +1858,6 @@ int sdhci_add_host(struct sdhci_host *host)
mmc->f_max = host->max_clk;
mmc->caps |= MMC_CAP_SDIO_IRQ;
- if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA))
- mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA;
-
if (caps & SDHCI_CAN_DO_HISPD)
mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
@@ -67,8 +67,6 @@ struct sdhci_host {
#define SDHCI_QUIRK_FORCE_BLK_SZ_2048 (1<<20)
/* Controller cannot do multi-block transfers */
#define SDHCI_QUIRK_NO_MULTIBLOCK (1<<21)
-/* Controller can only handle 1-bit data transfers */
-#define SDHCI_QUIRK_FORCE_1_BIT_DATA (1<<22)
/* Controller needs 10ms delay between applying power and clock */
#define SDHCI_QUIRK_DELAY_AFTER_POWER (1<<23)
/* Controller uses SDCLK instead of TMCLK for data timeouts */