From patchwork Tue Sep 24 08:18:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 830335 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 0089ECF9C6B for ; Tue, 24 Sep 2024 08:20:00 +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 363DCBC0; Tue, 24 Sep 2024 10:19:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 363DCBC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1727165998; bh=mzE7iqMcEkbq8lRzw0FHdpNXy2E3A5M/5RVzSJimwpY=; 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=hmhsggIcWo6beucGq33AJTT44ir5C//UN3/fZ0IbwdkLPf2eAGS8hFB3W27EFOSEk AsP14Y/JrwtRDN/MYEuLdb5MFmaMl174Kq8z7ISYp3B0CD0bBpm7GhLKuq3VLkKvr0 6f5/T5ZZFO0gByhVTiZiBZqLabp7PjTBSz/HfXt8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id CF743F805AF; Tue, 24 Sep 2024 10:19:29 +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 94A03F805B0; Tue, 24 Sep 2024 10:19:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 31A6DF802DB; Tue, 24 Sep 2024 10:19:19 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on20609.outbound.protection.outlook.com [IPv6:2a01:111:f403:2409::609]) (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 DF5ADF80007 for ; Tue, 24 Sep 2024 10:19:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DF5ADF80007 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=mLyLYxKn ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UFTV6ODW+/r9aSPJxSQdrisw6US99NRKkUsaWAsgSBCFmIseFaBzpTk5yxpX58QT0B894OcQOTjQ3tNo1y8lWskmNBnS9gXS+wxw6PeYs/a1+yE0JTUmeV5m55x7iVDS81Fhp3vmWboXB7XN2auVjDgR8KlsZcWtSSt0YZktYQhJhT/rN8VL6+j6mkR+kFC56CCloDt5T0dRw5oaVOsKKYESHvvIJPgbdkfMEJnMiLnSbj7H9nQrTnFUAZsAeVoqB5gOXYX2Ot8xMHxbC8dgnnrsbZvlCeG9CKfUxhzYGx7WclJfB9ru0rdqT0sbsfck9T2rKJsmLlX60NgN+TMClA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pj4Csd8DRf7P+vzRn7lcghSHDyaQdgeDzcWTQ+6oYG8=; b=Jngopvuq0yGfcScflVAbwE/V1cCqfHBzJGiSyq3lXVE7nyTTZw251pPIcFVuxodtnnvQjj/YKO/TJr3rxp8xUe3adin3ITnJs5nBsRuO+e30Evo1goNVXDkFdMfZxyZuNgHnJiUOjN6YTNSHRegWhIvHVy4pvhKlwwqoZK+ilu6C/0B44x6RS+eFbFAJc6xh3s5Y6quX1ZNUHvS7o9pm8nEFwrNLoGEQh6p5e9OFHwA33VTrb7NFUpgCteNpai+MfXBAyQAPmWwZmCX2aViX/fKmF3BBw9PAHGZfZpcNdch49L7rPYPC5iml0VNpVlxpLECjJhZe8m7GQU82jFvf0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pj4Csd8DRf7P+vzRn7lcghSHDyaQdgeDzcWTQ+6oYG8=; b=mLyLYxKnpADlKZujtRSyDcjmPJn2DsnNU3F6SGczKPjpCzN40/4hCuMBnT+5A6PAn7O1kRq+0EKps3FabICmJEQ1DPKKf/LPKPkou0FJTCv+ud/TC/v3QS9Bm6qeoJhz6NxNoBJwGnDEvFF+PTC4RUf0yZg3E4XBsN9rq2Aaak8= Received: from SN6PR05CA0024.namprd05.prod.outlook.com (2603:10b6:805:de::37) by SA1PR12MB6895.namprd12.prod.outlook.com (2603:10b6:806:24e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 08:19:10 +0000 Received: from DS3PEPF000099DA.namprd04.prod.outlook.com (2603:10b6:805:de:cafe::70) by SN6PR05CA0024.outlook.office365.com (2603:10b6:805:de::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Tue, 24 Sep 2024 08:19:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS3PEPF000099DA.mail.protection.outlook.com (10.167.17.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8005.15 via Frontend Transport; Tue, 24 Sep 2024 08:19:09 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 03:19:03 -0500 From: Vijendar Mukunda To: , CC: , , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 1/4] soundwire: amd: pass acp pci revision id as resource data Date: Tue, 24 Sep 2024 13:48:43 +0530 Message-ID: <20240924081846.1834612-2-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924081846.1834612-1-Vijendar.Mukunda@amd.com> References: <20240924081846.1834612-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099DA:EE_|SA1PR12MB6895:EE_ X-MS-Office365-Filtering-Correlation-Id: 7d427155-61d3-430f-a223-08dcdc7190cf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|7416014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: ZGyAkDNAXZO5KS3sFnwIVLPl7NTUkwgqKQuZvaUzCJFiRB6WSvCXQbCJjeYoftPy7g/fhOKwewM2pNMVhtMVRFvnFziV/p5jvH1Vhq82f9kA8gF2WWmQXS99ki+omlyofus9jTMFln7ilTP+gykddWMTFbcituf0kevdyXnmYQ+jMISlRRJp8Iln7FDv1Bhl80F/iyFNNt51dfXy4iX4XThEVdMPOEEkPMsGBsvGSALNolLK0bPFYt6+Nlj82tBVoDHVw/iKtlSGiFimGuB7aRKEREqcxgeEt37HYh4P+ISJHcGfijVBhrXLF8eo0UEWY5y17TpVTgrjbJLZo0lvkPythBfLATi5K8s3FsrtOdesjM8PH6cPKnZB2nmoEMd1SIG7JYdNS55XUm2zaosQK5XqATe5RT1VzUjk1n5gvWaRHNEXR8Lo2JmfT56qNhOcuGbX2gziZN5228RmCkW6BPaquBqSHHW2LX2NgzfjNE0Huz6G1C8uh+js3P6eRlv++FZH8uCrIuCuBktYq+zQ2GAAcqeZsIuPhDmK2ePYFxIWQZQtkW8CYoadPtBOcEJhYc/65/mFWxj40xuayiefRtsTBu4W6zzDNAQVX+QIEIyxWOO+irHKejsM8RfDGXZkk+mfQxUqlwTohV4bIU8kg1zinpmyrPsxVRX+As46IfCpa3Np2/dDgiD2oR2gUHRd6W8+qOYrrgilKapZ/h1w55RdRCjWXXkb4RbT12kkOGNHzR6y8B0vEWEpnE2ePalA3oKMqQi9iJ1HE6PzSTuzQw1nyqVTRkmoeJtoWKQygJQNBMdmA08qgY/1b9oKYVrDoYUJVIGQpD5+yuCN1SC7tfiPTG3kUPOwah2bly1MrWz76oTasRGYkZjqVU/ninK25Han/WLF0NfvSm66/0ytznAYegsRSaYFxfHgm0WZcP4E81S2elnkyLAxqLBzRO3SJ6ulw9WT8XNocNnUrsFmjI2qQuLGu5uMSZZxGTje8tNTUuwu0X2RDiLc4EDc0yy11bKvBp9a7f3sEtnQWBe7pWYkYnlA6MCMNhqsVaNST195ymOfPgB+HrT8qmKhN08PWFxdRhPjywERvMgVJYMmMECE0QNnu62LBVPEAi18oGnusxDLvTVdXAUoSXdvyvadzYjEasq6gt/5NCNV7hfDWseqy7VaBTP3QimaPpsfburJalkEMP9u44DWcFk0Ir+LofzocBU099i3BO86u8eJxckH2fR/rrC9RlW+mknqTRo/rwXfvEJ4EDzo5U2nucfiI4OshIwoV09zuuZbWSmQgXGf0/uxyuqKP9saerSZ807qTb8+qz2bD8WdNIMnXoPH8wFoz0rOFE0pWp5CFZdmPjvVuj/XJ4FI5nLngS7cNt6v5YdNToCeYAwv90rduw3IJra9xgwYiU/3l35KUuWaq2S6xqvrxj6+yPQbD20TA8UpKTefrMtc0CmckJHvf1DK X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(7416014)(1800799024)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 08:19:09.7772 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7d427155-61d3-430f-a223-08dcdc7190cf X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099DA.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6895 Message-ID-Hash: AXHZS46JBHVLFUSNXZNU5BXA2NDUGWHR X-Message-ID-Hash: AXHZS46JBHVLFUSNXZNU5BXA2NDUGWHR X-MailFrom: Vijendar.Mukunda@amd.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.9 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: Pass ACP pci revision id as resource data and store it in amd SoundWire manager private data structure. This field will be used to differentiate ACP variants. Signed-off-by: Vijendar Mukunda --- drivers/soundwire/amd_init.c | 1 + drivers/soundwire/amd_manager.c | 1 + include/linux/soundwire/sdw_amd.h | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/drivers/soundwire/amd_init.c b/drivers/soundwire/amd_init.c index db040f435059..4f6e356e6bd2 100644 --- a/drivers/soundwire/amd_init.c +++ b/drivers/soundwire/amd_init.c @@ -121,6 +121,7 @@ static struct sdw_amd_ctx *sdw_amd_probe_controller(struct sdw_amd_res *res) sdw_pdata[index].instance = index; sdw_pdata[index].acp_sdw_lock = res->acp_lock; + sdw_pdata[index].acp_rev = res->acp_rev; pdevinfo[index].name = "amd_sdw_manager"; pdevinfo[index].id = index; pdevinfo[index].parent = res->parent; diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c index 0d01849c3586..4a1966fb01f6 100644 --- a/drivers/soundwire/amd_manager.c +++ b/drivers/soundwire/amd_manager.c @@ -910,6 +910,7 @@ static int amd_sdw_manager_probe(struct platform_device *pdev) amd_manager->mmio = amd_manager->acp_mmio + (amd_manager->instance * SDW_MANAGER_REG_OFFSET); amd_manager->acp_sdw_lock = pdata->acp_sdw_lock; + amd_manager->acp_rev = pdata->acp_rev; amd_manager->cols_index = sdw_find_col_index(AMD_SDW_DEFAULT_COLUMNS); amd_manager->rows_index = sdw_find_row_index(AMD_SDW_DEFAULT_ROWS); amd_manager->dev = dev; diff --git a/include/linux/soundwire/sdw_amd.h b/include/linux/soundwire/sdw_amd.h index 28a4eb77717f..e0abc59d4748 100644 --- a/include/linux/soundwire/sdw_amd.h +++ b/include/linux/soundwire/sdw_amd.h @@ -30,6 +30,7 @@ struct acp_sdw_pdata { u16 instance; + u32 acp_rev; /* mutex to protect acp common register access */ struct mutex *acp_sdw_lock; }; @@ -66,6 +67,7 @@ struct sdw_amd_dai_runtime { * @instance: SoundWire manager instance * @quirks: SoundWire manager quirks * @wake_en_mask: wake enable mask per SoundWire manager + * @acp_rev: acp pci device revision id * @clk_stopped: flag set to true when clock is stopped * @power_mode_mask: flag interprets amd SoundWire manager power mode * @dai_runtime_array: dai runtime array @@ -94,6 +96,7 @@ struct amd_sdw_manager { u32 quirks; u32 wake_en_mask; u32 power_mode_mask; + u32 acp_rev; bool clk_stopped; struct sdw_amd_dai_runtime **dai_runtime_array; @@ -134,6 +137,7 @@ struct sdw_amd_ctx { * struct sdw_amd_res - Soundwire AMD global resource structure, * typically populated by the DSP driver/Legacy driver * + * @acp_rev: acp pci device revision id * @addr: acp pci device resource start address * @reg_range: ACP register range * @link_mask: bit-wise mask listing links selected by the DSP driver/ @@ -146,6 +150,7 @@ struct sdw_amd_ctx { * @acp_lock: mutex protecting acp common registers access */ struct sdw_amd_res { + u32 acp_rev; u32 addr; u32 reg_range; u32 link_mask; From patchwork Tue Sep 24 08:18:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 830334 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 B60C8CF9C77 for ; Tue, 24 Sep 2024 08:20:33 +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 0B5CBB76; Tue, 24 Sep 2024 10:20:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0B5CBB76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1727166032; bh=qL0BXQOHIHCvBYPLh/gVB1hbC/9Bfvfo6V+DOAEzz0I=; 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=bjkniPRZILkTIxCb/Cxe+6yhhOLGv+9iQIWk5AvE0IRKX3ej47ukniD3jAhjatDh5 g6HF126QazdG0uHw84sdigvxg+LWTGdPVoXzwJD8xmLaAmnLfQMjQJdh1qjwfiESB7 fFR6vgrNLWT6WhJBIRpElKMoPiW0SA9NkyJu1kV8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id EE0ABF80609; Tue, 24 Sep 2024 10:19:39 +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 11ED6F805FC; Tue, 24 Sep 2024 10:19:39 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D9019F805B5; Tue, 24 Sep 2024 10:19:29 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2061b.outbound.protection.outlook.com [IPv6:2a01:111:f403:2418::61b]) (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 70545F802DB for ; Tue, 24 Sep 2024 10:19:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 70545F802DB Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=y0kdZsfd ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AvGejSGc9E8Xhhox48Bu3VQ76jryqFxaC3z0zhxX93Y7MTd/Z1zsStZEV98GLSAS36EDKjUqni80bx7BdXI3QJLOnabIQihXOF994buUhVV/XEnLeSQdoLsgKGsWsWVJsV5da5JkXHsLqljpkDKrLroGQFO1GY8b2Zd6PeiAvE/15YVUOOlchExjizbcr7SwtSJ0tiJq4ltVoTty7hXhy/Vv9Qtji9tF+TRITH6D7+2wI/nj5EiUadju8s3Y+MYTBKWym/tph/l9elrH9PTRoLvRTstPjX/hifXXgPcJDQ9jOkHgV1nWjNw01ac0i3aIXf2mXy+z9D8ejlfCkvDbLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KuRqpROnAfGh1YRWcQlhomQXZ2b5iEdA8vMR+xTjuSs=; b=wJ5UOckyx1xg/b11YdvxYglEUgGlSfG2h69F5QgaeCmvWXiAwefViyky60lbVWsKC1Y5T+c62VAIgHk2v7HZFOVXwmxA70Nh8OQsXT1dSo+x2Tr2ox50qwJ6SySkHQd+sTVnCUSi8CMlkJ4/GQ5eIk+jeTFXuCldPBRMxKsvmtbEpX/iDVMnwcJxh/yxsHag1NMepmLtmppBxuxBaGboZ7cWSD8y1+0e/+lICC3ogdUel/SNd5/kSd6SYcqhRC3aEOxKeUFOVqqYvL1CenVS2mVmFxR0PGhWp0gJHIhzwuMtbwbeFiTFjbcJZISTbNUOvCcYh+ugBV/vZLLCPGqkNw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KuRqpROnAfGh1YRWcQlhomQXZ2b5iEdA8vMR+xTjuSs=; b=y0kdZsfdfwHN1UEPQv0dsKGT2+DyPbcxYr31Pa322J3z2qJIzaYCwoyBJXsLsFWUA/xzLRgBGr5JwxjaQ7DLaf05QdjIN4zVUCNHHmD3GChtOI2Kh30+AvL41W3fSRJUfAR61KJm48K1g2CxaBeQRtx2fv2QZXMxkaYcP6n8vKA= Received: from QR2P297CA0015.MEXP297.PROD.OUTLOOK.COM (2603:10b6:3d0:6a::17) by CYXPR12MB9442.namprd12.prod.outlook.com (2603:10b6:930:e3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.26; Tue, 24 Sep 2024 08:19:16 +0000 Received: from DS3PEPF000099D8.namprd04.prod.outlook.com (2603:10b6:3d0:6a:cafe::a0) by QR2P297CA0015.outlook.office365.com (2603:10b6:3d0:6a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27 via Frontend Transport; Tue, 24 Sep 2024 08:19:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS3PEPF000099D8.mail.protection.outlook.com (10.167.17.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Tue, 24 Sep 2024 08:19:15 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 03:19:08 -0500 From: Vijendar Mukunda To: , CC: , , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 2/4] soundwire: amd: refactor existing code for acp 6.3 platform Date: Tue, 24 Sep 2024 13:48:44 +0530 Message-ID: <20240924081846.1834612-3-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924081846.1834612-1-Vijendar.Mukunda@amd.com> References: <20240924081846.1834612-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099D8:EE_|CYXPR12MB9442:EE_ X-MS-Office365-Filtering-Correlation-Id: 34f3e0fd-5dc8-4c97-f5c1-08dcdc71941a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|7416014|376014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: 8p8XfKDpw4n+HaQki8KH9eNaZ/6vGHORyqdfTXWFQjscf9insB7USFsepxvSEZJZ5gtEmMIRVmkkh3m/GXthh88rNaeorUlF2AhEyIRocccdOFqKCpVTTiTF1Sfjbz3SubLb3YXzJJiYvlM4BmkeGNiqnP2vytzCUqe1PIbNgrTp1ik12ulHNwvdB7JlEb0M3YGz9HWWoljr/mdRo7rWE0cU9xpbUqC6f+z9FOlwnlmbPImlkUeZzDxZUyyuOIhhkBA3A/n788G1vdIUgw+xvNF5ScrNiE0UsHXBs/4l4pKgm+yWz6ftj0nkDd5Y5pfcm6WMM+KewOh7fQ/Cr64Z7qFiymFIdl7Ud/CqYoya6Kh60JJEzL9nbhRuWk3k0qKLZGYBUpSLz9AJqWHoVb6LgmLETKyGYizfXg4xl9duAdhO2lD8xjOxNVECBBLbbtc3wXjtW5qS1s0nCrDaGL6Qif4I5IbMagN61lLBgXHnDvIRBZrwp52LgyGgZ7zswJD9jXwuYwIBBUYsPDUo7Pj0QJ83AVk3lanS5AI/DKwjoGsr1Ldz2bJUSqK4xmyXDU1k1mYDN/khiTNDx5HEThdl0gOLWokkSFapHDUu9IrlGVU4VrMFJNmxHWPrp6bZh/aI7gAReWyMOQH0Tvsscao+KTjOvN4bvdJcMvYELPb+lYLMZwOkrdVNUOf91zibGF9drSLbSkiIZgEHduWMUO2wjzSpEA1jony3QOkyOdMBfrz29NOUCD0ayOFjPYO4ezRuVICCzqADu56tUhKXIZe4+dpu4kuD2Vkgd0h+fVq61SvEsw5pEWzNbBSJcaWXRD19G32vKLexj/NVuIADT+X0ql1NDTlmehF6LzK67dZNKYX7mnRwJAi48PmU2D/LN8Y6XuPaNwHv9XeCuwMJZgWu9Xgr0h4n4G50ViBGpZ6+uDyQo43pKxBti2P6NtR7jyLDTN4tKz3NHGV0oYtGqOclt1kC1t03mQttBJp8X3XESZ6xUVDj2+4PdIVBKQESr1faBH+mBXoSIZ9eQyxxNvQLGfHw35IyJ86SXo25f+ss5mg8GUUmR3RIk7aQfgZtNaOYYo/uIZksCHbJsC76w2Qd7VDn3Xto95lJx6ciGvkQj2FnbCSFMph8ONQG+AOnVfXi0Jmn9QH+70dzjBD+DIbIcBnedmufs8fYeFIwFhuLWOMGjJlOqsUcVCdNDq55TtJ5+jca75ZZv1aM57Ry9rXM26VE4uWeB9TlXMplcaGZZ5dvleloB5jfZ+iaXtAw4Uu3nJc2o0ZaD9SAz13GmxxqoiPJWgutu44I9l4H57xd2QGyyg2Pic7Di0dpYHiEWXqFozpRfrSf+bxZqB5VUsHVLI0MoOOgVxT6tQudl5kUdr//JIyDYYaoS32wAk97vl5/kxuGVyObPdZ73NHUYoKXSWwpA+QNFFGpt+3CHUN69YQJmfJE8OEybznQdnPNj0WQ X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(7416014)(376014)(1800799024)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 08:19:15.2884 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 34f3e0fd-5dc8-4c97-f5c1-08dcdc71941a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099D8.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR12MB9442 Message-ID-Hash: YQK6OXGJNIZISOM6N5PXCTOXQVAJP2PY X-Message-ID-Hash: YQK6OXGJNIZISOM6N5PXCTOXQVAJP2PY X-MailFrom: Vijendar.Mukunda@amd.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.9 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: Refactor existing code by adding acp pci revision id coditional checks for ACP 6.3 platform. Rename the macros and structure names with ACP63 tag. Signed-off-by: Vijendar Mukunda --- drivers/soundwire/amd_manager.c | 98 ++++++++++++++++++++----------- drivers/soundwire/amd_manager.h | 16 ++--- include/linux/soundwire/sdw_amd.h | 1 + 3 files changed, 72 insertions(+), 43 deletions(-) diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c index 4a1966fb01f6..5a4bfaef65fb 100644 --- a/drivers/soundwire/amd_manager.c +++ b/drivers/soundwire/amd_manager.c @@ -433,12 +433,18 @@ static int amd_sdw_port_params(struct sdw_bus *bus, struct sdw_port_params *p_pa u32 frame_fmt_reg, dpn_frame_fmt; dev_dbg(amd_manager->dev, "p_params->num:0x%x\n", p_params->num); - switch (amd_manager->instance) { - case ACP_SDW0: - frame_fmt_reg = sdw0_manager_dp_reg[p_params->num].frame_fmt_reg; - break; - case ACP_SDW1: - frame_fmt_reg = sdw1_manager_dp_reg[p_params->num].frame_fmt_reg; + switch (amd_manager->acp_rev) { + case ACP63_PCI_REV_ID: + switch (amd_manager->instance) { + case ACP_SDW0: + frame_fmt_reg = acp63_sdw0_dp_reg[p_params->num].frame_fmt_reg; + break; + case ACP_SDW1: + frame_fmt_reg = acp63_sdw1_dp_reg[p_params->num].frame_fmt_reg; + break; + default: + return -EINVAL; + } break; default: return -EINVAL; @@ -465,20 +471,28 @@ static int amd_sdw_transport_params(struct sdw_bus *bus, u32 frame_fmt_reg, sample_int_reg, hctrl_dp0_reg; u32 offset_reg, lane_ctrl_ch_en_reg; - switch (amd_manager->instance) { - case ACP_SDW0: - frame_fmt_reg = sdw0_manager_dp_reg[params->port_num].frame_fmt_reg; - sample_int_reg = sdw0_manager_dp_reg[params->port_num].sample_int_reg; - hctrl_dp0_reg = sdw0_manager_dp_reg[params->port_num].hctrl_dp0_reg; - offset_reg = sdw0_manager_dp_reg[params->port_num].offset_reg; - lane_ctrl_ch_en_reg = sdw0_manager_dp_reg[params->port_num].lane_ctrl_ch_en_reg; - break; - case ACP_SDW1: - frame_fmt_reg = sdw1_manager_dp_reg[params->port_num].frame_fmt_reg; - sample_int_reg = sdw1_manager_dp_reg[params->port_num].sample_int_reg; - hctrl_dp0_reg = sdw1_manager_dp_reg[params->port_num].hctrl_dp0_reg; - offset_reg = sdw1_manager_dp_reg[params->port_num].offset_reg; - lane_ctrl_ch_en_reg = sdw1_manager_dp_reg[params->port_num].lane_ctrl_ch_en_reg; + switch (amd_manager->acp_rev) { + case ACP63_PCI_REV_ID: + switch (amd_manager->instance) { + case ACP_SDW0: + frame_fmt_reg = acp63_sdw0_dp_reg[params->port_num].frame_fmt_reg; + sample_int_reg = acp63_sdw0_dp_reg[params->port_num].sample_int_reg; + hctrl_dp0_reg = acp63_sdw0_dp_reg[params->port_num].hctrl_dp0_reg; + offset_reg = acp63_sdw0_dp_reg[params->port_num].offset_reg; + lane_ctrl_ch_en_reg = + acp63_sdw0_dp_reg[params->port_num].lane_ctrl_ch_en_reg; + break; + case ACP_SDW1: + frame_fmt_reg = acp63_sdw1_dp_reg[params->port_num].frame_fmt_reg; + sample_int_reg = acp63_sdw1_dp_reg[params->port_num].sample_int_reg; + hctrl_dp0_reg = acp63_sdw1_dp_reg[params->port_num].hctrl_dp0_reg; + offset_reg = acp63_sdw1_dp_reg[params->port_num].offset_reg; + lane_ctrl_ch_en_reg = + acp63_sdw1_dp_reg[params->port_num].lane_ctrl_ch_en_reg; + break; + default: + return -EINVAL; + } break; default: return -EINVAL; @@ -520,12 +534,20 @@ static int amd_sdw_port_enable(struct sdw_bus *bus, u32 dpn_ch_enable; u32 lane_ctrl_ch_en_reg; - switch (amd_manager->instance) { - case ACP_SDW0: - lane_ctrl_ch_en_reg = sdw0_manager_dp_reg[enable_ch->port_num].lane_ctrl_ch_en_reg; - break; - case ACP_SDW1: - lane_ctrl_ch_en_reg = sdw1_manager_dp_reg[enable_ch->port_num].lane_ctrl_ch_en_reg; + switch (amd_manager->acp_rev) { + case ACP63_PCI_REV_ID: + switch (amd_manager->instance) { + case ACP_SDW0: + lane_ctrl_ch_en_reg = + acp63_sdw0_dp_reg[enable_ch->port_num].lane_ctrl_ch_en_reg; + break; + case ACP_SDW1: + lane_ctrl_ch_en_reg = + acp63_sdw1_dp_reg[enable_ch->port_num].lane_ctrl_ch_en_reg; + break; + default: + return -EINVAL; + } break; default: return -EINVAL; @@ -927,15 +949,21 @@ static int amd_sdw_manager_probe(struct platform_device *pdev) * information. */ amd_manager->bus.controller_id = 0; - - switch (amd_manager->instance) { - case ACP_SDW0: - amd_manager->num_dout_ports = AMD_SDW0_MAX_TX_PORTS; - amd_manager->num_din_ports = AMD_SDW0_MAX_RX_PORTS; - break; - case ACP_SDW1: - amd_manager->num_dout_ports = AMD_SDW1_MAX_TX_PORTS; - amd_manager->num_din_ports = AMD_SDW1_MAX_RX_PORTS; + dev_dbg(dev, "acp_rev:0x%x\n", amd_manager->acp_rev); + switch (amd_manager->acp_rev) { + case ACP63_PCI_REV_ID: + switch (amd_manager->instance) { + case ACP_SDW0: + amd_manager->num_dout_ports = AMD_ACP63_SDW0_MAX_TX_PORTS; + amd_manager->num_din_ports = AMD_ACP63_SDW0_MAX_RX_PORTS; + break; + case ACP_SDW1: + amd_manager->num_dout_ports = AMD_ACP63_SDW1_MAX_TX_PORTS; + amd_manager->num_din_ports = AMD_ACP63_SDW1_MAX_RX_PORTS; + break; + default: + return -EINVAL; + } break; default: return -EINVAL; diff --git a/drivers/soundwire/amd_manager.h b/drivers/soundwire/amd_manager.h index 707065468e05..cc2170e4521e 100644 --- a/drivers/soundwire/amd_manager.h +++ b/drivers/soundwire/amd_manager.h @@ -155,12 +155,12 @@ #define AMD_SDW_IRQ_MASK_8TO11 0x000c7777 #define AMD_SDW_IRQ_ERROR_MASK 0xff #define AMD_SDW_MAX_FREQ_NUM 1 -#define AMD_SDW0_MAX_TX_PORTS 3 -#define AMD_SDW0_MAX_RX_PORTS 3 -#define AMD_SDW1_MAX_TX_PORTS 1 -#define AMD_SDW1_MAX_RX_PORTS 1 -#define AMD_SDW0_MAX_DAI 6 -#define AMD_SDW1_MAX_DAI 2 +#define AMD_ACP63_SDW0_MAX_TX_PORTS 3 +#define AMD_ACP63_SDW0_MAX_RX_PORTS 3 +#define AMD_ACP63_SDW1_MAX_TX_PORTS 1 +#define AMD_ACP63_SDW1_MAX_RX_PORTS 1 +#define AMD_ACP63_SDW0_MAX_DAI 6 +#define AMD_ACP63_SDW1_MAX_DAI 2 #define AMD_SDW_SLAVE_0_ATTACHED 5 #define AMD_SDW_SSP_COUNTER_VAL 3 @@ -222,7 +222,7 @@ struct sdw_manager_dp_reg { * in SoundWire DMA driver. */ -static struct sdw_manager_dp_reg sdw0_manager_dp_reg[AMD_SDW0_MAX_DAI] = { +static struct sdw_manager_dp_reg acp63_sdw0_dp_reg[AMD_ACP63_SDW0_MAX_DAI] = { {ACP_SW_AUDIO0_TX_FRAME_FORMAT, ACP_SW_AUDIO0_TX_SAMPLEINTERVAL, ACP_SW_AUDIO0_TX_HCTRL_DP0, ACP_SW_AUDIO0_TX_OFFSET_DP0, ACP_SW_AUDIO0_TX_CHANNEL_ENABLE_DP0}, {ACP_SW_AUDIO1_TX_FRAME_FORMAT, ACP_SW_AUDIO1_TX_SAMPLEINTERVAL, ACP_SW_AUDIO1_TX_HCTRL, @@ -237,7 +237,7 @@ static struct sdw_manager_dp_reg sdw0_manager_dp_reg[AMD_SDW0_MAX_DAI] = { ACP_SW_AUDIO2_RX_OFFSET, ACP_SW_AUDIO2_RX_CHANNEL_ENABLE_DP0}, }; -static struct sdw_manager_dp_reg sdw1_manager_dp_reg[AMD_SDW1_MAX_DAI] = { +static struct sdw_manager_dp_reg acp63_sdw1_dp_reg[AMD_ACP63_SDW1_MAX_DAI] = { {ACP_SW_AUDIO1_TX_FRAME_FORMAT, ACP_SW_AUDIO1_TX_SAMPLEINTERVAL, ACP_SW_AUDIO1_TX_HCTRL, ACP_SW_AUDIO1_TX_OFFSET, ACP_SW_AUDIO1_TX_CHANNEL_ENABLE_DP0}, {ACP_SW_AUDIO1_RX_FRAME_FORMAT, ACP_SW_AUDIO1_RX_SAMPLEINTERVAL, ACP_SW_AUDIO1_RX_HCTRL, diff --git a/include/linux/soundwire/sdw_amd.h b/include/linux/soundwire/sdw_amd.h index e0abc59d4748..c9586f22c5a9 100644 --- a/include/linux/soundwire/sdw_amd.h +++ b/include/linux/soundwire/sdw_amd.h @@ -27,6 +27,7 @@ #define ACP_SDW0 0 #define ACP_SDW1 1 #define AMD_SDW_MAX_MANAGER_COUNT 2 +#define ACP63_PCI_REV_ID 0x63 struct acp_sdw_pdata { u16 instance; From patchwork Tue Sep 24 08:18:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 830799 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 55487CF9C71 for ; Tue, 24 Sep 2024 08:20:53 +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 875E1850; Tue, 24 Sep 2024 10:20:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 875E1850 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1727166051; bh=rY4ngI+GB6mgNB4IkVT/PhXHud9PWrFarjdHcYT9g+s=; 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=EPvn6Imh9QbQqtM0q5XFE02+vXDxy0NOfNJlAamAIajTxTW8P3ojpSOvfqROfDHAJ Pmc0HOlPb7Do3SxOnhoKL/J9BkvQahG6nW9Qmr5Qk6x23yEL4Y2OGXIVLo70ZQq21/ UzUNygsofkp2JHmHu1aKl0t9rO+iDQQSyXX1sOZY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9BB13F8061D; Tue, 24 Sep 2024 10:19:43 +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 58702F8061D; Tue, 24 Sep 2024 10:19:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A0307F805C0; Tue, 24 Sep 2024 10:19:31 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on20607.outbound.protection.outlook.com [IPv6:2a01:111:f403:2416::607]) (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 271ACF805B6 for ; Tue, 24 Sep 2024 10:19:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 271ACF805B6 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=pUZskNLq ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=w+qoYIar4qQPXgFDOBxpmQg/gSKL1crbiqrUh7N2pJwllgjV4CAXAYzQdbOzx9V1W5C+1k9ztXmL2+c4OWwbXb+t4FErK3sbxdDTOYAdJY0HBr5RZjB9MuV382CGZGj3hmGwT/+fLSaqXu0+4zw3OJ06T7NReFcKs30whRwb1NuSkpHIDbqnLEX2hgNsrAoBjlaa4qp0KDJPhMTfGNsSSDzT5qxvouTlWt/aEZfXYSqVRMQFT86PxFxIHu92fICUYkzfodXhCvA774C8BaEuf1iNziMvKi+YNcvq5d0Uy/5hnESwJ6AtIez3Erd/nSjyylxJIpX39uAOgn+Hp1RxqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZVL7VGhErvgxR0UACqZHPVop1/A7+hCczZH5GBBrAak=; b=Ydm64BVC70lEHBcdnuDLIhrEjYgFAe5zxhJ9lVqOhujfuIDb7qe2t0BiEYWqLPrwP8FtbLnQj6iENrdJa+cBvB05l7o2N2dahpOREm+ULU+gCN2tM0vFtRKWAutqLvJqkUp7HJxg2mUTUSqy3kv7n7Mqg03u071iN7VVqaQ/xo7cK1fjZGGvQhOxfy+aiUvRwpcxjrevFcYEHm+arU56FU1ZASjDllWIAHIrrfnaA6MD7fkfuaZ9AtMasDWYph8aXYF6bIdVvVKdneAcUxPSXl5byCe+IDuorhOcEBE/zB+REFhpb0QqxFI4LZgRbJWHrC1pKNg2ZnEMhijB5+WB7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZVL7VGhErvgxR0UACqZHPVop1/A7+hCczZH5GBBrAak=; b=pUZskNLqg1RlB0sddggUkDBAZxIt4c2C7lRLIuYCBwrJjgnybB0kflR/mR7z/fQODtXfPHFtqrG1T45ozooxIWnYMoGqQdJrQEcp/88TeWldUYgt6FEA0cqBleQ+M6ykZku8KRWrCo0yHgjx3gEnimMc5anwq3kH1gIkPsIdGDk= Received: from QR2P297CA0013.MEXP297.PROD.OUTLOOK.COM (2603:10b6:3d0:6a::10) by IA0PR12MB9047.namprd12.prod.outlook.com (2603:10b6:208:402::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 08:19:19 +0000 Received: from DS3PEPF000099D8.namprd04.prod.outlook.com (2603:10b6:3d0:6a:cafe::3c) by QR2P297CA0013.outlook.office365.com (2603:10b6:3d0:6a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27 via Frontend Transport; Tue, 24 Sep 2024 08:19:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS3PEPF000099D8.mail.protection.outlook.com (10.167.17.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Tue, 24 Sep 2024 08:19:18 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 03:19:13 -0500 From: Vijendar Mukunda To: , CC: , , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 3/4] ASoC: SOF: amd: pass acp_rev as soundwire resource data Date: Tue, 24 Sep 2024 13:48:45 +0530 Message-ID: <20240924081846.1834612-4-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924081846.1834612-1-Vijendar.Mukunda@amd.com> References: <20240924081846.1834612-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099D8:EE_|IA0PR12MB9047:EE_ X-MS-Office365-Filtering-Correlation-Id: e9dc7e8e-ea0e-4e47-a4cf-08dcdc71960f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|7416014|376014|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: +rNqI6c9lVDKz6ZZ3RDcfrhdYOCTo0cqD+XYDtkdbcGLlKbZVZQcMA6C3ZzcjB9Vel7UBMimnvoJ4kJPQtcZXZeuz2weLbQoGbm69PlffY92W4KVcYjJxI397RdBf3G2fuBr3IlrMkN5eHGL7WtNH3yZTMh9r720OfHvel+0meVZ9OSrwLfmksWznSjzjJVEcpk13zQtaSaG4N7zg6+Sh7YARvl+yu+FiHBZfaerAii4FOK1N8dCxr+x4pOXI9bWRCQXVVpz7/k/k2iYzMvR26QTjU9nxY+x5FebTuuUOx1RevMdsHaU+re8Knma5pM/SWR/F87MeELzpOeu/nZd8g0VxAXs09mW1di5x5Qn9qTsj6YaRPtBRhqXz7GU+Jzf2IngFzzopEjtw3UHZ5yxdhnQX0aEqH6abImqcar+nDBDhUEvZyeCws/OT3RI/qg4eX0WDcVU+an6XrF7YtnK35T7o2GAo/8mg2KIy1JQEkfytdQZn4MQANYenoX4GYDQwN8s9vIjIGXd0FIekH/9SudMaqGgn3bZ7Png2dx0XfLsf8jMZNelFKi4edg4t95a0x3tbgGoDnVp48GXciNz9lOQPl0to64ecu9mZt0jeSCbYQS0a0oz1YJbv7D5r1R3CidSmpodkjLEUGi3AeE0Krj7R7tn+v/BXGbnzt3VJslt+HWChn2X3A6cV6aYKMjnQoF8ioTeKjxvPOjBBKrPVjDsiySb733n+0ZAhML2HOR2kXKVHLVtUo7CiuPXrYdBo545Nm1rj9GTf28xYBGTK7CtADZVJu2sSyXdnHZyn2Xtk5UiZMkQDq6KOWAm08trfSBwxOx4dcAJcMw5opGVVkSmFR0uGlnWCQtJgyaE+pBiDruMkCP25PCp/wiUmY/cF+vzmkrhOv0DNc6lWZ94PVYCTd02FYuRDYeZLfCBRTGWwfeggqnVEO87VYUzhgXagZcR764IGwOdNyP/Hpp7L50lmqpHzmViaNLmbLlpA+s4T16JHhtuaWJ2+0WwBfr3ffRmQO18kv0Wp/xjmwnkIWdEdj4XOquZkgxSAoxHtWlc0+iyTZca1e9bRBy+WT3Zyh0E+9GfrnIgVLuOS91wV1xz3i+uLs+BPm9NGwE24DlC08rO3zRvgyoenXHDyB681vbV+s8RGhXpRn6UbrsQnOI4cETa1jZEFnoE1GBCVFCCeqNvhEyzm1qN6AWe3UtCjFuVp6klTSuZmO+QbW8mrxAIzSXtEE14JRLKzegJdnraachVZWvXzPNzV6olK7myLAhKb3eZJBuN4RclaNBZdN94D9b40lvJ/z9D72lzMO/m1i9l2CUjTKNxsXJtdraAy9Iwv/OWVSXzFKnL2jS5DbrEZsWZHy7fb1Fcsz+LF1o= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(7416014)(376014)(36860700013)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 08:19:18.5696 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9dc7e8e-ea0e-4e47-a4cf-08dcdc71960f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099D8.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB9047 Message-ID-Hash: WHIHBGMFXHJLU42JGGJYZYIRT3V2K6DA X-Message-ID-Hash: WHIHBGMFXHJLU42JGGJYZYIRT3V2K6DA X-MailFrom: Vijendar.Mukunda@amd.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.9 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: Pass acp_rev(ACP pci revision id) as soundwire resource data for SoundWire controller probe function. Signed-off-by: Vijendar Mukunda --- sound/soc/sof/amd/acp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c index d579c3849392..f967e8498798 100644 --- a/sound/soc/sof/amd/acp.c +++ b/sound/soc/sof/amd/acp.c @@ -683,6 +683,7 @@ static int amd_sof_sdw_probe(struct snd_sof_dev *sdev) sdw_res.count = acp_data->info.count; sdw_res.link_mask = acp_data->info.link_mask; sdw_res.mmio_base = sdev->bar[ACP_DSP_BAR]; + sdw_res.acp_rev = acp_data->pci_rev; ret = sdw_amd_probe(&sdw_res, &acp_data->sdw); if (ret) From patchwork Tue Sep 24 08:18:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 830333 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 04280CF9C71 for ; Tue, 24 Sep 2024 08:21:07 +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 E2AA6DF9; Tue, 24 Sep 2024 10:20:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E2AA6DF9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1727166064; bh=cDXdtJKNEBqO3/or1G8DkQjgnZNHsQ+/7sDW2RCEbAE=; 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=FWMo8UFlSj2oKWH5Peow3beJeWM3ppj75QM+jvghVo8QJwBkGoCY0I1jrb9XVm7cz iihv4Afn1sdgrvpqYNafRMCSGhjtKJl22lLeromrXNniHydnTDWRQTQPbK+6JWYwm9 pflK9o7FB8JlofQw9W7yQ+swk+nd+FcCHWsZg9Sc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 022C3F80659; Tue, 24 Sep 2024 10:19:46 +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 B81A5F8061C; Tue, 24 Sep 2024 10:19:45 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3CF15F805EA; Tue, 24 Sep 2024 10:19:36 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2060f.outbound.protection.outlook.com [IPv6:2a01:111:f403:2416::60f]) (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 07AEDF802DB for ; Tue, 24 Sep 2024 10:19:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 07AEDF802DB Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=zeEuSYYy ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PQnDB4MzY+dvIyyC5SaB1uYuvYkDJj/cBYhAkytDmlPEY92IK14hMIPZaNGRmCEVqc9ZTwV9JPEEmqJCtWKD450oXMJcjGNrePxOkLXsiLIaJfMUMWps7q96Frh7QVLWPLetYSz3Lu4RDrzNKxG9GOzlffLkgrxyhjaoFAolK2ROjqJD483sDO2Sb3vz+f0sniTcpYuYEmhnyMELcGpL8AoiUOPxPzaLICrKpSdfw0SnT573FWl6eGv/rYAwLQQgwrXzacKxjorHJ/avaL+mrl7Bz1IqYoG+85Z6nQy73G0Tt6XR3cthAJfdaO0uuxammjYvITZiNjCmSNZXPMFqNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VKy9wUhG3WaIs92o7Z0M5iYudKb8D/yEP3pJH3z3TcQ=; b=CTy5NQ5oMyL1L0l+xTWwSNMW+bfqJ1v8QxkFaSpTyQwdkuNsYqZ6GQzDmfebakqdzDI7c7XFnmior4pstR8MIE/l7fV4GOFSwcoUCa4SifrhzDXBxpLEM4stVH68XslGEslKAX8zQU82e3f9UVomwaK/qyqwh7SuK0toLGeaxCWtCIblNZx1v0FnxD9qwux+hiHSvFTsUYGes5aTJlWuovADHSpo4UUobGzUe6RLnXohsQZmI1ECgcjEv4QR0k+JAC4XzQ5kLIq5eK/J6/thezWx7LhzMfp7hqmKtaw2IxN0fU3idZJknd3GxMRkSWlMD2glqTgE4d6KciMN64O4YQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VKy9wUhG3WaIs92o7Z0M5iYudKb8D/yEP3pJH3z3TcQ=; b=zeEuSYYyZqeNDck+3H4ZbziaRh2+CsVOl9t+ntxUM2oVZsOqfVDFZmTvJZy0jwVJ2cXTDlrqk7eC6hfxZuWXK32TlspVcfqiG+Ttiti2Vx8zxBFrS8pgZMjWJZG+H1y8+KtP2Gu17emIkfN2as7Stam42+7DXLAmV8nR1WOnIAw= Received: from DS7PR03CA0100.namprd03.prod.outlook.com (2603:10b6:5:3b7::15) by IA1PR12MB6484.namprd12.prod.outlook.com (2603:10b6:208:3a7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 08:19:25 +0000 Received: from DS3PEPF000099D3.namprd04.prod.outlook.com (2603:10b6:5:3b7:cafe::f8) by DS7PR03CA0100.outlook.office365.com (2603:10b6:5:3b7::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.17 via Frontend Transport; Tue, 24 Sep 2024 08:19:24 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS3PEPF000099D3.mail.protection.outlook.com (10.167.17.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8005.15 via Frontend Transport; Tue, 24 Sep 2024 08:19:24 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 03:19:18 -0500 From: Vijendar Mukunda To: , CC: , , , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 4/4] ASoC: amd: ps: pass acp pci revision id as soundwire resource data Date: Tue, 24 Sep 2024 13:48:46 +0530 Message-ID: <20240924081846.1834612-5-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924081846.1834612-1-Vijendar.Mukunda@amd.com> References: <20240924081846.1834612-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099D3:EE_|IA1PR12MB6484:EE_ X-MS-Office365-Filtering-Correlation-Id: d3793c00-c10f-499c-1c90-08dcdc71999c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|7416014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: nCphI8Uum9P72+4AntUpTsq6TmY+2TpPFDyJJ6aQdP/toZX8HeVN8k3GkO9Ryfr+r/IzymSjGENaUUf/hH2nhcaqZNAiVL2fLZIYEMR4VcaYMu2Sno/bGvbEG217+6TOVEwLBmGXR3ZiwW8J9T0oSLhds9wXySLYoQlZoP2fj8P2TLOMwRZouRarpZzyIu8+6RTgWxqKniUZwPc4p75fg3cz9QO4thGIIyJdebualex43FoyBudrRvmMo8VGVz0gwXmZMdYD+Nm3EPrm/+fwyqd/mOmAN2jFmBQ+FIz7yxP4p6abZWIwkMWqJPO9rJPa4btJ6ND6AmUZT25AuLOIO9hiUCpVHJyu71WHHD0yxgg0m/yWLkkHJuvRCfnFbGsr9zJ06/6yKUh622HzNKKZmU0RIXqPV+K5RzCpKbuLtPM54n8LCYQdM/zhE59PrxA00jn+vMQbLODRl3fdQe4UqWVWOjCUg76fapA3A3LriTPJKo06BaKEXV1fSQAWw4VkLyVqMIDBigmjKFd0pAK2SYIZY6FLQoB3XygqGMCApUDn5GICQF0czrGcjjxMqk+uPqrib7f9iAG6N1uoaAt2cR1151/a8uoGLJ9IxATXu0yXdxKVsRkGYq/sKmtdTxfCth1NK9l3CVZjAywWtjMNfDtbZErZDB6UHAwWSJPPP0kUrcsrTblZrmdQwS6CxDiwlL2p9eb53Lnvavfwzo1L5RWrBsaWadoCtwWaxfMOfX9I5sJ7luRroK1DyFcEcwcT/LkvdFTxAd7KjS6wVl+hRLO233VZI+HiveIE+qrLyp83s/kWwj804sCLOIz+8EB4r5Cglb7+uaqAsK46yiEPkjaHJSZtOs4M820o5Jv20vVeqMvNyuZDI366TtRAa2aZEUq0a1BnJxm8G9LeahxDqt9CjM2nARXjN949/LFxP07ypXwu/sWsGBPd/z2fOctr/N13quPmzpgSHI1p/Q2b1wZYkxicaMqISvsWMjhW+jxKwicuOzOfTUPfZ9C121/ycdI/az06xTzXvfJX3LuQwZiSy4AwFnPlymnnpxwn1hKVZZa1lPgzBabFFUGgqlDJiO8MvkjjtT23wyt5zH9MFqAEAjx9pTYetC1qAMeN38TRm6vAJYyewKr+t2bOB7ZRYKEfnZ3/YBQfRZtVWn2qIfjyhL7C1Ow4KynK72vY9CzL8/5V5jBq3+7jTEaBEtTIP9bWxBq2WLow6xmMaLgBgZ3LMAoteMIYhx1AEoGHW9DVltT+M95HZkIgcvLP9ILTNdkwHBHrSfpoDhOf36unfkL6kOfcZBlQlT5N3Cpp4eQslapbYu/M6kQ7m5iH0ig3uuO+lxV9jwn+VcYi2oIQGe8Vvn6RnQ0+cOmkfNhtTrfhC7BhVgFxqxKETuMUHTniWwvPjwR2nAEs/fc1MjID5UobdZtY1cBQPRM6LUfsonf/ds6hZ05yEKk7IBGAumSx X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(376014)(7416014)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 08:19:24.5390 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d3793c00-c10f-499c-1c90-08dcdc71999c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099D3.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6484 Message-ID-Hash: RVIKC5WLL5P34CEX76YWQVNQN4ATF4CR X-Message-ID-Hash: RVIKC5WLL5P34CEX76YWQVNQN4ATF4CR X-MailFrom: Vijendar.Mukunda@amd.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.9 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: Add acp_rev as structure member in acp pci driver private data structure to store acp pci revision id and assign this variable to SoundWire resource data acp_rev variable. Signed-off-by: Vijendar Mukunda Acked-by: Mark Brown --- sound/soc/amd/ps/acp63.h | 2 ++ sound/soc/amd/ps/pci-ps.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sound/soc/amd/ps/acp63.h b/sound/soc/amd/ps/acp63.h index 39208305dd6c..e54eabaa4d3e 100644 --- a/sound/soc/amd/ps/acp63.h +++ b/sound/soc/amd/ps/acp63.h @@ -231,6 +231,7 @@ struct sdw_dma_ring_buf_reg { * @sdw_en_stat: flag set to true when any one of the SoundWire manager instance is enabled * @addr: pci ioremap address * @reg_range: ACP reigister range + * @acp_rev: ACP PCI revision id * @sdw0-dma_intr_stat: DMA interrupt status array for SoundWire manager-SW0 instance * @sdw_dma_intr_stat: DMA interrupt status array for SoundWire manager-SW1 instance */ @@ -254,6 +255,7 @@ struct acp63_dev_data { bool sdw_en_stat; u32 addr; u32 reg_range; + u32 acp_rev; u16 sdw0_dma_intr_stat[ACP63_SDW0_DMA_MAX_STREAMS]; u16 sdw1_dma_intr_stat[ACP63_SDW1_DMA_MAX_STREAMS]; }; diff --git a/sound/soc/amd/ps/pci-ps.c b/sound/soc/amd/ps/pci-ps.c index c72d666d51bd..0c3bb1da5097 100644 --- a/sound/soc/amd/ps/pci-ps.c +++ b/sound/soc/amd/ps/pci-ps.c @@ -267,6 +267,7 @@ static int amd_sdw_probe(struct device *dev) sdw_res.acp_lock = &acp_data->acp_lock; sdw_res.count = acp_data->info.count; sdw_res.mmio_base = acp_data->acp63_base; + sdw_res.acp_rev = acp_data->acp_rev; sdw_res.link_mask = acp_data->info.link_mask; ret = sdw_amd_probe(&sdw_res, &acp_data->sdw); if (ret) @@ -576,6 +577,7 @@ static int snd_acp63_probe(struct pci_dev *pci, } adata->addr = addr; adata->reg_range = ACP63_REG_END - ACP63_REG_START; + adata->acp_rev = pci->revision; pci_set_master(pci); pci_set_drvdata(pci, adata); mutex_init(&adata->acp_lock);