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 3E400C001E0 for ; Mon, 24 Jul 2023 01:23:31 +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 8C3C5845; Mon, 24 Jul 2023 03:22:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8C3C5845 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1690161809; bh=krRizrxy8Iu8UHROs52EgTvumzfT8G8EdVUxFRQNM08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gCRmDkwIdKaMKWNoIKg/QAWd63B9qrP5YEmElTbANH8xNKraaK71zBolYWhWEiqwn rfsCsKPQk2QAQYk8+HDcNWB0vZDFCy4xXrXsL98Z/VSQoi4yvZqFAKfdEbexoB+0zJ ekQaQ2ZiqgbkvtQnN2nAyiZ7pPb15Ajz46EBnrVY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0A914F80153; Mon, 24 Jul 2023 03:22:13 +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 7521EF80551; Mon, 24 Jul 2023 03:22:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 49098F80551; Mon, 24 Jul 2023 03:22:09 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 400BCF800D2; Mon, 24 Jul 2023 03:22:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 400BCF800D2 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=eCx/ytrP Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D433060F00; Mon, 24 Jul 2023 01:22:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9945C433C8; Mon, 24 Jul 2023 01:22:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690161723; bh=krRizrxy8Iu8UHROs52EgTvumzfT8G8EdVUxFRQNM08=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eCx/ytrPXvUZIUVFWtT687GXetHf5993KAJKRCYttzIR2zpRWDXwzPDMWNbTnhwRN 7/JVvFV76H722jDUEXBOx+Eh93XmCn+w+t1MiTJAXV+9nTPYqDx5FpBKn5Zn08cZ5A OwB5J+GUmi7YLGrAr5uH1zo80P0rm4FpYR0I1drEm+g4FKDtp8vJOuSa5blUtRadEk MU8dfdQWKozC3mvR/mPL2/QSQVGyJ54f0Mmr4v1Ct53WKM7lUC+W4ptvnNeEnxSS2K UMHxiFifFWe3KTuNgbhBsv+8nj6dh/yC5VHt5iKTyJi5IdoPRDZpz6CukA9SF0+5vs ANOpmlxUihSYw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Venkata Prasad Potturu , Mark Brown , Sasha Levin , pierre-louis.bossart@linux.intel.com, lgirdwood@gmail.com, peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com, ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.com, perex@perex.cz, tiwai@suse.com, Vsujithkumar.Reddy@amd.com, Vijendar.Mukunda@amd.com, AjitKumar.Pandey@amd.com, sound-open-firmware@alsa-project.org, alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 6.1 10/41] ASoC: SOF: amd: Add pci revision id check Date: Sun, 23 Jul 2023 21:20:43 -0400 Message-Id: <20230724012118.2316073-10-sashal@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230724012118.2316073-1-sashal@kernel.org> References: <20230724012118.2316073-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.40 Content-Transfer-Encoding: 8bit Message-ID-Hash: CDCR47ZUWE3643EGSZHQ3ZDU537LWS7C X-Message-ID-Hash: CDCR47ZUWE3643EGSZHQ3ZDU537LWS7C X-MailFrom: sashal@kernel.org 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: From: Venkata Prasad Potturu [ Upstream commit 1d4a84632b90d88316986b05bcdfe715399a33db ] Add pci revision id check for renoir and rembrandt platforms. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20230523072009.2379198-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sof/amd/acp.h | 3 +++ sound/soc/sof/amd/pci-rmb.c | 3 +++ sound/soc/sof/amd/pci-rn.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h index dd3c072d01721..14148c311f504 100644 --- a/sound/soc/sof/amd/acp.h +++ b/sound/soc/sof/amd/acp.h @@ -54,6 +54,9 @@ #define ACP_DSP_TO_HOST_IRQ 0x04 +#define ACP_RN_PCI_ID 0x01 +#define ACP_RMB_PCI_ID 0x6F + #define HOST_BRIDGE_CZN 0x1630 #define HOST_BRIDGE_RMB 0x14B5 #define ACP_SHA_STAT 0x8000 diff --git a/sound/soc/sof/amd/pci-rmb.c b/sound/soc/sof/amd/pci-rmb.c index 4e1de462b431b..5698d910b26f3 100644 --- a/sound/soc/sof/amd/pci-rmb.c +++ b/sound/soc/sof/amd/pci-rmb.c @@ -90,6 +90,9 @@ static int acp_pci_rmb_probe(struct pci_dev *pci, const struct pci_device_id *pc unsigned int flag, i, addr; int ret; + if (pci->revision != ACP_RMB_PCI_ID) + return -ENODEV; + flag = snd_amd_acp_find_config(pci); if (flag != FLAG_AMD_SOF && flag != FLAG_AMD_SOF_ONLY_DMIC) return -ENODEV; diff --git a/sound/soc/sof/amd/pci-rn.c b/sound/soc/sof/amd/pci-rn.c index fca40b261671b..9189f63632789 100644 --- a/sound/soc/sof/amd/pci-rn.c +++ b/sound/soc/sof/amd/pci-rn.c @@ -90,6 +90,9 @@ static int acp_pci_rn_probe(struct pci_dev *pci, const struct pci_device_id *pci unsigned int flag, i, addr; int ret; + if (pci->revision != ACP_RN_PCI_ID) + return -ENODEV; + flag = snd_amd_acp_find_config(pci); if (flag != FLAG_AMD_SOF && flag != FLAG_AMD_SOF_ONLY_DMIC) return -ENODEV; -- 2.39.2