From 7a8bf874487cc8990857973a789d7161b699389d Mon Sep 17 00:00:00 2001 From: David Gibson Date: Tue, 3 Feb 2015 16:36:23 +1100 Subject: 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 Cc: Sascha Hauer Signed-off-by: David Gibson Signed-off-by: Benjamin Herrenschmidt --- drivers/mmc/host/mxcmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mmc') 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) int i; for (i = 0; i < ((len + 3) / 4); i++) { - st_le32(buf, *buf); + *buf = swab32(*buf); buf++; } } -- cgit v1.2.3