aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/sdhci.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index fcdd00785033..6c866b43b03c 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -378,16 +378,16 @@ static void sdhci_kunmap_atomic(void *buffer, unsigned long *flags)
378 378
379static void sdhci_set_adma_desc(u8 *desc, u32 addr, int len, unsigned cmd) 379static void sdhci_set_adma_desc(u8 *desc, u32 addr, int len, unsigned cmd)
380{ 380{
381 desc[7] = (addr >> 24) & 0xff; 381 __le32 *dataddr = (__le32 __force *)(desc + 4);
382 desc[6] = (addr >> 16) & 0xff; 382 __le16 *cmdlen = (__le16 __force *)desc;
383 desc[5] = (addr >> 8) & 0xff;
384 desc[4] = (addr >> 0) & 0xff;
385 383
386 desc[3] = (len >> 8) & 0xff; 384 /* SDHCI specification says ADMA descriptors should be 4 byte
387 desc[2] = (len >> 0) & 0xff; 385 * aligned, so using 16 or 32bit operations should be safe. */
388 386
389 desc[0] = cmd & 0xff; 387 cmdlen[0] = cpu_to_le16(cmd);
390 desc[1] = cmd >> 8; 388 cmdlen[1] = cpu_to_le16(len);
389
390 dataddr[0] = cpu_to_le32(addr);
391} 391}
392 392
393static int sdhci_adma_table_pre(struct sdhci_host *host, 393static int sdhci_adma_table_pre(struct sdhci_host *host,