From patchwork Fri Jul 15 14:52:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 590861 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7D70BC433EF for ; Fri, 15 Jul 2022 14:54:37 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B82DD190B; Fri, 15 Jul 2022 16:53:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B82DD190B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1657896875; bh=P9Stj19o1AF67HuR6rnoIYutAOyl1Vd/NMpewExjmZc=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=E6y58KWGrCcB2ikX6iROuK5rKqZbo+xAhei0Uzg/Tt393BbXaBZcOzmTS6DG8ETj3 NLCEgjLYG8iAldO/uNNDnXsMJyrzoscx4QjnPIyQXnCClFVjaAmDQaLYe9U1Tt7q+E /eh2SbMxpWwPSg/eNJZw1ZQhf6dchpvn4UUPARDw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 95B0BF80552; Fri, 15 Jul 2022 16:53:02 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6B345F80548; Fri, 15 Jul 2022 16:52:59 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DB9EDF8012F for ; Fri, 15 Jul 2022 16:52:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DB9EDF8012F Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GTdobfVv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657896773; x=1689432773; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=P9Stj19o1AF67HuR6rnoIYutAOyl1Vd/NMpewExjmZc=; b=GTdobfVvpugz7S61kjoDE54CT3qB+8wp3kmJDmHIEnVsLULB+27NL5au qyByow6Ahf0gD8ERwd90Q7QItAYRfJ7W+onYSb4Mz1APa7rdllXlPRZFG LNeNakH9mIr9/gwF6NnVrENWdPMDyAWO/b0yIIjEkZk2k81zcIjOdi78X DbZeM4tM2gmJYM9NdGlOc0Fq6/wyzAvcS6RqbFySt6AkNsu5WcZQky4i7 LAoM02uWiZJ/UwzVPXIHusS8SqXfQ+jxRhehQn9E4UPxELm330R/IaVg2 EkOyP09GaM7K3Lev1klh9Pg3HH74u//XtK+ddgTd4fR2BzHis4SHm5IHC w==; X-IronPort-AV: E=McAfee;i="6400,9594,10408"; a="311476900" X-IronPort-AV: E=Sophos;i="5.92,274,1650956400"; d="scan'208";a="311476900" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2022 07:52:31 -0700 X-IronPort-AV: E=Sophos;i="5.92,274,1650956400"; d="scan'208";a="923533104" Received: from jmurope-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.14.184]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2022 07:52:30 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 01/11] ASoC: SOF: Intel: MTL: remove redundant snd_sof_dsp_read() call Date: Fri, 15 Jul 2022 09:52:06 -0500 Message-Id: <20220715145216.277003-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220715145216.277003-1-pierre-louis.bossart@linux.intel.com> References: <20220715145216.277003-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, =?utf-8?q?P=C3=A9ter_Ujfalusi?= , Ranjani Sridharan , Pierre-Louis Bossart , broonie@kernel.org, Chao Song , Bard Liao , Yong Zhi X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Yong Zhi Drop redundant CPA bit check after polling the same condition. Fixes: 064520e8aeaa ("ASoC: SOF: Intel: Add support for MeteorLake (MTL)") Reviewed-by: Chao Song Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/mtl.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/sound/soc/sof/intel/mtl.c b/sound/soc/sof/intel/mtl.c index a5e244ea0688..96239ebb1eed 100644 --- a/sound/soc/sof/intel/mtl.c +++ b/sound/soc/sof/intel/mtl.c @@ -372,20 +372,9 @@ static int mtl_dsp_core_power_up(struct snd_sof_dev *sdev, int core) ret = snd_sof_dsp_read_poll_timeout(sdev, HDA_DSP_BAR, MTL_DSP2CXCTL_PRIMARY_CORE, dspcxctl, (dspcxctl & cpa) == cpa, HDA_DSP_REG_POLL_INTERVAL_US, HDA_DSP_RESET_TIMEOUT_US); - if (ret < 0) { + if (ret < 0) dev_err(sdev->dev, "%s: timeout on MTL_DSP2CXCTL_PRIMARY_CORE read\n", __func__); - return ret; - } - - /* did core power up ? */ - dspcxctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP2CXCTL_PRIMARY_CORE); - if ((dspcxctl & MTL_DSP2CXCTL_PRIMARY_CORE_CPA_MASK) - != MTL_DSP2CXCTL_PRIMARY_CORE_CPA_MASK) { - dev_err(sdev->dev, "power up core failed core %d adspcs %#x\n", - core, dspcxctl); - ret = -EIO; - } return ret; }