aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/sdhci-pci.c')
-rw-r--r--drivers/mmc/host/sdhci-pci.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index 0012d3fdc999..701d06d0e1fb 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -33,6 +33,9 @@
33 */ 33 */
34#define PCI_DEVICE_ID_INTEL_PCH_SDIO0 0x8809 34#define PCI_DEVICE_ID_INTEL_PCH_SDIO0 0x8809
35#define PCI_DEVICE_ID_INTEL_PCH_SDIO1 0x880a 35#define PCI_DEVICE_ID_INTEL_PCH_SDIO1 0x880a
36#define PCI_DEVICE_ID_INTEL_BYT_EMMC 0x0f14
37#define PCI_DEVICE_ID_INTEL_BYT_SDIO 0x0f15
38#define PCI_DEVICE_ID_INTEL_BYT_SD 0x0f16
36 39
37/* 40/*
38 * PCI registers 41 * PCI registers
@@ -304,6 +307,33 @@ static const struct sdhci_pci_fixes sdhci_intel_pch_sdio = {
304 .probe_slot = pch_hc_probe_slot, 307 .probe_slot = pch_hc_probe_slot,
305}; 308};
306 309
310static int byt_emmc_probe_slot(struct sdhci_pci_slot *slot)
311{
312 slot->host->mmc->caps |= MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE;
313 slot->host->mmc->caps2 |= MMC_CAP2_HC_ERASE_SZ;
314 return 0;
315}
316
317static int byt_sdio_probe_slot(struct sdhci_pci_slot *slot)
318{
319 slot->host->mmc->caps |= MMC_CAP_POWER_OFF_CARD | MMC_CAP_NONREMOVABLE;
320 return 0;
321}
322
323static const struct sdhci_pci_fixes sdhci_intel_byt_emmc = {
324 .allow_runtime_pm = true,
325 .probe_slot = byt_emmc_probe_slot,
326};
327
328static const struct sdhci_pci_fixes sdhci_intel_byt_sdio = {
329 .quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON,
330 .allow_runtime_pm = true,
331 .probe_slot = byt_sdio_probe_slot,
332};
333
334static const struct sdhci_pci_fixes sdhci_intel_byt_sd = {
335};
336
307/* O2Micro extra registers */ 337/* O2Micro extra registers */
308#define O2_SD_LOCK_WP 0xD3 338#define O2_SD_LOCK_WP 0xD3
309#define O2_SD_MULTI_VCC3V 0xEE 339#define O2_SD_MULTI_VCC3V 0xEE
@@ -856,6 +886,30 @@ static const struct pci_device_id pci_ids[] = {
856 }, 886 },
857 887
858 { 888 {
889 .vendor = PCI_VENDOR_ID_INTEL,
890 .device = PCI_DEVICE_ID_INTEL_BYT_EMMC,
891 .subvendor = PCI_ANY_ID,
892 .subdevice = PCI_ANY_ID,
893 .driver_data = (kernel_ulong_t)&sdhci_intel_byt_emmc,
894 },
895
896 {
897 .vendor = PCI_VENDOR_ID_INTEL,
898 .device = PCI_DEVICE_ID_INTEL_BYT_SDIO,
899 .subvendor = PCI_ANY_ID,
900 .subdevice = PCI_ANY_ID,
901 .driver_data = (kernel_ulong_t)&sdhci_intel_byt_sdio,
902 },
903
904 {
905 .vendor = PCI_VENDOR_ID_INTEL,
906 .device = PCI_DEVICE_ID_INTEL_BYT_SD,
907 .subvendor = PCI_ANY_ID,
908 .subdevice = PCI_ANY_ID,
909 .driver_data = (kernel_ulong_t)&sdhci_intel_byt_sd,
910 },
911
912 {
859 .vendor = PCI_VENDOR_ID_O2, 913 .vendor = PCI_VENDOR_ID_O2,
860 .device = PCI_DEVICE_ID_O2_8120, 914 .device = PCI_DEVICE_ID_O2_8120,
861 .subvendor = PCI_ANY_ID, 915 .subvendor = PCI_ANY_ID,