From: 柯飞雄 Date: Sat, 29 May 2010 02:35:17 +0000 (+0000) Subject: mod sdmmc X-Git-Tag: firefly_0821_release~11444 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=11dd6922f720860c4d8383a2a7cb5c9e04c515b0;p=firefly-linux-kernel-4.4.55.git mod sdmmc --- diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index c1dca8a8e443..c58ddc0eecc1 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -13,14 +13,14 @@ config SDMMC_RK2818 if SDMMC_RK2818 comment "Now, there are two SDMMC controllers selected, SDMMC0 and SDMMC1." config SDMMC0_RK2818 - tristate "RK2818 SDMMC0 controller support" + tristate "RK2818 SDMMC0 controller support(sdmmc)" default y depends on ARCH_RK2818 help This supports the use of the SDMMC0 controller on rk2818 processors. config SDMMC1_RK2818 - tristate "RK2818 SDMMC1 controller support" + tristate "RK2818 SDMMC1 controller support(sdio)" default y depends on ARCH_RK2818 help diff --git a/drivers/mmc/host/rk2818-sdmmc.c b/drivers/mmc/host/rk2818-sdmmc.c index 21dd06453217..f011e3f536e2 100644 --- a/drivers/mmc/host/rk2818-sdmmc.c +++ b/drivers/mmc/host/rk2818-sdmmc.c @@ -341,6 +341,8 @@ static void rk2818_sdmmc_stop_dma(struct rk2818_sdmmc_host *host) writel(readl(host->regs + SDMMC_CTRL) & ~SDMMC_CTRL_DMA_ENABLE, host->regs +SDMMC_CTRL); disable_dma(host->dma_chn); + free_dma(host->dma_chn); + host->dma_chn = -1; rk2818_sdmmc_dma_cleanup(host); } else { /* Data transfer was stopped by the interrupt handler */ @@ -360,6 +362,7 @@ static void rk2818_sdmmc_dma_complete(int chn, void *arg) rk2818_sdmmc_dma_cleanup(host); disable_dma(host->dma_chn); free_dma(host->dma_chn); + host->dma_chn = -1; if (data) { rk2818_sdmmc_set_pending(host, EVENT_XFER_COMPLETE); tasklet_schedule(&host->tasklet); @@ -1186,6 +1189,7 @@ static int rk2818_sdmmc_probe(struct platform_device *pdev) host->mmc = mmc; host->pdev = pdev; host->dev = &pdev->dev; + host->dma_chn = -1; host->use_dma = pdata->use_dma; host->no_detect = pdata->no_detect; @@ -1276,7 +1280,7 @@ static int rk2818_sdmmc_probe(struct platform_device *pdev) mmc->max_phys_segs = 64; mmc->max_hw_segs = 64; - mmc->max_blk_size = /*4095*/1023; + mmc->max_blk_size = 4095; mmc->max_blk_count = /*512*/4; mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; mmc->max_seg_size = mmc->max_req_size;