mmc: sdhci: Add sdhci_adma_mark_end()
authorAdrian Hunter <adrian.hunter@intel.com>
Tue, 4 Nov 2014 10:42:40 +0000 (12:42 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 10 Nov 2014 11:40:50 +0000 (12:40 +0100)
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>
drivers/mmc/host/sdhci.c

index f2062b073e00d73eb1f4a8bb1cc7678c12e7147f..19f31ea9973881b9302f5b39cfbde9350f5fdd2e 100644 (file)
@@ -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 {
                /*