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 v3 1/5] ASoC: intel: use __iowrite32_copy for 32 bit copy
Date: Mon, 20 Oct 2014 20:54:30 +0530	[thread overview]
Message-ID: <1413818674-14158-2-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1413818674-14158-1-git-send-email-vinod.koul@intel.com>

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

Tested-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/intel/sst/sst_loader.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/sound/soc/intel/sst/sst_loader.c b/sound/soc/intel/sst/sst_loader.c
index b6d27c1..00f60c1 100644
--- a/sound/soc/intel/sst/sst_loader.c
+++ b/sound/soc/intel/sst/sst_loader.c
@@ -39,14 +39,12 @@
 #include "sst.h"
 #include "../sst-dsp.h"
 
-static void memcpy32_toio(void __iomem *dst, const void *src, int count)
+static inline void memcpy32_toio(void __iomem *dst, const void *src, int count)
 {
-	int i;
-	const u32 *src_32 = src;
-	u32 *dst_32 = dst;
-
-	for (i = 0; i < count/sizeof(u32); i++)
-		writel(*src_32++, dst_32++);
+	/* __iowrite32_copy uses 32-bit count values so divide by 4 for
+	 * right count in words
+	 */
+	__iowrite32_copy(dst, src, count/4);
 }
 
 /**
-- 
1.7.0.4

  reply	other threads:[~2014-10-20 16:02 UTC|newest]

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

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=1413818674-14158-2-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.