|
@@ -17,6 +17,7 @@
|
|
|
#include <linux/pci.h>
|
|
|
#include <linux/dma-mapping.h>
|
|
|
#include <linux/slab.h>
|
|
|
+#include <linux/device.h>
|
|
|
|
|
|
#include <linux/mmc/host.h>
|
|
|
|
|
@@ -84,7 +85,30 @@ static int ricoh_probe(struct sdhci_pci_chip *chip)
|
|
|
if (chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG ||
|
|
|
chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SONY)
|
|
|
chip->quirks |= SDHCI_QUIRK_NO_CARD_NO_RESET;
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static int ricoh_mmc_probe_slot(struct sdhci_pci_slot *slot)
|
|
|
+{
|
|
|
+ slot->host->caps =
|
|
|
+ ((0x21 << SDHCI_TIMEOUT_CLK_SHIFT)
|
|
|
+ & SDHCI_TIMEOUT_CLK_MASK) |
|
|
|
+
|
|
|
+ ((0x21 << SDHCI_CLOCK_BASE_SHIFT)
|
|
|
+ & SDHCI_CLOCK_BASE_MASK) |
|
|
|
|
|
|
+ SDHCI_TIMEOUT_CLK_UNIT |
|
|
|
+ SDHCI_CAN_VDD_330 |
|
|
|
+ SDHCI_CAN_DO_SDMA;
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static int ricoh_mmc_resume(struct sdhci_pci_chip *chip)
|
|
|
+{
|
|
|
+ /* Apply a delay to allow controller to settle */
|
|
|
+ /* Otherwise it becomes confused if card state changed
|
|
|
+ during suspend */
|
|
|
+ msleep(500);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -95,6 +119,15 @@ static const struct sdhci_pci_fixes sdhci_ricoh = {
|
|
|
SDHCI_QUIRK_CLOCK_BEFORE_RESET,
|
|
|
};
|
|
|
|
|
|
+static const struct sdhci_pci_fixes sdhci_ricoh_mmc = {
|
|
|
+ .probe_slot = ricoh_mmc_probe_slot,
|
|
|
+ .resume = ricoh_mmc_resume,
|
|
|
+ .quirks = SDHCI_QUIRK_32BIT_DMA_ADDR |
|
|
|
+ SDHCI_QUIRK_CLOCK_BEFORE_RESET |
|
|
|
+ SDHCI_QUIRK_NO_CARD_NO_RESET |
|
|
|
+ SDHCI_QUIRK_MISSING_CAPS
|
|
|
+};
|
|
|
+
|
|
|
static const struct sdhci_pci_fixes sdhci_ene_712 = {
|
|
|
.quirks = SDHCI_QUIRK_SINGLE_POWER_WRITE |
|
|
|
SDHCI_QUIRK_BROKEN_DMA,
|
|
@@ -373,6 +406,14 @@ static const struct pci_device_id pci_ids[] __devinitdata = {
|
|
|
.driver_data = (kernel_ulong_t)&sdhci_ricoh,
|
|
|
},
|
|
|
|
|
|
+ {
|
|
|
+ .vendor = PCI_VENDOR_ID_RICOH,
|
|
|
+ .device = 0x843,
|
|
|
+ .subvendor = PCI_ANY_ID,
|
|
|
+ .subdevice = PCI_ANY_ID,
|
|
|
+ .driver_data = (kernel_ulong_t)&sdhci_ricoh_mmc,
|
|
|
+ },
|
|
|
+
|
|
|
{
|
|
|
.vendor = PCI_VENDOR_ID_ENE,
|
|
|
.device = PCI_DEVICE_ID_ENE_CB712_SD,
|