mmc: sdhci-of-arasan: Add the support for sdhci-arasan4.9a
authorSuman Tripathi <stripathi@apm.com>
Mon, 4 May 2015 13:39:51 +0000 (19:09 +0530)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 1 Jun 2015 07:06:52 +0000 (09:06 +0200)
This patch adds the quirks and compatible string in sdhci-of-arasan.c
to support sdhci-arasan4.9a version of controller.

Signed-off-by: Suman Tripathi <stripathi@apm.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
drivers/mmc/host/sdhci-of-arasan.c

index 98ee2abbe1387b16a1a8c965d1020f975da0fa99..7e9490313d5add1f0fddf1327a3901625b1d6d55 100644 (file)
@@ -8,7 +8,8 @@ Device Tree Bindings for the Arasan SDHCI Controller
   [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
 
 Required Properties:
-  - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a'
+  - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' or
+                'arasan,sdhci-4.9a'
   - reg: From mmc bindings: Register location and length.
   - clocks: From clock bindings: Handles to clock inputs.
   - clock-names: From clock bindings: Tuple including "clk_xin" and "clk_ahb"
index 6287d426c96bf933237aa948881b5bce53215fcb..21c0c08dfe54cf997e7d7031b9db5bac9ff77e64 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
@@ -168,6 +169,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 +214,7 @@ 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-4.9a" },
        { }
 };
 MODULE_DEVICE_TABLE(of, sdhci_arasan_of_match);