aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cohen <david.a.cohen@linux.intel.com>2013-10-01 16:18:15 -0400
committerChris Ball <chris@printf.net>2013-10-21 15:57:03 -0400
commit8776a165d152d57a3a58895d55204614abe93d7f (patch)
treec2ec7db6620a6c80465ab42a8eaa7b6722512625
parente76b855956383d58232cfcf367f0ce34f149161b (diff)
mmc: sdhci-pci: add Intel Merrifield support
Implement initial SDHCI Intel Merrifield support. This patch is based on previous one from Yunpeng Gao <yunpeng.gao@intel.com>. Signed-off-by: David Cohen <david.a.cohen@linux.intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/host/sdhci-pci.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index d7d6bc8968d2..06f026a537b2 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -37,6 +37,7 @@
37#define PCI_DEVICE_ID_INTEL_BYT_SDIO 0x0f15 37#define PCI_DEVICE_ID_INTEL_BYT_SDIO 0x0f15
38#define PCI_DEVICE_ID_INTEL_BYT_SD 0x0f16 38#define PCI_DEVICE_ID_INTEL_BYT_SD 0x0f16
39#define PCI_DEVICE_ID_INTEL_BYT_EMMC2 0x0f50 39#define PCI_DEVICE_ID_INTEL_BYT_EMMC2 0x0f50
40#define PCI_DEVICE_ID_INTEL_MRFL_MMC 0x1190
40 41
41/* 42/*
42 * PCI registers 43 * PCI registers
@@ -356,6 +357,28 @@ static const struct sdhci_pci_fixes sdhci_intel_byt_sd = {
356 .allow_runtime_pm = true, 357 .allow_runtime_pm = true,
357}; 358};
358 359
360/* Define Host controllers for Intel Merrifield platform */
361#define INTEL_MRFL_EMMC_0 0
362#define INTEL_MRFL_EMMC_1 1
363
364static int intel_mrfl_mmc_probe_slot(struct sdhci_pci_slot *slot)
365{
366 if ((PCI_FUNC(slot->chip->pdev->devfn) != INTEL_MRFL_EMMC_0) &&
367 (PCI_FUNC(slot->chip->pdev->devfn) != INTEL_MRFL_EMMC_1))
368 /* SD support is not ready yet */
369 return -ENODEV;
370
371 slot->host->mmc->caps |= MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE |
372 MMC_CAP_1_8V_DDR;
373
374 return 0;
375}
376
377static const struct sdhci_pci_fixes sdhci_intel_mrfl_mmc = {
378 .quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
379 .probe_slot = intel_mrfl_mmc_probe_slot,
380};
381
359/* O2Micro extra registers */ 382/* O2Micro extra registers */
360#define O2_SD_LOCK_WP 0xD3 383#define O2_SD_LOCK_WP 0xD3
361#define O2_SD_MULTI_VCC3V 0xEE 384#define O2_SD_MULTI_VCC3V 0xEE
@@ -940,6 +963,13 @@ static const struct pci_device_id pci_ids[] = {
940 }, 963 },
941 964
942 { 965 {
966 .vendor = PCI_VENDOR_ID_INTEL,
967 .device = PCI_DEVICE_ID_INTEL_MRFL_MMC,
968 .subvendor = PCI_ANY_ID,
969 .subdevice = PCI_ANY_ID,
970 .driver_data = (kernel_ulong_t)&sdhci_intel_mrfl_mmc,
971 },
972 {
943 .vendor = PCI_VENDOR_ID_O2, 973 .vendor = PCI_VENDOR_ID_O2,
944 .device = PCI_DEVICE_ID_O2_8120, 974 .device = PCI_DEVICE_ID_O2_8120,
945 .subvendor = PCI_ANY_ID, 975 .subvendor = PCI_ANY_ID,