diff options
author | Thibaut Girka <thib@sitedethib.com> | 2010-06-30 19:02:05 +0200 |
---|---|---|
committer | Lars-Peter Clausen <lars@metafoo.de> | 2010-07-03 19:04:22 +0200 |
commit | faf54999d2394156868b8b21280f1ff4b62a7d66 (patch) | |
tree | d523a237e5351c8046c21033e3c99e6c3c54d3ac | |
parent | 3ab0d545a0b24811883eec3e9b43fa22645f9c17 (diff) |
glamo-mci: add a "nonremovable" field to glamo_mmc_platform_data
On the FR, the µSD can't be removed without removing the battery first.
So, we can safely assume that the µSD is not removable.
This patch make the MMC subsystem know that the card isn't removable if the new
"nonremovable" field in the platform data is true.
This affects, amongst other things, the suspend/resume process, the default
behaviour being to remove the card (after syncind any mounted FS) on suspend,
and re-detect it on resume, to prevent errors when removing the card while
the device is suspended.
-rw-r--r-- | drivers/mmc/host/glamo-mci.c | 4 | ||||
-rw-r--r-- | include/linux/mfd/glamo.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/host/glamo-mci.c b/drivers/mmc/host/glamo-mci.c index 923c1ce621c..f07ad094079 100644 --- a/drivers/mmc/host/glamo-mci.c +++ b/drivers/mmc/host/glamo-mci.c @@ -812,6 +812,10 @@ static int glamo_mci_probe(struct platform_device *pdev) mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED; + + if (host->pdata->nonremovable) + mmc->caps |= MMC_CAP_NONREMOVABLE; + mmc->f_min = host->clk_rate / 256; mmc->f_max = sd_max_clk; diff --git a/include/linux/mfd/glamo.h b/include/linux/mfd/glamo.h index 529d4f07f03..ae52f3d4960 100644 --- a/include/linux/mfd/glamo.h +++ b/include/linux/mfd/glamo.h @@ -8,6 +8,8 @@ struct glamo_fb_platform_data; struct glamo_mmc_platform_data { int (*glamo_mmc_use_slow)(void); + unsigned nonremovable:1; + struct glamo_core *core; }; |