[PATCH 14/30] staging: mt7621-mmc: Remove transfer mode setting variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
---
 drivers/staging/mt7621-mmc/dbg.c | 15 ---------------
 drivers/staging/mt7621-mmc/dbg.h |  1 -
 drivers/staging/mt7621-mmc/sd.c  |  7 +------
 3 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/drivers/staging/mt7621-mmc/dbg.c b/drivers/staging/mt7621-mmc/dbg.c
index 8f38484c8dbb..163c061b440c 100644
--- a/drivers/staging/mt7621-mmc/dbg.c
+++ b/drivers/staging/mt7621-mmc/dbg.c
@@ -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);
diff --git a/drivers/staging/mt7621-mmc/dbg.h b/drivers/staging/mt7621-mmc/dbg.h
index 6f00fcdaba32..9412d73f33a8 100644
--- a/drivers/staging/mt7621-mmc/dbg.h
+++ b/drivers/staging/mt7621-mmc/dbg.h
@@ -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 */
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index ddd0b301fef3..c1640689aded 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -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) {
-- 
2.16.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux