diff options
author | Tony Lindgren <tony@atomide.com> | 2012-04-23 15:56:36 -0700 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-05-09 14:34:49 -0700 |
commit | 2fdad5c971ad7991d1798866ae0cb25846155423 (patch) | |
tree | 000a5aa91b535f32ba253ab64d9add3eb94d8040 /arch/arm/mach-omap2/devices.c | |
parent | 7f28427b85d1c5371f996b1390a9d6e9620b67ad (diff) |
ARM: OMAP2: Use hwmod to initialize mmc for 2420
This allows us to pass dma request lines in platform data to
MMC driver the same way as we already do for omap2430 and later.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index e4336035c0e..3318f67fef7 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -616,7 +616,11 @@ static inline void omap242x_mmc_mux(struct omap_mmc_platform_data void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) { - char *name = "mmci-omap"; + struct platform_device *pdev; + struct omap_hwmod *oh; + int id = 0; + char *oh_name = "msdi1"; + char *dev_name = "mmci-omap"; if (!mmc_data[0]) { pr_err("%s fails: Incomplete platform data\n", __func__); @@ -624,8 +628,17 @@ void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) } omap242x_mmc_mux(mmc_data[0]); - omap_mmc_add(name, 0, OMAP2_MMC1_BASE, OMAP2420_MMC_SIZE, - INT_24XX_MMC_IRQ, mmc_data[0]); + + oh = omap_hwmod_lookup(oh_name); + if (!oh) { + pr_err("Could not look up %s\n", oh_name); + return; + } + pdev = omap_device_build(dev_name, id, oh, mmc_data[0], + sizeof(struct omap_mmc_platform_data), NULL, 0, 0); + if (IS_ERR(pdev)) + WARN(1, "Can'd build omap_device for %s:%s.\n", + dev_name, oh->name); } #endif |