staging: mt7621-mmc: Remove unused fields from msdc_dma
The fields used_gpd|bd in struct msdc_dma are only set and reset, but never used, so remove them. The other removed fields are never used, so they were removed either. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
71b0621e21
commit
4e7fd0f3e0
@ -889,13 +889,6 @@ struct msdc_regs {
|
|||||||
struct msdc_eco_ver_reg eco_ver; /* base+0x104h */
|
struct msdc_eco_ver_reg eco_ver; /* base+0x104h */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct scatterlist_ex {
|
|
||||||
u32 cmd;
|
|
||||||
u32 arg;
|
|
||||||
u32 sglen;
|
|
||||||
struct scatterlist *sg;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define DMA_FLAG_NONE (0x00000000)
|
#define DMA_FLAG_NONE (0x00000000)
|
||||||
#define DMA_FLAG_EN_CHKSUM (0x00000001)
|
#define DMA_FLAG_EN_CHKSUM (0x00000001)
|
||||||
#define DMA_FLAG_PAD_BLOCK (0x00000002)
|
#define DMA_FLAG_PAD_BLOCK (0x00000002)
|
||||||
@ -905,23 +898,13 @@ struct msdc_dma {
|
|||||||
u32 flags; /* flags */
|
u32 flags; /* flags */
|
||||||
u32 xfersz; /* xfer size in bytes */
|
u32 xfersz; /* xfer size in bytes */
|
||||||
u32 sglen; /* size of scatter list */
|
u32 sglen; /* size of scatter list */
|
||||||
u32 blklen; /* block size */
|
|
||||||
struct scatterlist *sg; /* I/O scatter list */
|
struct scatterlist *sg; /* I/O scatter list */
|
||||||
struct scatterlist_ex *esg; /* extended I/O scatter list */
|
|
||||||
u8 mode; /* dma mode */
|
u8 mode; /* dma mode */
|
||||||
u8 intr; /* dma done interrupt */
|
|
||||||
u8 padding; /* padding */
|
|
||||||
u32 cmd; /* enhanced mode command */
|
|
||||||
u32 arg; /* enhanced mode arg */
|
|
||||||
u32 rsp; /* enhanced mode command response */
|
|
||||||
u32 autorsp; /* auto command response */
|
|
||||||
|
|
||||||
struct gpd *gpd; /* pointer to gpd array */
|
struct gpd *gpd; /* pointer to gpd array */
|
||||||
struct bd *bd; /* pointer to bd array */
|
struct bd *bd; /* pointer to bd array */
|
||||||
dma_addr_t gpd_addr; /* the physical address of gpd array */
|
dma_addr_t gpd_addr; /* the physical address of gpd array */
|
||||||
dma_addr_t bd_addr; /* the physical address of bd array */
|
dma_addr_t bd_addr; /* the physical address of bd array */
|
||||||
u32 used_gpd; /* the number of used gpd elements */
|
|
||||||
u32 used_bd; /* the number of used bd elements */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct msdc_host {
|
struct msdc_host {
|
||||||
|
@ -1310,9 +1310,6 @@ static int msdc_dma_config(struct msdc_host *host, struct msdc_dma *dma)
|
|||||||
bd[j].chksum = (chksum ? msdc_dma_calcs((u8 *)(&bd[j]), 16) : 0);
|
bd[j].chksum = (chksum ? msdc_dma_calcs((u8 *)(&bd[j]), 16) : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
dma->used_gpd += 2;
|
|
||||||
dma->used_bd += dma->sglen;
|
|
||||||
|
|
||||||
sdr_set_field(MSDC_DMA_CFG, MSDC_DMA_CFG_DECSEN, chksum);
|
sdr_set_field(MSDC_DMA_CFG, MSDC_DMA_CFG_DECSEN, chksum);
|
||||||
sdr_set_field(MSDC_DMA_CTRL, MSDC_DMA_CTRL_BRUSTSZ,
|
sdr_set_field(MSDC_DMA_CTRL, MSDC_DMA_CTRL_BRUSTSZ,
|
||||||
MSDC_BRUST_64B);
|
MSDC_BRUST_64B);
|
||||||
@ -1511,8 +1508,6 @@ done:
|
|||||||
host->dma_xfer = 0;
|
host->dma_xfer = 0;
|
||||||
if (dma != 0) {
|
if (dma != 0) {
|
||||||
msdc_dma_off();
|
msdc_dma_off();
|
||||||
host->dma.used_bd = 0;
|
|
||||||
host->dma.used_gpd = 0;
|
|
||||||
dma_unmap_sg(mmc_dev(mmc), data->sg, data->sg_len, dir);
|
dma_unmap_sg(mmc_dev(mmc), data->sg, data->sg_len, dir);
|
||||||
}
|
}
|
||||||
host->blksz = 0;
|
host->blksz = 0;
|
||||||
@ -2618,8 +2613,6 @@ static int msdc_drv_probe(struct platform_device *pdev)
|
|||||||
host->mrq = NULL;
|
host->mrq = NULL;
|
||||||
//init_MUTEX(&host->sem); /* we don't need to support multiple threads access */
|
//init_MUTEX(&host->sem); /* we don't need to support multiple threads access */
|
||||||
|
|
||||||
host->dma.used_gpd = 0;
|
|
||||||
host->dma.used_bd = 0;
|
|
||||||
mmc_dev(mmc)->dma_mask = NULL;
|
mmc_dev(mmc)->dma_mask = NULL;
|
||||||
|
|
||||||
/* using dma_alloc_coherent*/ /* todo: using 1, for all 4 slots */
|
/* using dma_alloc_coherent*/ /* todo: using 1, for all 4 slots */
|
||||||
|
Loading…
Reference in New Issue
Block a user