From f3bd2cc516fc50ff50353c2fa69f0e7926a982d3 Mon Sep 17 00:00:00 2001 From: kfx Date: Thu, 31 Mar 2011 10:00:16 +0800 Subject: [PATCH] update sdmmc drivers: enable sdio interrupt --- drivers/mmc/host/rk29_sdmmc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/rk29_sdmmc.c b/drivers/mmc/host/rk29_sdmmc.c index 575e869c7511..7947a60cc34f 100755 --- a/drivers/mmc/host/rk29_sdmmc.c +++ b/drivers/mmc/host/rk29_sdmmc.c @@ -601,7 +601,10 @@ static void rk29_sdmmc_start_request(struct rk29_sdmmc *host) /* Slot specific timing and width adjustment */ rk29_sdmmc_setup_bus(host); rk29_sdmmc_write(host->regs, SDMMC_RINTSTS, 0xFFFFFFFF); - rk29_sdmmc_write(host->regs, SDMMC_INTMASK,SDMMC_INT_CMD_DONE | SDMMC_INT_DTO | RK29_SDMMC_ERROR_FLAGS | SDMMC_INT_CD); + if(rk29_sdmmc_read(host->regs, SDMMC_INTMASK) & SDMMC_INT_SDIO) + rk29_sdmmc_write(host->regs, SDMMC_INTMASK,SDMMC_INT_SDIO |SDMMC_INT_CMD_DONE | SDMMC_INT_DTO | RK29_SDMMC_ERROR_FLAGS | SDMMC_INT_CD); + else + rk29_sdmmc_write(host->regs, SDMMC_INTMASK,SDMMC_INT_CMD_DONE | SDMMC_INT_DTO | RK29_SDMMC_ERROR_FLAGS | SDMMC_INT_CD); host->curr_mrq = mrq; host->pending_events = 0; host->completed_events = 0; @@ -770,7 +773,10 @@ static void rk29_sdmmc_request_end(struct rk29_sdmmc *host, struct mmc_request * } spin_unlock(&host->lock); - rk29_sdmmc_write(host->regs, SDMMC_INTMASK,SDMMC_INT_CD); + if(rk29_sdmmc_read(host->regs, SDMMC_INTMASK) & SDMMC_INT_SDIO) + rk29_sdmmc_write(host->regs, SDMMC_INTMASK,SDMMC_INT_CD|SDMMC_INT_SDIO); + else + rk29_sdmmc_write(host->regs, SDMMC_INTMASK,SDMMC_INT_CD); if(mrq && mrq->data && mrq->data->error) { //mrq->data->bytes_xfered = 0; rk29_sdmmc_write(host->regs, SDMMC_CMD, host->stop_cmdr | SDMMC_CMD_START); -- 2.34.1