[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0d23a5d274fd741970fe8150faccc055d000c5a.1429845922.git.micky_ching@realsil.com.cn>
Date: Wed, 29 Apr 2015 09:23:43 +0800
From: <micky_ching@...lsil.com.cn>
To: <chris@...ntf.net>, <ulf.hansson@...aro.org>,
<sameo@...ux.intel.com>
CC: <gregkh@...uxfoundation.org>, <dan.carpenter@...cle.com>,
<devel@...uxdriverproject.org>, <linux-kernel@...r.kernel.org>,
<linux-mmc@...r.kernel.org>, <rogerable@...ltek.com>,
<wei_wang@...lsil.com.cn>, Micky Ching <micky_ching@...lsil.com.cn>
Subject: [PATCH 11/12] mmc: sdhci: set DMA configure for SD4.0 mode
From: Micky Ching <micky_ching@...lsil.com.cn>
SD4.0 mode not using SDMA any more, and UHSII mode using different register
to specify block size/count.
Signed-off-by: Micky Ching <micky_ching@...lsil.com.cn>
Signed-off-by: Wei Wang <wei_wang@...lsil.com.cn>
---
drivers/mmc/host/sdhci.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 03df58c..15bd7c8 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -883,8 +883,14 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd)
host->flags &= ~SDHCI_REQ_USE_DMA;
} else {
WARN_ON(sg_cnt != 1);
- sdhci_writel(host, sg_dma_address(data->sg),
- SDHCI_DMA_ADDRESS);
+ if (host->uhsii_if_enabled)
+ sdhci_writel(host,
+ sg_dma_address(data->sg),
+ SDHCI_ADMA_ADDRESS);
+ else
+ sdhci_writel(host,
+ sg_dma_address(data->sg),
+ SDHCI_DMA_ADDRESS);
}
}
}
@@ -924,9 +930,15 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd)
sdhci_set_transfer_irqs(host);
/* Set the DMA boundary value and block size */
- sdhci_writew(host, SDHCI_MAKE_BLKSZ(SDHCI_DEFAULT_BOUNDARY_ARG,
- data->blksz), SDHCI_BLOCK_SIZE);
- sdhci_writew(host, data->blocks, SDHCI_BLOCK_COUNT);
+ if (host->uhsii_if_enabled) {
+ sdhci_writew(host, SDHCI_MAKE_BLKSZ(SDHCI_DEFAULT_BOUNDARY_ARG,
+ data->blksz), SDHCI_UHSII_BLOCK_SIZE);
+ sdhci_writew(host, data->blocks, SDHCI_UHSII_BLOCK_COUNT);
+ } else {
+ sdhci_writew(host, SDHCI_MAKE_BLKSZ(SDHCI_DEFAULT_BOUNDARY_ARG,
+ data->blksz), SDHCI_BLOCK_SIZE);
+ sdhci_writew(host, data->blocks, SDHCI_BLOCK_COUNT);
+ }
}
static void sdhci_set_transfer_mode(struct sdhci_host *host,
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists