From patchwork Thu May 8 13:07:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 4136131 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A91EABFF02 for ; Thu, 8 May 2014 13:09:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E208A20270 for ; Thu, 8 May 2014 13:09:16 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id AEB212026F for ; Thu, 8 May 2014 13:09:14 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A0180265567; Thu, 8 May 2014 15:09:13 +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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id B76E02652E1; Thu, 8 May 2014 15:08:35 +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 E12A926552A; Thu, 8 May 2014 15:08:34 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by alsa0.perex.cz (Postfix) with ESMTP id A6F8B265473 for ; Thu, 8 May 2014 15:08:26 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 08 May 2014 06:03:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="4.97,1010,1389772800"; d="scan'208"; a="528507612" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.53]) by fmsmga001.fm.intel.com with ESMTP; 08 May 2014 06:07:52 -0700 From: Jarkko Nikula To: alsa-devel@alsa-project.org Date: Thu, 8 May 2014 16:07:24 +0300 Message-Id: <1399554447-16297-5-git-send-email-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.0.0.rc0 In-Reply-To: <1399554447-16297-1-git-send-email-jarkko.nikula@linux.intel.com> References: <1399554447-16297-1-git-send-email-jarkko.nikula@linux.intel.com> Cc: Liam Girdwood , Mark Brown , Jarkko Nikula , Liam Girdwood Subject: [alsa-devel] [PATCH 4/7] ASoC: Intel: Move Baytrail extended fw address saving to sst_byt_boot() 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 We have to save the physical address of extended firmware block in the beginning of mailbox every time when we boot the DSP firmware since that mailbox address is re-used after DSP firmware is running. Otherwise DSP firmware will get bogus extended firmware block address during next DSP boot. Currently this is not problem but becomes when DSP runtime rebooting is implemented. Prepare for that by moving extended firmware address saving from sst_byt_init() to sst_byt_boot(). Signed-off-by: Jarkko Nikula --- sound/soc/intel/sst-baytrail-dsp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/intel/sst-baytrail-dsp.c b/sound/soc/intel/sst-baytrail-dsp.c index a50bf7fc0e3a..4a5d489e520b 100644 --- a/sound/soc/intel/sst-baytrail-dsp.c +++ b/sound/soc/intel/sst-baytrail-dsp.c @@ -214,6 +214,13 @@ static void sst_byt_boot(struct sst_dsp *sst) { int tries = 10; + /* + * save the physical address of extended firmware block in the first + * 4 bytes of the mailbox + */ + memcpy_toio(sst->addr.lpe + SST_BYT_MAILBOX_OFFSET, + &sst->pdata->fw_base, sizeof(u32)); + /* release stall and wait to unstall */ sst_dsp_shim_update_bits64(sst, SST_CSR, SST_BYT_CSR_STALL, 0x0); while (tries--) { @@ -317,13 +324,6 @@ static int sst_byt_init(struct sst_dsp *sst, struct sst_pdata *pdata) return ret; } - /* - * save the physical address of extended firmware block in the first - * 4 bytes of the mailbox - */ - memcpy_toio(sst->addr.lpe + SST_BYT_MAILBOX_OFFSET, - &pdata->fw_base, sizeof(u32)); - ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32)); if (ret) return ret;