diff options
author | Andy Green <andy@openmoko.com> | 2008-12-01 01:26:35 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-12-01 01:26:35 +0000 |
commit | 6fda0605b72aca73a85d4a5d997c44a6f4910716 (patch) | |
tree | 810f1a69cab9e55a8040a13c27bdfdde7d17209e /drivers/mfd | |
parent | 4332cd701590b5753ef04d9a898be4dc3ff111fb (diff) |
fix-glamo-mci-no-wait-ack-deselect.patch
Now the card is powered when we send the last command from the stack,
SELECT CARD with arg 0, we learn that the card can't reply when
deselected. So detect SELECT CARD and arg 0 and don't bother waiting
for an ack that isn't coming. This chops three seconds off suspend :-)
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/glamo/glamo-mci.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mfd/glamo/glamo-mci.c b/drivers/mfd/glamo/glamo-mci.c index b8674382cfe..238f6b9574f 100644 --- a/drivers/mfd/glamo/glamo-mci.c +++ b/drivers/mfd/glamo/glamo-mci.c @@ -626,6 +626,11 @@ static void glamo_mci_send_request(struct mmc_host *mmc) if (glamo_mci_send_command(host, cmd)) goto bail; + + /* we are deselecting card? because it isn't going to ack then... */ + if ((cmd->opcode == 7) && (cmd->arg == 0)) + goto done; + /* * we must spin until response is ready or timed out * -- we don't get interrupts unless there is a bulk rx @@ -641,7 +646,9 @@ static void glamo_mci_send_request(struct mmc_host *mmc) if (insanity_timeout < 0) { cmd->error = -ETIMEDOUT; - dev_err(&host->pdev->dev, "****** insanity timeout\n"); + dev_err(&host->pdev->dev, "***** insanity timeout cmd 0x%x, " + "arg 0x%x data=%p mrq->stop=%p flags 0x%x\n", + cmd->opcode, cmd->arg, cmd->data, cmd->mrq->stop, cmd->flags); } if (status & (GLAMO_STAT1_MMC_RTOUT | |