Skip to content

Commit 897b69e

Browse files
Seungwon Jeoncjb
authored andcommitted
mmc: Revert "mmc: dw_mmc: Add check for IDMAC configuration"
This reverts commit 94c6cee (Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in DMA_INTERFACE of HCON is reasonable. DMA_INTERFACE indicates external dma interface. And idmac initialization is prohibited now. The commit should be reverted since: the check for IDMAC is not reliable; falling back to PIO would provide awful performance; we wouldn't expect to see instances of this block without DMA support. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
1 parent f6ad0a4 commit 897b69e

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

drivers/mmc/host/dw_mmc.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -410,23 +410,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)
410410
static int dw_mci_idmac_init(struct dw_mci *host)
411411
{
412412
struct idmac_desc *p;
413-
int i, dma_support;
413+
int i;
414414

415415
/* Number of descriptors in the ring buffer */
416416
host->ring_size = PAGE_SIZE / sizeof(struct idmac_desc);
417417

418-
/* Check if Hardware Configuration Register has support for DMA */
419-
dma_support = (mci_readl(host, HCON) >> 16) & 0x3;
420-
421-
if (!dma_support || dma_support > 2) {
422-
dev_err(host->dev,
423-
"Host Controller does not support IDMA Tx.\n");
424-
host->dma_ops = NULL;
425-
return -ENODEV;
426-
}
427-
428-
dev_info(host->dev, "Using internal DMA controller.\n");
429-
430418
/* Forward link the descriptor list */
431419
for (i = 0, p = host->sg_cpu; i < host->ring_size - 1; i++, p++)
432420
p->des3 = host->sg_dma + (sizeof(struct idmac_desc) * (i + 1));
@@ -1985,6 +1973,7 @@ static void dw_mci_init_dma(struct dw_mci *host)
19851973
/* Determine which DMA interface to use */
19861974
#ifdef CONFIG_MMC_DW_IDMAC
19871975
host->dma_ops = &dw_mci_idmac_ops;
1976+
dev_info(&host->dev, "Using internal DMA controller.\n");
19881977
#endif
19891978

19901979
if (!host->dma_ops)

0 commit comments

Comments
 (0)