1 From 8533927964761f4e2078ccd8607b90f5acc60b93 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Thu, 24 Jul 2008 00:04:54 +0100
4 Subject: [PATCH] fix-glamo-mci-ensure-more-than-74-clocks-after-power.patch
6 We are meant to run SD_CLK a little while after power-on for the SD
7 Card, but with the no idle clock changes we didn't take care about it.
9 This makes us sleep a little bit before disabling clock if we just
10 powered up the SD Card.
12 Signed-off-by: Andy Green <andy@openmoko.com>
14 drivers/mfd/glamo/glamo-mci.c | 8 ++++++++
15 1 files changed, 8 insertions(+), 0 deletions(-)
17 diff --git a/drivers/mfd/glamo/glamo-mci.c b/drivers/mfd/glamo/glamo-mci.c
18 index 264a6bc..c2351e2 100644
19 --- a/drivers/mfd/glamo/glamo-mci.c
20 +++ b/drivers/mfd/glamo/glamo-mci.c
21 @@ -684,6 +684,7 @@ static void glamo_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
22 struct glamo_mci_host *host = mmc_priv(mmc);
28 switch(ios->power_mode) {
29 @@ -699,6 +700,7 @@ static void glamo_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
30 glamo_engine_enable(glamo_mci_def_pdata.pglamo,
32 glamo_mci_reset(host);
37 @@ -716,6 +718,12 @@ static void glamo_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
38 host->real_rate = __glamo_mci_set_card_clock(host, ios->clock, &div);
41 + /* after power-up, we are meant to give it >= 74 clocks so it can
42 + * initialize itself. Doubt any modern cards need it but anyway...
48 /* stop the clock to card, because we are idle until transfer */
49 __glamo_mci_fix_card_div(host, -1);