From mboxrd@z Thu Jan 1 00:00:00 1970 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 7DEC8C77B7A for ; Wed, 17 May 2023 14:13:41 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 608131F6; Wed, 17 May 2023 16:12:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 608131F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1684332819; bh=pzFo4Z6t1V727ENInzSFlGTCw9zVEOcwoyprjyInogA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=stnVYvwb9hXbLhYIZWeMvE7aHyXaj5IZqobP40nJVcS9EZX6NgksULwh6zz+yhmMi Mzmk9ZTKBV+iCsbGHVlJUuqbu+1scY2QM7eVcYuv9bmVhVaWS6ROCL2a5o4eSH5lAe Ksi0bK98/eyQpy5CHhdprzKtLi2liv3dakYqSPJ4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 92A59F80580; Wed, 17 May 2023 16:11:58 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 15702F8057E; Wed, 17 May 2023 16:11:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5EBB5F80563; Wed, 17 May 2023 16:11:53 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 AF675F80272 for ; Wed, 17 May 2023 16:11:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AF675F80272 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VUtyAiXN DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684332705; x=1715868705; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=pzFo4Z6t1V727ENInzSFlGTCw9zVEOcwoyprjyInogA=; b=VUtyAiXNYV8QBOifaGXqKu7wyvgXFqCIU6BHBsCrGCIEpllxV08WWCup +c+KwNG649sx1DdsuHI9zpRP0137XNReAhttuEpYbP5Lp7im0fKI66XXG RqowDzXjoK6LmW9X8b6xGV8E+YXyUzspPmEH4vi5EecqLrA+0N0kIPUps ckQt84YtyyjexeNnvKkJwWXW9XbVd+EcspsGJbkwtEiHju5Wc0b3zj9JH JS410kp+VBwdXLAJFhRkRW1Vjokt+lhYNXxSQ581QH7J/XOREPGipMF4L a7vmPgg3NP6yZMXk2bhZ7od+h5wW6bBZN9cCoqsuOvjDE6un4jHuIu+mQ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10713"; a="349273422" X-IronPort-AV: E=Sophos;i="5.99,282,1677571200"; d="scan'208";a="349273422" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 07:11:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10713"; a="734709684" X-IronPort-AV: E=Sophos;i="5.99,282,1677571200"; d="scan'208";a="734709684" Received: from rdealba-mobl.amr.corp.intel.com (HELO [10.209.16.101]) ([10.209.16.101]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 07:11:41 -0700 Message-ID: <0714fa41-b77d-6735-2abb-17d93c41ca51@linux.intel.com> Date: Wed, 17 May 2023 08:36:37 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.10.0 Subject: Re: [PATCH 2/9] ASoC: amd: ps: handle soundwire interrupts in acp pci driver Content-Language: en-US To: "Mukunda,Vijendar" , Mark Brown Cc: alsa-devel@alsa-project.org, Basavaraj.Hiregoudar@amd.com, Sunil-kumar.Dommati@amd.com, Mastan.Katragadda@amd.com, Arungopal.kondaveeti@amd.com, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Syed Saba Kareem , Mario Limonciello , open list References: <20230516103543.2515097-1-Vijendar.Mukunda@amd.com> <20230516103543.2515097-3-Vijendar.Mukunda@amd.com> From: Pierre-Louis Bossart In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-ID-Hash: 6A4EZBEONKG6CAU5AFVYVSI4OWRGHW44 X-Message-ID-Hash: 6A4EZBEONKG6CAU5AFVYVSI4OWRGHW44 X-MailFrom: pierre-louis.bossart@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: >>> + if (ext_intr_stat & BIT(ACP_ERROR_IRQ_MASK)) { >>> + writel(BIT(ACP_ERROR_IRQ_MASK), adata->acp63_base + ACP_EXTERNAL_INTR_STAT); >>> + writel(0, adata->acp63_base + ACP_SW0_I2S_ERROR_REASON); >>> + writel(0, adata->acp63_base + ACP_SW1_I2S_ERROR_REASON); >>> + writel(0, adata->acp63_base + ACP_ERROR_STATUS); >>> + irq_flag = 1; >> it's not clear what this does? Looks like just filtering out interrupts >> without doing anything about the interrupt source? > When ACP error interrupt is raised, As per our design, ACP IRQ handler will clear > the error interrupt by clearing ACP_ERROR_IRQ bit in ACP_EXTERNAL_INTR_STAT. > > To know the error source reason, we need to read the ACP_ERROR_STATUS, > ACP_SW0_I2S_ERROR_REASON, ACP_SW1_I2S_ERROR_REASON registers. > After reading the Error registers, we need to clear these registers. > Currently, we haven't added read register operations for error reason registers. > This is for debugging purpose only. > > In Current context, we refer ACP_SW0_I2S_ERROR_REASONĀ  register to know errors like > Sound Wire Bus clash detections, Command and Response Errors, BRA mode errors, > FIFO underflow/overflow errors detected for SoundWire Manager -0 instance. > Similarly, ACP_SW1_I2S_ERROR_REASON register referred to know errors detected for > SoundWire Manager instance - 1. If you didn't add the code to deal with the errors, a comment would be welcome to clarify that the interrupts are cleared without looking for the root cause. It's hard when reviewing code to understand if there's a miss or something that's intentionally omitted or to be added later.