浏览代码

mmc: 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 don't
see an 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>
Reviewed-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Will Newton 14 年之前
父节点
当前提交
dd6c4b9807
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      drivers/mmc/host/dw_mmc.c

+ 6 - 0
drivers/mmc/host/dw_mmc.c

@@ -1441,6 +1441,12 @@ 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;
 }