mmc: host: rk_sdmmc:

When sysyem enter suspend, MHSC would be power-off, and the CD int
    will be trigger after controller power-on sequential flow, it's wrong case
    for sd card always in slot! Move it to routine_card to judge present state
    and decide whether to wakeup screen or not. Now, SHOULD NOT disable vcc_sd
    in regulator_state_mem .

    [28890.551808] mmc_sd_detect(mmc1): Unable to re-detect card (-110)
    [28890.551842] mmc1: card 1234 removed
    [28890.856547] mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 400000Hz, actual 396825HZ div = 63)
    [28891.163590] mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0)
    [28891.163709] rk_sdmmc: BOOT Bus speed=50000000Hz,Bus width=4bits.[mmc1]
    [28891.163766] mmc1: new high speed SDHC card at address 1234
    [28891.164460] mmcblk1: mmc1:1234 SA32G 29.3 GiB
    [28891.165939] mmcblk1: p1
This commit is contained in:
lintao
2014-05-22 15:36:27 +08:00
parent a554b12b59
commit 3ad1679c5b

View File

@@ -2456,7 +2456,6 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
if (pending & SDMMC_INT_CD) {
mci_writel(host, RINTSTS, SDMMC_INT_CD);
rk_send_wakeup_key();//wake up system
queue_work(host->card_workqueue, &host->card_work);
}
@@ -2470,10 +2469,10 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
for (i = 0; i < host->num_slots; i++) {
struct dw_mci_slot *slot = host->slot[i];
if (host->verid < DW_MMC_240A)
sdio_int = SDMMC_INT_SDIO(i);
else
sdio_int = SDMMC_INT_SDIO(i + 8);
if (host->verid < DW_MMC_240A)
sdio_int = SDMMC_INT_SDIO(i);
else
sdio_int = SDMMC_INT_SDIO(i + 8);
if (pending & sdio_int) {
mci_writel(host, RINTSTS, sdio_int);
@@ -2512,9 +2511,10 @@ static void dw_mci_work_routine_card(struct work_struct *work)
while (present != slot->last_detect_state) {
dev_dbg(&slot->mmc->class_dev, "card %s\n",
present ? "inserted" : "removed");
MMC_DBG_BOOT_FUNC(mmc, " The card is %s. ===!!!!!!==[%s]\n",
MMC_DBG_BOOT_FUNC(mmc, " The card is %s. ===!!!!!!==[%s]\n",
present ? "inserted" : "removed.", mmc_hostname(mmc));
rk_send_wakeup_key();//wake up system
spin_lock_bh(&host->lock);
/* Card change detected */