<br><br><div class="gmail_quote">2010/6/30 Thibaut Girka <span dir="ltr"><<a href="mailto:thib@sitedethib.com" target="_blank">thib@sitedethib.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On the FR, the µSD can't be removed without removing the battery first.<br>
So, we can safely assume that the µSD is not removable.<br></blockquote><div><br>Isn't it possible to remove the micro SD while powered by USB ?<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This patch make the MMC subsystem know that the card isn't removable if the new<br>
"nonremovable" field in the platform data is true.<br>
<br>
This affects, amongst other things, the suspend/resume process, the default<br>
behaviour being to remove the card (after syncind any mounted FS) on suspend,<br>
and re-detect it on resume, to prevent errors when removing the card while<br>
the device is suspended.<br>
---<br>
drivers/mmc/host/glamo-mci.c | 4 ++++<br>
include/linux/mfd/glamo.h | 2 ++<br>
2 files changed, 6 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/drivers/mmc/host/glamo-mci.c b/drivers/mmc/host/glamo-mci.c<br>
index 923c1ce..f07ad09 100644<br>
--- a/drivers/mmc/host/glamo-mci.c<br>
+++ b/drivers/mmc/host/glamo-mci.c<br>
@@ -812,6 +812,10 @@ static int glamo_mci_probe(struct platform_device *pdev)<br>
mmc->caps = MMC_CAP_4_BIT_DATA |<br>
MMC_CAP_MMC_HIGHSPEED |<br>
MMC_CAP_SD_HIGHSPEED;<br>
+<br>
+ if (host->pdata->nonremovable)<br>
+ mmc->caps |= MMC_CAP_NONREMOVABLE;<br>
+<br>
mmc->f_min = host->clk_rate / 256;<br>
mmc->f_max = sd_max_clk;<br>
<br>
diff --git a/include/linux/mfd/glamo.h b/include/linux/mfd/glamo.h<br>
index 529d4f0..ae52f3d 100644<br>
--- a/include/linux/mfd/glamo.h<br>
+++ b/include/linux/mfd/glamo.h<br>
@@ -8,6 +8,8 @@ struct glamo_fb_platform_data;<br>
struct glamo_mmc_platform_data {<br>
int (*glamo_mmc_use_slow)(void);<br>
<br>
+ unsigned nonremovable:1;<br>
+<br>
struct glamo_core *core;<br>
};<br>
<font color="#888888"><br>
--<br>
1.7.1<br>
<br>
<br>
</font></blockquote></div><br>--<br>David<br>