struct sdhci_pci_fixes {
unsigned int quirks;
+ unsigned int quirks2;
int (*probe) (struct sdhci_pci_chip *);
struct pci_dev *pdev;
unsigned int quirks;
+ unsigned int quirks2;
const struct sdhci_pci_fixes *fixes;
int num_slots; /* Slots on controller */
}
}
+static int intel_mfld_sdio_probe_slot(struct sdhci_pci_slot *slot)
+{
+ struct sdhci_host *host = slot->host;
+ host->mmc->caps |= MMC_CAP_NONREMOVABLE;
+ return 0;
+}
+
static int mfd_emmc_probe_slot(struct sdhci_pci_slot *slot)
{
const char *name = NULL;
static const struct sdhci_pci_fixes sdhci_intel_mfd_sdio = {
.quirks = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
+ .quirks2 = SDHCI_QUIRK_CANNOT_KEEP_POWERCTL,
+ .probe_slot = intel_mfld_sdio_probe_slot,
};
static const struct sdhci_pci_fixes sdhci_intel_mfd_emmc = {
host->hw_name = "PCI";
host->ops = &sdhci_pci_ops;
host->quirks = chip->quirks;
+ host->quirks2 = chip->quirks2;
host->irq = pdev->irq;
chip->pdev = pdev;
chip->fixes = (const struct sdhci_pci_fixes *)ent->driver_data;
- if (chip->fixes)
+ if (chip->fixes) {
chip->quirks = chip->fixes->quirks;
+ chip->quirks2 = chip->fixes->quirks2;
+ }
+
chip->num_slots = slots;
pci_set_drvdata(pdev, chip);
static void sdhci_init(struct sdhci_host *host, int soft)
{
- if (soft)
+ if (soft && !(host->quirks2 & SDHCI_QUIRK_CANNOT_KEEP_POWERCTL))
sdhci_reset(host, SDHCI_RESET_CMD|SDHCI_RESET_DATA);
else
sdhci_reset(host, SDHCI_RESET_ALL);
if (soft) {
/* force clock reconfiguration */
host->clock = 0;
+ if (host->quirks2 & SDHCI_QUIRK_CANNOT_KEEP_POWERCTL)
+ host->pwr = 0; /* force power reprogram */
sdhci_set_ios(host->mmc, &host->mmc->ios);
}
}
unsigned int quirks2; /* More deviations from spec. */
#define SDHCI_QUIRK2_OWN_CARD_DETECTION (1<<0)
+/* Host controller cannot keep power control value after power off */
+#define SDHCI_QUIRK_CANNOT_KEEP_POWERCTL (1<<1)
+
int irq; /* Device IRQ */
void __iomem *ioaddr; /* Mapped address */