aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r--arch/arm/mach-omap2/devices.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index ae62ece04ef9..7b4b9327e543 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -645,7 +645,11 @@ static inline void omap242x_mmc_mux(struct omap_mmc_platform_data
645 645
646void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) 646void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
647{ 647{
648 char *name = "mmci-omap"; 648 struct platform_device *pdev;
649 struct omap_hwmod *oh;
650 int id = 0;
651 char *oh_name = "msdi1";
652 char *dev_name = "mmci-omap";
649 653
650 if (!mmc_data[0]) { 654 if (!mmc_data[0]) {
651 pr_err("%s fails: Incomplete platform data\n", __func__); 655 pr_err("%s fails: Incomplete platform data\n", __func__);
@@ -653,8 +657,17 @@ void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
653 } 657 }
654 658
655 omap242x_mmc_mux(mmc_data[0]); 659 omap242x_mmc_mux(mmc_data[0]);
656 omap_mmc_add(name, 0, OMAP2_MMC1_BASE, OMAP2420_MMC_SIZE, 660
657 INT_24XX_MMC_IRQ, mmc_data[0]); 661 oh = omap_hwmod_lookup(oh_name);
662 if (!oh) {
663 pr_err("Could not look up %s\n", oh_name);
664 return;
665 }
666 pdev = omap_device_build(dev_name, id, oh, mmc_data[0],
667 sizeof(struct omap_mmc_platform_data), NULL, 0, 0);
668 if (IS_ERR(pdev))
669 WARN(1, "Can'd build omap_device for %s:%s.\n",
670 dev_name, oh->name);
658} 671}
659 672
660#endif 673#endif