These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / mmc / host / sdhci-of-arasan.c
index 6287d42..75379cb 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/of_device.h>
 #include "sdhci-pltfm.h"
 
 #define SDHCI_ARASAN_CLK_CTRL_OFFSET   0x2c
@@ -62,6 +63,9 @@ static struct sdhci_ops sdhci_arasan_ops = {
 
 static struct sdhci_pltfm_data sdhci_arasan_pdata = {
        .ops = &sdhci_arasan_ops,
+       .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
+       .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN |
+                       SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN,
 };
 
 #ifdef CONFIG_PM_SLEEP
@@ -168,6 +172,11 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
                goto clk_disable_all;
        }
 
+       if (of_device_is_compatible(pdev->dev.of_node, "arasan,sdhci-4.9a")) {
+               host->quirks |= SDHCI_QUIRK_NO_HISPD_BIT;
+               host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23;
+       }
+
        sdhci_get_of_property(pdev);
        pltfm_host = sdhci_priv(host);
        pltfm_host->priv = sdhci_arasan;
@@ -208,6 +217,8 @@ static int sdhci_arasan_remove(struct platform_device *pdev)
 
 static const struct of_device_id sdhci_arasan_of_match[] = {
        { .compatible = "arasan,sdhci-8.9a" },
+       { .compatible = "arasan,sdhci-5.1" },
+       { .compatible = "arasan,sdhci-4.9a" },
        { }
 };
 MODULE_DEVICE_TABLE(of, sdhci_arasan_of_match);