]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
staging: mt7621-mmc: Remove transfer mode setting variable
authorChristian Lütke-Stetzkamp <christian@lkamp.de>
Sun, 29 Apr 2018 17:32:27 +0000 (19:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 May 2018 02:08:05 +0000 (19:08 -0700)
Currently the transfer mode can be chosen between DMA, a size
dependent mode and non-DMA by writing to a proc file. The upstream
driver mtk-sd uses DMA all times. The previous patch removed the
ability to set that option.

Now the remaining uses of the transfer mode setting variable are
cleaned up, because it cannot be changed any more.

Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-mmc/dbg.c
drivers/staging/mt7621-mmc/dbg.h
drivers/staging/mt7621-mmc/sd.c

index 8f38484c8dbb8d05d0fdfb4aae8a687360d49421..163c061b440c46d4a4452e4351630324a4f72742 100644 (file)
@@ -66,13 +66,6 @@ u32 dma_size[4] = {
        512
 };
 
-enum msdc_mode drv_mode[4] = {
-       MODE_DMA, /* using DMA always */
-       MODE_DMA,
-       MODE_DMA,
-       MODE_DMA
-};
-
 #if defined(MT6575_SD_DEBUG)
 /* for driver profile */
 #define TICKS_ONE_MS  (13000)
@@ -235,14 +228,6 @@ static int msdc_debug_proc_read(struct seq_file *s, void *p)
        seq_printf(s, "-> MSDC[2] Zone: 0x%.8x\n", sd_debug_zone[2]);
        seq_printf(s, "-> MSDC[3] Zone: 0x%.8x\n", sd_debug_zone[3]);
 
-       seq_puts(s, "Index<1> + ID:4|Mode:4 + DMA_SIZE\n");
-       seq_puts(s, "-> 0)PIO 1)DMA 2)SIZE\n");
-       seq_puts(s, "-> echo 1 22 0x200 >msdc_bebug -> host[2] size mode, dma when >= 512\n");
-       seq_printf(s, "-> MSDC[0] mode<%d> size<%d>\n", drv_mode[0], dma_size[0]);
-       seq_printf(s, "-> MSDC[1] mode<%d> size<%d>\n", drv_mode[1], dma_size[1]);
-       seq_printf(s, "-> MSDC[2] mode<%d> size<%d>\n", drv_mode[2], dma_size[2]);
-       seq_printf(s, "-> MSDC[3] mode<%d> size<%d>\n", drv_mode[3], dma_size[3]);
-
        seq_puts(s, "Index<3> + SDIO_PROFILE + TIME\n");
        seq_puts(s, "-> echo 3 1 0x1E >msdc_bebug -> enable sdio_profile, 30s\n");
        seq_printf(s, "-> SDIO_PROFILE<%d> TIME<%ds>\n", sdio_pro_enable, sdio_pro_time);
index 6f00fcdaba32080674694e998beb38ff8e134cb0..9412d73f33a834fe2571f9337605afa8407ab786 100644 (file)
@@ -79,7 +79,6 @@ enum msdc_mode {
        MODE_SIZE_DEP = 2,
 };
 
-extern enum msdc_mode drv_mode[4];
 extern u32 dma_size[4];
 
 /* Debug message event */
index ddd0b301fef337f58f096b0f11cbda961b2a79be..c1640689aded10664661fbc6106726a68d1dff03 100644 (file)
@@ -1374,12 +1374,7 @@ static int msdc_do_request(struct mmc_host *mmc, struct mmc_request *mrq)
                host->blksz = data->blksz;
 
                /* deside the transfer mode */
-               if (drv_mode[host->id] == MODE_PIO)
-                       host->dma_xfer = 0;
-               else if (drv_mode[host->id] == MODE_DMA)
-                       host->dma_xfer = 1;
-               else if (drv_mode[host->id] == MODE_SIZE_DEP)
-                       host->dma_xfer = ((host->xfer_size >= dma_size[host->id]) ? 1 : 0);
+               host->dma_xfer = 1;
                dma = host->dma_xfer;
 
                if (read) {