diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2015-02-03 00:36:23 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2015-03-23 22:33:50 -0400 |
commit | 7a8bf874487cc8990857973a789d7161b699389d (patch) | |
tree | 4de25247e879b07382252738b0fdec507399c300 | |
parent | c2d5a71064b5d5d169496907030c887eb6590553 (diff) |
powerpc: Remove arch specific byteswappers from the MXC MMC driver
When the MXC MMUC driver is used on a Freescale MPC512x machine, it
contains some additional byteswapping code (I'm assuming this is a
workaround for a hardware defect). This uses the ppc specific st_le32()
function, but there's no reason not to use the generic swab32() function
instead. gcc is capable of generating the efficient ppc byte-reversing
load/store instructions without the arch-specific helper.
This patch, therefore, switches to the generic byteswap routine.
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | drivers/mmc/host/mxcmmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 5316d9b9e7b4..317d709f7550 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c | |||
@@ -281,7 +281,7 @@ static inline void buffer_swap32(u32 *buf, int len) | |||
281 | int i; | 281 | int i; |
282 | 282 | ||
283 | for (i = 0; i < ((len + 3) / 4); i++) { | 283 | for (i = 0; i < ((len + 3) / 4); i++) { |
284 | st_le32(buf, *buf); | 284 | *buf = swab32(*buf); |
285 | buf++; | 285 | buf++; |
286 | } | 286 | } |
287 | } | 287 | } |