From patchwork Mon Oct 20 09:59:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 5104121 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 072C19F374 for ; Mon, 20 Oct 2014 10:37:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 45B8320166 for ; Mon, 20 Oct 2014 10:37:14 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3BEB220123 for ; Mon, 20 Oct 2014 10:37:13 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 438B426172B; Mon, 20 Oct 2014 12:37:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 941462606F3; Mon, 20 Oct 2014 12:36:27 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 37E68260597; Mon, 20 Oct 2014 12:36:25 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id 861EE2605A2 for ; Mon, 20 Oct 2014 12:36:14 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 20 Oct 2014 03:36:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,755,1406617200"; d="scan'208";a="621784196" Received: from vkoul-udesk3.iind.intel.com (HELO localhost.localdomain) ([10.223.96.11]) by orsmga002.jf.intel.com with ESMTP; 20 Oct 2014 03:36:11 -0700 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Mon, 20 Oct 2014 15:29:04 +0530 Message-Id: <1413799148-6368-2-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1413799148-6368-1-git-send-email-vinod.koul@intel.com> References: <1413799148-6368-1-git-send-email-vinod.koul@intel.com> Cc: Vinod Koul , broonie@kernel.org, lgirdwood@gmail.com Subject: [alsa-devel] [PATCH 1/5] ASoC: intel: use __iowrite32_copy for 32 bit copy X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Vinod Koul --- sound/soc/intel/sst/sst_loader.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sound/soc/intel/sst/sst_loader.c b/sound/soc/intel/sst/sst_loader.c index b6d27c1..40e501b 100644 --- a/sound/soc/intel/sst/sst_loader.c +++ b/sound/soc/intel/sst/sst_loader.c @@ -41,12 +41,9 @@ static 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 dev by 4 for right + * count in words */ + __iowrite32_copy(dst, src, count/4); } /**