From patchwork Mon Oct 20 09:59:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 5104161 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 F31F59F374 for ; Mon, 20 Oct 2014 10:38:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 363AA20179 for ; Mon, 20 Oct 2014 10:38:58 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3740D20123 for ; Mon, 20 Oct 2014 10:38:57 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 46D87265379; Mon, 20 Oct 2014 12:38:56 +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 A1F512610A8; Mon, 20 Oct 2014 12:36:32 +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 8F7BF260589; Mon, 20 Oct 2014 12:36:28 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id EA8CD2606C0 for ; Mon, 20 Oct 2014 12:36:22 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 20 Oct 2014 03:36:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,755,1406617200"; d="scan'208";a="621784259" 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:20 -0700 From: Vinod Koul To: alsa-devel@alsa-project.org Date: Mon, 20 Oct 2014 15:29:08 +0530 Message-Id: <1413799148-6368-6-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 5/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 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 Signed-off-by: Vinod Koul --- sound/soc/intel/sst-firmware.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c index 3bb43da..44090ac 100644 --- a/sound/soc/intel/sst-firmware.c +++ b/sound/soc/intel/sst-firmware.c @@ -34,11 +34,8 @@ static void block_module_remove(struct sst_module *module); static 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(dest, src, bytes/4); } /* create new generic firmware object */