@@ -1213,6 +1213,8 @@ static int sdhci_get_ro(struct mmc_host *mmc)
if (host->flags & SDHCI_DEVICE_DEAD)
present = 0;
+ else if (host->quirks & SDHCI_NO_SUPPORT_FOR_WRITE_PROTECT)
+ present = SDHCI_WRITE_PROTECT;
else
present = sdhci_readl(host, SDHCI_PRESENT_STATE);
@@ -247,6 +247,8 @@ struct sdhci_host {
#define SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 (1<<28)
/* Controller doesn't have HISPD bit field in HI-SPEED SD card */
#define SDHCI_QUIRK_NO_HISPD_BIT (1<<29)
+/* Controller does not have write protect signal */
+#define SDHCI_NO_SUPPORT_FOR_WRITE_PROTECT (1<<30)
int irq; /* Device IRQ */
void __iomem * ioaddr; /* Mapped address */