mod sdmmc
author柯飞雄 <kfx@rock-chips.com>
Fri, 28 May 2010 15:38:51 +0000 (15:38 +0000)
committer黄涛 <huangtao@rock-chips.com>
Mon, 21 Jun 2010 05:35:19 +0000 (13:35 +0800)
drivers/mmc/host/rk2818-sdmmc.c

index b2ed1ed97cab45c39647cafa4391494d60125f42..21dd0645321744a9e558e3c3f170ab993aa3c591 100644 (file)
@@ -370,7 +370,7 @@ static int rk2818_sdmmc_submit_data_dma(struct rk2818_sdmmc_host *host, struct m
 {
        struct scatterlist              *sg;
        unsigned int                    i;
-
+       dev_dbg(host->dev, "sg_len=%d\n", data->sg_len);
        host->dma_chn = -1;
        if(host->use_dma == 0)
                return -ENOSYS;
@@ -422,7 +422,7 @@ static void rk2818_sdmmc_submit_data(struct rk2818_sdmmc_host *host, struct mmc_
                        host->dir_status = RK2818_MCI_RECV_STATUS;
                else 
                        host->dir_status = RK2818_MCI_SEND_STATUS;
-               writel(readl(host->regs + SDMMC_CTRL) SDMMC_CTRL_DMA_ENABLE,
+               writel(readl(host->regs + SDMMC_CTRL) & ~SDMMC_CTRL_DMA_ENABLE,
                                host->regs +SDMMC_CTRL);
        }
 }
@@ -753,13 +753,7 @@ static void rk2818_sdmmc_tasklet_func(unsigned long priv)
 
                        if (!rk2818_sdmmc_test_and_clear_pending(host,
                                                EVENT_XFER_COMPLETE))
-                       {
-                               if(host-> no_detect == 1 && 
-                                       host->dir_status == RK2818_MCI_RECV_STATUS && 
-                                       host->dma_chn == -1)
-                                       rk2818_sdmmc_read_data_pio(host);
                                break;
-                       }
                        rk2818_sdmmc_set_completed(host, EVENT_XFER_COMPLETE);
                        prev_state = state = STATE_DATA_BUSY;
                        /* fall through */
@@ -839,7 +833,7 @@ inline static void rk2818_sdmmc_push_data(struct rk2818_sdmmc_host *host, void *
        dev_dbg(host->dev, "push data(cnt=%d)\n",cnt);
 
     if (cnt % 4 != 0) 
-           printk("error not align 4\n");
+           dev_info(host->dev, "error not align 4\n");
 
     cnt = cnt >> 2;
     while (cnt > 0) {
@@ -855,7 +849,7 @@ inline static void rk2818_sdmmc_pull_data(struct rk2818_sdmmc_host *host, void *
        dev_dbg(host->dev, "pull data(cnt=%d)\n",cnt);
 
     if (cnt % 4 != 0) 
-           printk("error not align 4\n");
+           dev_info(host->dev, "error not align 4\n");
     cnt = cnt >> 2;
     while (cnt > 0) {
         *pData++ = readl(host->regs + SDMMC_DATA);