From: lintao Date: Mon, 27 Oct 2014 05:53:16 +0000 (+0800) Subject: mmc: only stop edmac if slot state really changed X-Git-Tag: firefly_0821_release~4530 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=627a759e9990f4305b1b7ccc7651f2fd874b75dd;p=firefly-linux-kernel-4.4.55.git mmc: only stop edmac if slot state really changed This commit follow up with 27dc823e, avoid unnecessary emdac operation in routine card of bh. Signed-off-by: lintao --- diff --git a/drivers/mmc/host/rk_sdmmc.c b/drivers/mmc/host/rk_sdmmc.c index dba448bf52f4..30b22095fd30 100755 --- a/drivers/mmc/host/rk_sdmmc.c +++ b/drivers/mmc/host/rk_sdmmc.c @@ -2965,11 +2965,6 @@ static void dw_mci_work_routine_card(struct work_struct *work) present = dw_mci_get_cd(mmc); - /* Stop edma when rountine card triggered */ - if(cpu_is_rk3036() || cpu_is_rk312x()) - if(host->dma_ops && host->dma_ops->stop) - host->dma_ops->stop(host); - /* Card insert, switch data line to uart function, and vice verse. * ONLY audi chip need switched by software, using udbg tag in dts! */ @@ -2992,6 +2987,10 @@ static void dw_mci_work_routine_card(struct work_struct *work) present ? "inserted" : "removed.", mmc_hostname(mmc)); dw_mci_ctrl_all_reset(host); + /* Stop edma when rountine card triggered */ + if(cpu_is_rk3036() || cpu_is_rk312x()) + if(host->dma_ops && host->dma_ops->stop) + host->dma_ops->stop(host); rk_send_wakeup_key();//wake up system spin_lock_bh(&host->lock);