mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
mmc: Revert "mmc: dw_mmc: Add check for IDMAC configuration"
This reverts commit 94c6cee91
(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>
This commit is contained in:
parent
f6ad0a4813
commit
897b69e720
1 changed files with 2 additions and 13 deletions
|
@ -410,23 +410,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)
|
||||||
static int dw_mci_idmac_init(struct dw_mci *host)
|
static int dw_mci_idmac_init(struct dw_mci *host)
|
||||||
{
|
{
|
||||||
struct idmac_desc *p;
|
struct idmac_desc *p;
|
||||||
int i, dma_support;
|
int i;
|
||||||
|
|
||||||
/* Number of descriptors in the ring buffer */
|
/* Number of descriptors in the ring buffer */
|
||||||
host->ring_size = PAGE_SIZE / sizeof(struct idmac_desc);
|
host->ring_size = PAGE_SIZE / sizeof(struct idmac_desc);
|
||||||
|
|
||||||
/* Check if Hardware Configuration Register has support for DMA */
|
|
||||||
dma_support = (mci_readl(host, HCON) >> 16) & 0x3;
|
|
||||||
|
|
||||||
if (!dma_support || dma_support > 2) {
|
|
||||||
dev_err(host->dev,
|
|
||||||
"Host Controller does not support IDMA Tx.\n");
|
|
||||||
host->dma_ops = NULL;
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
dev_info(host->dev, "Using internal DMA controller.\n");
|
|
||||||
|
|
||||||
/* Forward link the descriptor list */
|
/* Forward link the descriptor list */
|
||||||
for (i = 0, p = host->sg_cpu; i < host->ring_size - 1; i++, p++)
|
for (i = 0, p = host->sg_cpu; i < host->ring_size - 1; i++, p++)
|
||||||
p->des3 = host->sg_dma + (sizeof(struct idmac_desc) * (i + 1));
|
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)
|
||||||
/* Determine which DMA interface to use */
|
/* Determine which DMA interface to use */
|
||||||
#ifdef CONFIG_MMC_DW_IDMAC
|
#ifdef CONFIG_MMC_DW_IDMAC
|
||||||
host->dma_ops = &dw_mci_idmac_ops;
|
host->dma_ops = &dw_mci_idmac_ops;
|
||||||
|
dev_info(&host->dev, "Using internal DMA controller.\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!host->dma_ops)
|
if (!host->dma_ops)
|
||||||
|
|
Loading…
Reference in a new issue