From b82eeb5f5c27fdccaf1d424710868ee4dff7b0af Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Tue, 10 Aug 2010 18:01:52 -0700 Subject: [PATCH] --- yaml --- r: 208436 b: refs/heads/master c: 4816858cce279b5e8d1eab0b4832d89d8f2ca58c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/plat-omap/include/plat/mmc.h | 2 ++ trunk/drivers/mmc/host/omap_hsmmc.c | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e7f2440148d7..231e55ea8324 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6f51be3d37dff73cf8db771df4169f4c2f1cbf66 +refs/heads/master: 4816858cce279b5e8d1eab0b4832d89d8f2ca58c diff --git a/trunk/arch/arm/plat-omap/include/plat/mmc.h b/trunk/arch/arm/plat-omap/include/plat/mmc.h index c835f1e994c6..9b89ec601ee2 100644 --- a/trunk/arch/arm/plat-omap/include/plat/mmc.h +++ b/trunk/arch/arm/plat-omap/include/plat/mmc.h @@ -122,6 +122,8 @@ struct omap_mmc_platform_data { /* Call back after enabling / disabling regulators */ void (*after_set_reg)(struct device *dev, int slot, int power_on, int vdd); + /* if we have special card, init it using this callback */ + void (*init_card)(struct mmc_card *card); /* return MMC cover switch state, can be NULL if not supported. * diff --git a/trunk/drivers/mmc/host/omap_hsmmc.c b/trunk/drivers/mmc/host/omap_hsmmc.c index a0c8515cb3b9..ee1a3093048e 100644 --- a/trunk/drivers/mmc/host/omap_hsmmc.c +++ b/trunk/drivers/mmc/host/omap_hsmmc.c @@ -1598,6 +1598,14 @@ static int omap_hsmmc_get_ro(struct mmc_host *mmc) return mmc_slot(host).get_ro(host->dev, 0); } +static void omap_hsmmc_init_card(struct mmc_host *mmc, struct mmc_card *card) +{ + struct omap_hsmmc_host *host = mmc_priv(mmc); + + if (mmc_slot(host).init_card) + mmc_slot(host).init_card(card); +} + static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host) { u32 hctl, capa, value; @@ -1869,6 +1877,7 @@ static const struct mmc_host_ops omap_hsmmc_ops = { .set_ios = omap_hsmmc_set_ios, .get_cd = omap_hsmmc_get_cd, .get_ro = omap_hsmmc_get_ro, + .init_card = omap_hsmmc_init_card, /* NYET -- enable_sdio_irq */ }; @@ -1879,6 +1888,7 @@ static const struct mmc_host_ops omap_hsmmc_ps_ops = { .set_ios = omap_hsmmc_set_ios, .get_cd = omap_hsmmc_get_cd, .get_ro = omap_hsmmc_get_ro, + .init_card = omap_hsmmc_init_card, /* NYET -- enable_sdio_irq */ };