update sdmmc driver: disable sd insert/remove wakeup
authorkfx <kfx@rock-chips.com>
Mon, 18 Apr 2011 07:20:16 +0000 (15:20 +0800)
committerkfx <kfx@rock-chips.com>
Mon, 18 Apr 2011 07:20:16 +0000 (15:20 +0800)
drivers/mmc/core/bus.c
drivers/mmc/core/sd.c
drivers/mmc/host/rk29_sdmmc.c

index 5ded133c3b4ea4edf1edcc23fa9f89440fa74e96..bdb165f93046f9cdce780a614ddafcc41f3cab91 100755 (executable)
@@ -279,7 +279,6 @@ void mmc_remove_card(struct mmc_card *card)
 #endif
 
        if (mmc_card_present(card)) {
-               mmc_card_clr_present(card); //add by kfx
                if (mmc_host_is_spi(card->host)) {
                        printk(KERN_INFO "%s: SPI card removed\n",
                                mmc_hostname(card->host));
index bfb93a5c59db121606b08167a0821803f9583d2e..8fe5e9ece251634762e6dfba96523ed9494f55fe 100755 (executable)
@@ -590,7 +590,7 @@ static void mmc_sd_detect(struct mmc_host *host)
 #endif
        mmc_release_host(host);
 
-       if (err && mmc_card_present(host->card)) { //mod by kfx
+       if (err) {
                mmc_sd_remove(host);
 
                mmc_claim_host(host);
index e16184cf16ae4ba9debc6e716eebd18727421bb9..620a2323e22f25c31f0c7ad2ef660bbab4ab7032 100755 (executable)
@@ -1365,7 +1365,7 @@ static int rk29_sdmmc_suspend(struct platform_device *pdev, pm_message_t state)
        dev_info(host->dev, "Enter rk29_sdmmc_suspend\n");
        if(host->mmc && !host->is_sdio){
                ret = mmc_suspend_host(host->mmc, state);
-               if(host->enable_sd_warkup)
+               if(!host->enable_sd_warkup)
                        free_irq(host->gpio_irq, host);
        }
        rk29_sdmmc_write(host->regs, SDMMC_CLKENA, 0);
@@ -1384,7 +1384,7 @@ static int rk29_sdmmc_resume(struct platform_device *pdev)
        clk_enable(host->clk);
     rk29_sdmmc_write(host->regs, SDMMC_CLKENA, 1);
        if(host->mmc && !host->is_sdio){
-               if(host->enable_sd_warkup)
+               if(!host->enable_sd_warkup)
                        ret = request_irq(host->gpio_irq,
                                  rk29_sdmmc_detect_change_isr,
                                  rk29_sdmmc_get_cd(host->mmc)?IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING,