From: Vinod Koul <vinod.koul@intel.com>
Date: Mon, 20 Oct 2014 15:24:34 +0000 (+0530)
Subject: ASoC: intel: use __iowrite32_copy for 32 bit copy
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7f26680170e322730c7c7553f5625fb04de4f5b8;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

ASoC: intel: use __iowrite32_copy for 32 bit copy

The sst-firmware was also using own method to do 32bit copy, turns out we have a
kernel API so use that instead

[For BYT]
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---

diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c
index 3bb43dac892d..cf3d19997126 100644
--- a/sound/soc/intel/sst-firmware.c
+++ b/sound/soc/intel/sst-firmware.c
@@ -32,13 +32,10 @@
 
 static void block_module_remove(struct sst_module *module);
 
-static void sst_memcpy32(volatile void __iomem *dest, void *src, u32 bytes)
+static inline void sst_memcpy32(volatile void __iomem *dest, void *src, u32 bytes)
 {
-	u32 i;
-
-	/* copy one 32 bit word at a time as 64 bit access is not supported */
-	for (i = 0; i < bytes; i += 4)
-		memcpy_toio(dest + i, src + i, 4);
+	/* __iowrite32_copy use 32bit size values so divide by 4 */
+	__iowrite32_copy((void *)dest, src, bytes/4);
 }
 
 /* create new generic firmware object */