Skip to contentSkip to conversation

mmc: dw_mmc: restore the card-present checking point

PATCH In review Jaehoon Chung 2 participants 2 messages Mar 3, 2014 – Mar 6, 2014

Subsystems (2)
lore
Share & tools
lore

Jaehoon Chung

author maintainer
#0 lore raw

PATCH v4 7/7 mmc: dw_mmc: restore the card-present checking point

Restore the card-present cheching point.
(The following part was removed from commit bf626e5(mmc: dw_mmc: use slot-gpio to handle cd pin).)

---
 drivers/mmc/host/dw_mmc.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/mmc/host/dw_mmc.c +5 -0
index 22184c1..ab4c86d 100644
@@ -2113,6 +2113,11 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 #endif /* CONFIG_MMC_DW_IDMAC */
 	}
 
+	if (dw_mci_get_cd(mmc))
+		set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
+	else
+		clear_bit(DW_MMC_CARD_PRESENT, &slot->flags);
+
 	ret = mmc_add_host(mmc);
 	if (ret)
 		goto err_setup_bus;
Signature · 1 line
1.7.9.5
Acked-by on v4 7/7
#1 lore raw
Quoted 4 lines · Jaehoon Chung

Restore the card-present cheching point.
(The following part was removed from commit bf626e5(mmc: dw_mmc: use slot-gpio to handle cd pin).)

Quoted 22 lines
---
 drivers/mmc/host/dw_mmc.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/mmc/host/dw_mmc.c +5 -1
index 22184c1..ab4c86d 100644
@@ -2113,6 +2113,11 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 #endif /* CONFIG_MMC_DW_IDMAC */
        }
 
+       if (dw_mci_get_cd(mmc))
+               set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
+       else
+               clear_bit(DW_MMC_CARD_PRESENT, &slot->flags);
+
        ret = mmc_add_host(mmc);
        if (ret)
                goto err_setup_bus;
--

1.7.9.5