From bd6529a1b6e707e40f684c537b34c42dee3061ea Mon Sep 17 00:00:00 2001 From: kfx Date: Mon, 18 Apr 2011 15:20:16 +0800 Subject: [PATCH] update sdmmc driver: disable sd insert/remove wakeup --- drivers/mmc/core/bus.c | 1 - drivers/mmc/core/sd.c | 2 +- drivers/mmc/host/rk29_sdmmc.c | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 5ded133c3b4e..bdb165f93046 100755 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -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)); diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index bfb93a5c59db..8fe5e9ece251 100755 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -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); diff --git a/drivers/mmc/host/rk29_sdmmc.c b/drivers/mmc/host/rk29_sdmmc.c index e16184cf16ae..620a2323e22f 100755 --- a/drivers/mmc/host/rk29_sdmmc.c +++ b/drivers/mmc/host/rk29_sdmmc.c @@ -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, -- 2.34.1