summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-11-04 12:42:40 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2014-11-10 12:40:50 +0100
commitb5ffa6749c596234243731e458739a2d793fb944 (patch)
tree64242ad4f82b0a40119a5d9cb941842755bc4bf5 /drivers/mmc
parent4efaa6fbe1fd5e86ab2fee4cdcfc6873dab60716 (diff)
mmc: sdhci: Add sdhci_adma_mark_end()
In preparation for 64-bit ADMA, separate out code that touches the ADMA descriptor by adding sdhci_adma_mark_end(). Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index f2062b073e00..19f31ea99738 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -468,6 +468,13 @@ static void sdhci_adma_write_desc(u8 *desc, u32 addr, int len, unsigned cmd)
dataddr[0] = cpu_to_le32(addr);
}
+static void sdhci_adma_mark_end(void *desc)
+{
+ u8 *dma_desc = desc;
+
+ dma_desc[0] |= 0x2; /* end */
+}
+
static int sdhci_adma_table_pre(struct sdhci_host *host,
struct mmc_data *data)
{
@@ -564,7 +571,7 @@ static int sdhci_adma_table_pre(struct sdhci_host *host,
*/
if (desc != host->adma_table) {
desc -= 8;
- desc[0] |= 0x2; /* end */
+ sdhci_adma_mark_end(desc);
}
} else {
/*