arm:omap:am33xx: Register HSMMC Platform on AM335x EVM
[sitara-epos/sitara-epos-kernel.git] / arch / arm / mach-omap2 / hsmmc.c
index bd844af13af56106d7fe5511dcaa6d2ebf6f7afa..7c12ca34ad32144e8f0e8a74b18f049b74ab4ae3 100644 (file)
@@ -304,6 +304,9 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
                return -ENOMEM;
        }
 
+       if (cpu_is_am33xx())
+               mmc->version = MMC_CTRL_VERSION_2;
+
        if (c->name)
                strncpy(hc_name, c->name, HSMMC_NAME_LEN);
        else
@@ -363,10 +366,11 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
        else
                mmc->slots[0].ocr_mask = c->ocr_mask;
 
-       if (!cpu_is_omap3517() && !cpu_is_omap3505())
+       if (!cpu_is_omap3517() && !cpu_is_omap3505() && !cpu_is_am33xx())
                mmc->slots[0].features |= HSMMC_HAS_PBIAS;
 
-       if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
+       if ((cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0)) ||
+                                                               cpu_is_am33xx())
                mmc->slots[0].features |= HSMMC_HAS_UPDATED_RESET;
 
        switch (c->mmc) {
@@ -386,7 +390,7 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
                        }
                }
 
-               if (cpu_is_omap3517() || cpu_is_omap3505())
+               if (cpu_is_omap3517() || cpu_is_omap3505() || cpu_is_am33xx())
                        mmc->slots[0].set_power = nop_mmc_set_power;
 
                /* OMAP3630 HSMMC1 supports only 4-bit */
@@ -450,7 +454,9 @@ void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)
                pr_err("%s fails!\n", __func__);
                goto done;
        }
-       omap_hsmmc_mux(mmc_data, (ctrl_nr - 1));
+
+       if (!cpu_is_am33xx())
+               omap_hsmmc_mux(mmc_data, (ctrl_nr - 1));
 
        name = "omap_hsmmc";