All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: Vinod Koul <vinod.koul@intel.com>,
	broonie@kernel.org, subhransu.s.prusty@intel.com,
	lgirdwood@gmail.com
Subject: [PATCH v2 5/5] ASoC: intel: use __iowrite32_copy for 32 bit copy
Date: Mon, 20 Oct 2014 19:13:48 +0530	[thread overview]
Message-ID: <1413812628-13325-6-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1413812628-13325-1-git-send-email-vinod.koul@intel.com>

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>
---
 sound/soc/intel/Kconfig        |    2 +-
 sound/soc/intel/sst-firmware.c |    9 +++------
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
index c719438..b8a02cb 100644
--- a/sound/soc/intel/Kconfig
+++ b/sound/soc/intel/Kconfig
@@ -1,6 +1,6 @@
 config SND_MFLD_MACHINE
 	tristate "SOC Machine Audio driver for Intel Medfield MID platform"
-	depends on INTEL_SCU_IPC
+	depends on INTEL_SCU_IPC || COMPILE_TEST
 	select SND_SOC_SN95031
 	select SND_SST_MFLD_PLATFORM
 	select SND_SST_IPC
diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c
index 3bb43da..cf3d199 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 */
-- 
1.7.0.4

      parent reply	other threads:[~2014-10-20 14:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 13:43 [PATCH v2 0/5] ASoC: intel: fix to sst driver series Vinod Koul
2014-10-20 13:43 ` [PATCH v2 1/5] ASoC: intel: use __iowrite32_copy for 32 bit copy Vinod Koul
2014-10-20 13:43 ` [PATCH v2 2/5] ASoC: intel: log an error on double free Vinod Koul
2014-10-20 13:43 ` [PATCH v2 3/5] ASoC: intel: fix the kernldoc comment Vinod Koul
2014-10-20 13:43 ` [PATCH v2 4/5] ASoC: intel: explain why block not found isn't error always Vinod Koul
2014-10-20 13:43 ` Vinod Koul [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1413812628-13325-6-git-send-email-vinod.koul@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=subhransu.s.prusty@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.