From faf54999d2394156868b8b21280f1ff4b62a7d66 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Wed, 30 Jun 2010 19:02:05 +0200 Subject: glamo-mci: add a "nonremovable" field to glamo_mmc_platform_data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- drivers/mmc/host/glamo-mci.c | 4 ++++ include/linux/mfd/glamo.h | 2 ++ 2 files changed, 6 insertions(+) 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; }; -- cgit v1.2.3