Commit f3e1b576 authored by Christian Lütke-Stetzkamp's avatar Christian Lütke-Stetzkamp Committed by Greg Kroah-Hartman

staging: mt7621-mmc: Remove DMA basic mode code

The driver currently only uses DMA linked mode and the upstream
driver does the same, so remove the basic mode code.
Signed-off-by: default avatarChristian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b9ec4b83
...@@ -1040,25 +1040,6 @@ static void msdc_dma_config(struct msdc_host *host, struct msdc_dma *dma) ...@@ -1040,25 +1040,6 @@ static void msdc_dma_config(struct msdc_host *host, struct msdc_dma *dma)
struct gpd *gpd; struct gpd *gpd;
struct bd *bd; struct bd *bd;
switch (dma->mode) {
case MSDC_MODE_DMA_BASIC:
BUG_ON(host->xfer_size > 65535);
BUG_ON(dma->sglen != 1);
writel(PHYSADDR(sg_dma_address(sg)), MSDC_DMA_SA);
sdr_set_field(MSDC_DMA_CTRL, MSDC_DMA_CTRL_LASTBUF, 1);
//#if defined (CONFIG_RALINK_MT7620)
if (ralink_soc == MT762X_SOC_MT7620A)
sdr_set_field(MSDC_DMA_CTRL, MSDC_DMA_CTRL_XFERSZ, sg_dma_len(sg));
//#elif defined (CONFIG_RALINK_MT7621) || defined (CONFIG_RALINK_MT7628)
else
writel(sg_dma_len(sg), (void __iomem *)(RALINK_MSDC_BASE + 0xa8));
//#endif
sdr_set_field(MSDC_DMA_CTRL, MSDC_DMA_CTRL_BRUSTSZ,
MSDC_BRUST_64B);
sdr_set_field(MSDC_DMA_CTRL, MSDC_DMA_CTRL_MODE, 0);
break;
case MSDC_MODE_DMA_DESC:
/* calculate the required number of gpd */ /* calculate the required number of gpd */
num = (dma->sglen + MAX_BD_PER_GPD - 1) / MAX_BD_PER_GPD; num = (dma->sglen + MAX_BD_PER_GPD - 1) / MAX_BD_PER_GPD;
BUG_ON(num != 1); BUG_ON(num != 1);
...@@ -1095,11 +1076,6 @@ static void msdc_dma_config(struct msdc_host *host, struct msdc_dma *dma) ...@@ -1095,11 +1076,6 @@ static void msdc_dma_config(struct msdc_host *host, struct msdc_dma *dma)
sdr_set_field(MSDC_DMA_CTRL, MSDC_DMA_CTRL_MODE, 1); sdr_set_field(MSDC_DMA_CTRL, MSDC_DMA_CTRL_MODE, 1);
writel(PHYSADDR((u32)dma->gpd_addr), MSDC_DMA_SA); writel(PHYSADDR((u32)dma->gpd_addr), MSDC_DMA_SA);
break;
default:
break;
}
N_MSG(DMA, "DMA_CTRL = 0x%x", readl(MSDC_DMA_CTRL)); N_MSG(DMA, "DMA_CTRL = 0x%x", readl(MSDC_DMA_CTRL));
N_MSG(DMA, "DMA_CFG = 0x%x", readl(MSDC_DMA_CFG)); N_MSG(DMA, "DMA_CFG = 0x%x", readl(MSDC_DMA_CFG));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment