diff mbox

[1/2] dw_mmc: Run card detect tasklet during slot initialisation.

Message ID AANLkTikwVAKaiAy+0Vpcu97qxX3ZKgZ8k_LyNfOU9Ws=@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Will Newton Feb. 4, 2011, 11:17 a.m. UTC
None
diff mbox

Patch

From 53094aaa4cd8b5da78acfbf7da6c4848fb720413 Mon Sep 17 00:00:00 2001
From: Will Newton <will.newton@imgtec.com>
Date: Fri, 4 Feb 2011 11:07:46 +0000
Subject: [PATCH 1/2] dw_mmc:  Run card detect tasklet during slot initialisation.

We need to run the card detect tasklet at the end of slot initialisation
as it is possible that a card has been inserted prior to boot, so we miss
the insertion interrupt and now the card is sitting there inserted but with
no power to it.

Signed-off-by: Neil Jones <neil.jones@imgtec.com>
Signed-off-by: Will Newton <will.newton@imgtec.com>
---
 drivers/mmc/host/dw_mmc.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 2fcc825..0b0bedd 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1441,6 +1441,13 @@  static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 	/* Card initially undetected */
 	slot->last_detect_state = 0;
 
+
+	/*
+	 * Card may have been plugged in prior to boot so we
+	 * need to run the detect tasklet
+	 */
+	tasklet_schedule(&host->card_tasklet);
+
 	return 0;
 }
 
-- 
1.7.3.4