mmc: dw_mmc: exynos: Add a new compatible string for exynos5420
authorYuvaraj Kumar C D <yuvaraj.cd@gmail.com>
Fri, 24 May 2013 10:04:32 +0000 (15:34 +0530)
committerChris Ball <cjb@laptop.org>
Sun, 25 Aug 2013 04:21:42 +0000 (00:21 -0400)
The Exynos5420 has a DWMMC controller which is different from prior
versions.This patch adds a new compatible string for Exynos5420.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/dw_mmc-exynos.c

index 866edef..6a1fa21 100644 (file)
@@ -39,6 +39,7 @@ enum dw_mci_exynos_type {
        DW_MCI_TYPE_EXYNOS4210,
        DW_MCI_TYPE_EXYNOS4412,
        DW_MCI_TYPE_EXYNOS5250,
+       DW_MCI_TYPE_EXYNOS5420,
 };
 
 /* Exynos implementation specific driver private data */
@@ -62,6 +63,9 @@ static struct dw_mci_exynos_compatible {
        }, {
                .compatible     = "samsung,exynos5250-dw-mshc",
                .ctrl_type      = DW_MCI_TYPE_EXYNOS5250,
+       }, {
+               .compatible     = "samsung,exynos5420-dw-mshc",
+               .ctrl_type      = DW_MCI_TYPE_EXYNOS5420,
        },
 };
 
@@ -90,7 +94,8 @@ static int dw_mci_exynos_setup_clock(struct dw_mci *host)
 {
        struct dw_mci_exynos_priv_data *priv = host->priv;
 
-       if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS5250)
+       if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS5250 ||
+               priv->ctrl_type == DW_MCI_TYPE_EXYNOS5420)
                host->bus_hz /= (priv->ciu_div + 1);
        else if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS4412)
                host->bus_hz /= EXYNOS4412_FIXED_CIU_CLK_DIV;
@@ -173,6 +178,8 @@ static const struct of_device_id dw_mci_exynos_match[] = {
                        .data = &exynos_drv_data, },
        { .compatible = "samsung,exynos5250-dw-mshc",
                        .data = &exynos_drv_data, },
+       { .compatible = "samsung,exynos5420-dw-mshc",
+                       .data = &exynos_drv_data, },
        {},
 };
 MODULE_DEVICE_TABLE(of, dw_mci_exynos_match);