mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
9e506f35b1
sdhci_set_adma_desc() is using byte-writes to write data in a specified order into memory. Change to using __le16 for the two byte and __le32 for the four byte cases and use the cpu_to_{le16,le32} to do the conversion before writing. This will reduce the size of the code and the number of writes as we no longer need to chop the data up before writing. As an example on ARM S3C64XX SoC, in little-endian configuration: 000000d4 <sdhci_set_adma_desc>: - d8: e1a0c423 lsr ip, r3, #8 - dc: e1a0ec21 lsr lr, r1, #24 - e0: e1a04821 lsr r4, r1, #16 - e4: e1a05421 lsr r5, r1, #8 - e8: e1a06442 asr r6, r2, #8 - ec: e5c0c001 strb ip, [r0, #1] - f0: e5c0e007 strb lr, [r0, #7] - f4: e5c04006 strb r4, [r0, #6] - f8: e5c05005 strb r5, [r0, #5] - fc: e5c01004 strb r1, [r0, #4] - 100: e5c06003 strb r6, [r0, #3] - 104: e5c02002 strb r2, [r0, #2] - 108: e5c03000 strb r3, [r0] + d4: e5801004 str r1, [r0, #4] + d8: e1c030b0 strh r3, [r0] + dc: e1c020b2 strh r2, [r0, #2] Signed-off-by: Ben Dooks <ben-linux@fluff.org> Cc: Pierre Ossman <pierre@ossman.eu> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
---|---|---|
.. | ||
at91_mci.c | ||
atmel-mci-regs.h | ||
atmel-mci.c | ||
au1xmmc.c | ||
bfin_sdh.c | ||
cb710-mmc.c | ||
cb710-mmc.h | ||
davinci_mmc.c | ||
imxmmc.c | ||
imxmmc.h | ||
Kconfig | ||
Makefile | ||
mmc_spi.c | ||
mmci.c | ||
mmci.h | ||
msm_sdcc.c | ||
msm_sdcc.h | ||
mvsdio.c | ||
mvsdio.h | ||
mxcmmc.c | ||
of_mmc_spi.c | ||
omap.c | ||
omap_hsmmc.c | ||
pxamci.c | ||
pxamci.h | ||
s3cmci.c | ||
s3cmci.h | ||
sdhci-of-core.c | ||
sdhci-of-esdhc.c | ||
sdhci-of-hlwd.c | ||
sdhci-of.h | ||
sdhci-pci.c | ||
sdhci-pltfm.c | ||
sdhci-s3c.c | ||
sdhci.c | ||
sdhci.h | ||
sdricoh_cs.c | ||
tifm_sd.c | ||
tmio_mmc.c | ||
tmio_mmc.h | ||
via-sdmmc.c | ||
wbsd.c | ||
wbsd.h |