diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/mmc-twl4030.c | 15 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/mmc.h | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c index 3c04c2f1b23f..30d028627c5b 100644 --- a/arch/arm/mach-omap2/mmc-twl4030.c +++ b/arch/arm/mach-omap2/mmc-twl4030.c | |||
@@ -198,6 +198,18 @@ static int twl_mmc_resume(struct device *dev, int slot) | |||
198 | #define twl_mmc_resume NULL | 198 | #define twl_mmc_resume NULL |
199 | #endif | 199 | #endif |
200 | 200 | ||
201 | #if defined(CONFIG_ARCH_OMAP3) && defined(CONFIG_PM) | ||
202 | |||
203 | static int twl4030_mmc_get_context_loss(struct device *dev) | ||
204 | { | ||
205 | /* FIXME: PM DPS not implemented yet */ | ||
206 | return 0; | ||
207 | } | ||
208 | |||
209 | #else | ||
210 | #define twl4030_mmc_get_context_loss NULL | ||
211 | #endif | ||
212 | |||
201 | static int twl_mmc1_set_power(struct device *dev, int slot, int power_on, | 213 | static int twl_mmc1_set_power(struct device *dev, int slot, int power_on, |
202 | int vdd) | 214 | int vdd) |
203 | { | 215 | { |
@@ -390,6 +402,9 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | |||
390 | } else | 402 | } else |
391 | mmc->slots[0].switch_pin = -EINVAL; | 403 | mmc->slots[0].switch_pin = -EINVAL; |
392 | 404 | ||
405 | mmc->get_context_loss_count = | ||
406 | twl4030_mmc_get_context_loss; | ||
407 | |||
393 | /* write protect normally uses an OMAP gpio */ | 408 | /* write protect normally uses an OMAP gpio */ |
394 | if (gpio_is_valid(c->gpio_wp)) { | 409 | if (gpio_is_valid(c->gpio_wp)) { |
395 | gpio_request(c->gpio_wp, "mmc_wp"); | 410 | gpio_request(c->gpio_wp, "mmc_wp"); |
diff --git a/arch/arm/plat-omap/include/mach/mmc.h b/arch/arm/plat-omap/include/mach/mmc.h index 81d5b36534b3..2f7cf31f9cd6 100644 --- a/arch/arm/plat-omap/include/mach/mmc.h +++ b/arch/arm/plat-omap/include/mach/mmc.h | |||
@@ -59,6 +59,9 @@ struct omap_mmc_platform_data { | |||
59 | int (*suspend)(struct device *dev, int slot); | 59 | int (*suspend)(struct device *dev, int slot); |
60 | int (*resume)(struct device *dev, int slot); | 60 | int (*resume)(struct device *dev, int slot); |
61 | 61 | ||
62 | /* Return context loss count due to PM states changing */ | ||
63 | int (*get_context_loss_count)(struct device *dev); | ||
64 | |||
62 | u64 dma_mask; | 65 | u64 dma_mask; |
63 | 66 | ||
64 | struct omap_mmc_slot_data { | 67 | struct omap_mmc_slot_data { |