From nobody Fri Nov 29 05:39:48 2024 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2072.outbound.protection.outlook.com [40.107.94.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFD6E14EC55; Tue, 24 Sep 2024 08:19:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.72 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727165956; cv=fail; b=jeGL3AseTXziwIfZ56rw8PwWwKILpIfNF+yVU8RP4pZ633QvL2wYxp09/DVltfaB84HSQisYfQYd2JiaZofeaEyRaepiHlTpmm1KaU/poux8EtAQJsYlW99xul5vCfZaTJf4/uwqbSeb1hQ2vhaj8P1Wh+U3gYcqp9zKR3nsDsQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727165956; c=relaxed/simple; bh=mzE7iqMcEkbq8lRzw0FHdpNXy2E3A5M/5RVzSJimwpY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=A0KveCDbGf5yCaihKMwFGp2o7rHxFv6LPco2QFdEr3tHvU7p7hdFFGqydKvyf1GOOk/oMn/7XE1G+HHC8RPFTYOV3+CaE8alLzIOXnrcaVH1yZs8U+iqL30GyY67reQRhSGdMLyeluklGWCUWHm8o0DTOt67IWvX89FalYntFZY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=mLyLYxKn; arc=fail smtp.client-ip=40.107.94.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: =?us-ascii?Q?ZGyAkDNAXZO5KS3sFnwIVLPl7NTUkwgqKQuZvaUzCJFiRB6WSvCXQbCJjeYo?= =?us-ascii?Q?ftPy7g/fhOKwewM2pNMVhtMVRFvnFziV/p5jvH1Vhq82f9kA8gF2WWmQXS99?= =?us-ascii?Q?ki+omlyofus9jTMFln7ilTP+gykddWMTFbcituf0kevdyX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7pWYkYnlA6MCMNhqsVaNST195ymOfPgB+HrT8?= =?us-ascii?Q?qmKhN08PWFxdRhPjywERvMgVJYMmMECE0QNnu62LBVPEAi18oGnusxDLvTVd?= =?us-ascii?Q?XAUoSXdvyvadzYjEasq6gt/5NCNV7hfDWseqy7VaBTP3QimaPpsfburJalkE?= =?us-ascii?Q?MP9u44DWcFk0Ir+LofzocBU099i3BO86u8eJxckH2fR/rrC9RlW+mknqTRo/?= =?us-ascii?Q?rwXfvEJ4EDzo5U2nucfiI4OshIwoV09zuuZbWSmQgXGf0/uxyuqKP9saerSZ?= =?us-ascii?Q?807qTb8+qz2bD8WdNIMnXoPH8wFoz0rOFE0pWp5CFZdmPjvVuj/XJ4FI5nLn?= =?us-ascii?Q?gS7cNt6v5YdNToCeYAwv90rduw3IJra9xgwYiU/3l35KUuWaq2S6xqvrxj6+?= =?us-ascii?Q?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 Content-Type: text/plain; charset="utf-8" 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(str= uct sdw_amd_res *res) =20 sdw_pdata[index].instance =3D index; sdw_pdata[index].acp_sdw_lock =3D res->acp_lock; + sdw_pdata[index].acp_rev =3D res->acp_rev; pdevinfo[index].name =3D "amd_sdw_manager"; pdevinfo[index].id =3D index; pdevinfo[index].parent =3D res->parent; diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manage= r.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 =3D amd_manager->acp_mmio + (amd_manager->instance * SDW_MANAGER_REG_OFFSET); amd_manager->acp_sdw_lock =3D pdata->acp_sdw_lock; + amd_manager->acp_rev =3D pdata->acp_rev; amd_manager->cols_index =3D sdw_find_col_index(AMD_SDW_DEFAULT_COLUMNS); amd_manager->rows_index =3D sdw_find_row_index(AMD_SDW_DEFAULT_ROWS); amd_manager->dev =3D dev; diff --git a/include/linux/soundwire/sdw_amd.h b/include/linux/soundwire/sd= w_amd.h index 28a4eb77717f..e0abc59d4748 100644 --- a/include/linux/soundwire/sdw_amd.h +++ b/include/linux/soundwire/sdw_amd.h @@ -30,6 +30,7 @@ =20 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; =20 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; --=20 2.34.1 From nobody Fri Nov 29 05:39:48 2024 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2063.outbound.protection.outlook.com [40.107.220.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38ED414BF9B; Tue, 24 Sep 2024 08:19:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.63 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727165962; cv=fail; b=UBvde2ukBsSM5g4u9APXR7Wy/4mlq3u1aZUEMVAPPdwq23Mz7bM+o8Ru2MFOpYfhXWIenxi3oRUhat3AEWGJxE+uDvZMYvYINwDtgXTEUSNb3ZX9PoEDpqexnciPabCfYMq8KakHkaJ2VZ2zc1LC7P/ShsBos4dYD4ifNm12Fv4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727165962; c=relaxed/simple; bh=qL0BXQOHIHCvBYPLh/gVB1hbC/9Bfvfo6V+DOAEzz0I=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NfnEiAIcnTiCZAzGcXMfWjknmW/8remjAn+42Sj6XJnodaAcHzS8SJib2vrup6/iPX0Zj3SHbY2d3YH5dOSKu/sZ9hKeDGNgrdKUR6ZIH/SXRDy5cky/zq6ft0qQD5Qzsat7IS3FXiGzMvYOFCUhAWsIYJaGtHvBroubcxMKPIw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=y0kdZsfd; arc=fail smtp.client-ip=40.107.220.63 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: =?us-ascii?Q?8p8XfKDpw4n+HaQki8KH9eNaZ/6vGHORyqdfTXWFQjscf9insB7USFsepxvS?= =?us-ascii?Q?EZJZ5gtEmMIRVmkkh3m/GXthh88rNaeorUlF2AhEyIRocccdOFqKCpVTTiTF?= =?us-ascii?Q?1Sfjbz3SubLb3YXzJJiYvlM4BmkeGNiqnP2vytzCUqe1PIbNgrTp1ik12ulH?= =?us-ascii?Q?NwvdB7JlEb0M3YGz9HWWoljr/mdRo7rWE0cU9xpbUqC6f+z9FOlwnlmbPIml?= =?us-ascii?Q?kUeZzDxZUyyuOIhhkBA3A/n788G1vdIUgw+xvNF5ScrNiE0UsHXBs/4l4pKg?= =?us-ascii?Q?m+yWz6ftj0nkDd5Y5pfcm6WMM+KewOh7fQ/Cr64Z7qFiymFIdl7Ud/CqYoya?= =?us-ascii?Q?6Kh60JJEzL9nbhRuWk3k0qKLZGYBUpSLz9AJqWHoVb6LgmLETKyGYizfXg4x?= =?us-ascii?Q?l9duAdhO2lD8xjOxNVECBBLbbtc3wXjtW5qS1s0nCrDaGL6Qif4I5IbMagN6?= =?us-ascii?Q?1lLBgXHnDvIRBZrwp52LgyGgZ7zswJD9jXwuYwIBBUYsPDUo7Pj0QJ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kxuGVyObPdZ73NHUYoKXSWwpA+QNFFGp?= =?us-ascii?Q?t+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 Content-Type: text/plain; charset="utf-8" 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_manage= r.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, s= truct sdw_port_params *p_pa u32 frame_fmt_reg, dpn_frame_fmt; =20 dev_dbg(amd_manager->dev, "p_params->num:0x%x\n", p_params->num); - switch (amd_manager->instance) { - case ACP_SDW0: - frame_fmt_reg =3D sdw0_manager_dp_reg[p_params->num].frame_fmt_reg; - break; - case ACP_SDW1: - frame_fmt_reg =3D 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 =3D acp63_sdw0_dp_reg[p_params->num].frame_fmt_reg; + break; + case ACP_SDW1: + frame_fmt_reg =3D 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 *b= us, u32 frame_fmt_reg, sample_int_reg, hctrl_dp0_reg; u32 offset_reg, lane_ctrl_ch_en_reg; =20 - switch (amd_manager->instance) { - case ACP_SDW0: - frame_fmt_reg =3D sdw0_manager_dp_reg[params->port_num].frame_fmt_reg; - sample_int_reg =3D sdw0_manager_dp_reg[params->port_num].sample_int_reg; - hctrl_dp0_reg =3D sdw0_manager_dp_reg[params->port_num].hctrl_dp0_reg; - offset_reg =3D sdw0_manager_dp_reg[params->port_num].offset_reg; - lane_ctrl_ch_en_reg =3D sdw0_manager_dp_reg[params->port_num].lane_ctrl_= ch_en_reg; - break; - case ACP_SDW1: - frame_fmt_reg =3D sdw1_manager_dp_reg[params->port_num].frame_fmt_reg; - sample_int_reg =3D sdw1_manager_dp_reg[params->port_num].sample_int_reg; - hctrl_dp0_reg =3D sdw1_manager_dp_reg[params->port_num].hctrl_dp0_reg; - offset_reg =3D sdw1_manager_dp_reg[params->port_num].offset_reg; - lane_ctrl_ch_en_reg =3D 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 =3D acp63_sdw0_dp_reg[params->port_num].frame_fmt_reg; + sample_int_reg =3D acp63_sdw0_dp_reg[params->port_num].sample_int_reg; + hctrl_dp0_reg =3D acp63_sdw0_dp_reg[params->port_num].hctrl_dp0_reg; + offset_reg =3D acp63_sdw0_dp_reg[params->port_num].offset_reg; + lane_ctrl_ch_en_reg =3D + acp63_sdw0_dp_reg[params->port_num].lane_ctrl_ch_en_reg; + break; + case ACP_SDW1: + frame_fmt_reg =3D acp63_sdw1_dp_reg[params->port_num].frame_fmt_reg; + sample_int_reg =3D acp63_sdw1_dp_reg[params->port_num].sample_int_reg; + hctrl_dp0_reg =3D acp63_sdw1_dp_reg[params->port_num].hctrl_dp0_reg; + offset_reg =3D acp63_sdw1_dp_reg[params->port_num].offset_reg; + lane_ctrl_ch_en_reg =3D + 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; =20 - switch (amd_manager->instance) { - case ACP_SDW0: - lane_ctrl_ch_en_reg =3D sdw0_manager_dp_reg[enable_ch->port_num].lane_ct= rl_ch_en_reg; - break; - case ACP_SDW1: - lane_ctrl_ch_en_reg =3D sdw1_manager_dp_reg[enable_ch->port_num].lane_ct= rl_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 =3D + acp63_sdw0_dp_reg[enable_ch->port_num].lane_ctrl_ch_en_reg; + break; + case ACP_SDW1: + lane_ctrl_ch_en_reg =3D + 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_devi= ce *pdev) * information. */ amd_manager->bus.controller_id =3D 0; - - switch (amd_manager->instance) { - case ACP_SDW0: - amd_manager->num_dout_ports =3D AMD_SDW0_MAX_TX_PORTS; - amd_manager->num_din_ports =3D AMD_SDW0_MAX_RX_PORTS; - break; - case ACP_SDW1: - amd_manager->num_dout_ports =3D AMD_SDW1_MAX_TX_PORTS; - amd_manager->num_din_ports =3D 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 =3D AMD_ACP63_SDW0_MAX_TX_PORTS; + amd_manager->num_din_ports =3D AMD_ACP63_SDW0_MAX_RX_PORTS; + break; + case ACP_SDW1: + amd_manager->num_dout_ports =3D AMD_ACP63_SDW1_MAX_TX_PORTS; + amd_manager->num_din_ports =3D 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_manage= r.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 =20 @@ -222,7 +222,7 @@ struct sdw_manager_dp_reg { * in SoundWire DMA driver. */ =20 -static struct sdw_manager_dp_reg sdw0_manager_dp_reg[AMD_SDW0_MAX_DAI] =3D= { +static struct sdw_manager_dp_reg acp63_sdw0_dp_reg[AMD_ACP63_SDW0_MAX_DAI]= =3D { {ACP_SW_AUDIO0_TX_FRAME_FORMAT, ACP_SW_AUDIO0_TX_SAMPLEINTERVAL, ACP_SW_A= UDIO0_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_A= UDIO1_TX_HCTRL, @@ -237,7 +237,7 @@ static struct sdw_manager_dp_reg sdw0_manager_dp_reg[AM= D_SDW0_MAX_DAI] =3D { ACP_SW_AUDIO2_RX_OFFSET, ACP_SW_AUDIO2_RX_CHANNEL_ENABLE_DP0}, }; =20 -static struct sdw_manager_dp_reg sdw1_manager_dp_reg[AMD_SDW1_MAX_DAI] =3D= { +static struct sdw_manager_dp_reg acp63_sdw1_dp_reg[AMD_ACP63_SDW1_MAX_DAI]= =3D { {ACP_SW_AUDIO1_TX_FRAME_FORMAT, ACP_SW_AUDIO1_TX_SAMPLEINTERVAL, ACP_SW_A= UDIO1_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_A= UDIO1_RX_HCTRL, diff --git a/include/linux/soundwire/sdw_amd.h b/include/linux/soundwire/sd= w_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 =20 struct acp_sdw_pdata { u16 instance; --=20 2.34.1 From nobody Fri Nov 29 05:39:48 2024 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2053.outbound.protection.outlook.com [40.107.94.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD00114D2A0; Tue, 24 Sep 2024 08:19:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727165965; cv=fail; b=hSGKnh2FZxgt7xUtwB7mRcs1EHe4eePvTLZl1UMEN3YxgzBEHB89MbMX/y4eHNJrj5nSTcakL+UNAo+1682lG4iRMeHpb3yhgJ+4XQBd8699vA10aRyLthKMmehHJPBFw59nSxW+c0S8CleF4IICtj7ZAwgZ+8FAqKPG1GLCZTo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727165965; c=relaxed/simple; bh=rY4ngI+GB6mgNB4IkVT/PhXHud9PWrFarjdHcYT9g+s=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AhxDOc0JgaT0y0V0OSHc9vg4isUPtTos+uAliLXZz4XT88I7cYf2M10g0WGmaku++TDkEu0rBwH+JXRurmjQrFsQuxDnOqG+lXQ7s9yLLGJjdQpTS7q4NQwB5FbEk37izRTCwY+/p32ivzrO+Cz76XK9qbhDAE2k72XX/XtjXqY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=pUZskNLq; arc=fail smtp.client-ip=40.107.94.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: =?us-ascii?Q?+rNqI6c9lVDKz6ZZ3RDcfrhdYOCTo0cqD+XYDtkdbcGLlKbZVZQcM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fCBRTGWwfeggqnVEO87VYUzhgXa?= =?us-ascii?Q?gZcR764IGwOdNyP/Hpp7L50lmqpHzmViaNLmbLlpA+s4T16JHhtuaWJ2+0Ww?= =?us-ascii?Q?Bfr3ffRmQO18kv0Wp/xjmwnkIWdEdj4XOquZkgxSAoxHtWlc0+iyTZca1e9b?= =?us-ascii?Q?RBy+WT3Zyh0E+9GfrnIgVLuOS91wV1xz3i+uLs+BPm9NGwE24DlC08rO3zRv?= =?us-ascii?Q?gyoenXHDyB681vbV+s8RGhXpRn6UbrsQnOI4cETa1jZEFnoE1GBCVFCCeqNv?= =?us-ascii?Q?hEyzm1qN6AWe3UtCjFuVp6klTSuZmO+QbW8mrxAIzSXtEE14JRLKzegJdnra?= =?us-ascii?Q?achVZWvXzPNzV6olK7myLAhKb3eZJBuN4RclaNBZdN94D9b40lvJ/z9D72lz?= =?us-ascii?Q?MO/m1i9l2CUjTKNxsXJtdraAy9Iwv/OWVSXzFKnL2jS5DbrEZsWZHy7fb1Fc?= =?us-ascii?Q?sz+LF1o=3D?= 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 Content-Type: text/plain; charset="utf-8" Pass acp_rev(ACP pci revision id) as soundwire resource data for SoundWire controller probe function. Signed-off-by: Vijendar Mukunda Acked-by: Mark Brown --- 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 =3D acp_data->info.count; sdw_res.link_mask =3D acp_data->info.link_mask; sdw_res.mmio_base =3D sdev->bar[ACP_DSP_BAR]; + sdw_res.acp_rev =3D acp_data->pci_rev; =20 ret =3D sdw_amd_probe(&sdw_res, &acp_data->sdw); if (ret) --=20 2.34.1 From nobody Fri Nov 29 05:39:48 2024 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2058.outbound.protection.outlook.com [40.107.95.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1174A14EC4A; Tue, 24 Sep 2024 08:19:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.95.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727165969; cv=fail; b=AoytMNQCYvro8bQTD4lrjICEiPV1M4Z2oMMKlZBPNC5xLTgqU+4rV+PhOus3+hAQit7le+sHBTmAxhvrTExdUDgbhx0yBHpbE/Yfk+eJa5f8QPW+XBb9rNTW1XSE0sdmorNVSQ/svqOI6geSu3s8W+4p3VJfPhdJ9OtFDuHsKbk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727165969; c=relaxed/simple; bh=cDXdtJKNEBqO3/or1G8DkQjgnZNHsQ+/7sDW2RCEbAE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IXD8y4rYDMiFz4s0I9IoOH+jlFVtWRNU9K0rfBs6SS2vz9yGAJq0VDwyR/GYmn7BUxPZEAkkKcv2lBWcIH4hSsfj2y4LJEdyYkKD/eWoP2fcVHvSon1VwSz+HY2tWmpgD40/fL1QUOpyRMqGIUG8BYkBlVXVXsyuLw4M3culJJs= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=zeEuSYYy; arc=fail smtp.client-ip=40.107.95.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: =?us-ascii?Q?nCphI8Uum9P72+4AntUpTsq6TmY+2TpPFDyJJ6aQdP/toZX8HeVN8k3GkO9R?= =?us-ascii?Q?yfr+r/IzymSjGENaUUf/hH2nhcaqZNAiVL2fLZIYEMR4VcaYMu2Sno/bGvbE?= =?us-ascii?Q?G217+6TOVEwLBmGXR3ZiwW8J9T0oSLhds9wXySLYoQlZoP2fj8P2TLOMwRZo?= =?us-ascii?Q?uRarpZzyIu8+6RTgWxqKniUZwPc4p75fg3cz9QO4thGIIyJdebualex43Foy?= =?us-ascii?Q?BudrRvmMo8VGVz0gwXmZMdYD+Nm3EPrm/+fwyqd/mOmAN2jFmBQ+FIz7yxP4?= =?us-ascii?Q?p6abZWIwkMWqJPO9rJPa4btJ6ND6AmUZT25AuLOIO9hiUCpVHJyu71WHHD0y?= =?us-ascii?Q?xgg0m/yWLkkHJuvRCfnFbGsr9zJ06/6yKUh622HzNKKZmU0RIXqPV+K5RzCp?= =?us-ascii?Q?KbuLtPM54n8LCYQdM/zhE59PrxA00jn+vMQbLODRl3fdQe4UqWVWOjCUg76f?= =?us-ascii?Q?apA3A3LriTPJKo06BaKEXV1fSQAWw4VkLyVqMIDBigmjKFd0pAK2SYIZY6FL?= =?us-ascii?Q?QoB3XygqGMCApUDn5GICQF0czrGcjjxMqk+u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onf/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 Content-Type: text/plain; charset="utf-8" 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 in= stance 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-S= W0 instance * @sdw_dma_intr_stat: DMA interrupt status array for SoundWire manager-SW= 1 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 =3D &acp_data->acp_lock; sdw_res.count =3D acp_data->info.count; sdw_res.mmio_base =3D acp_data->acp63_base; + sdw_res.acp_rev =3D acp_data->acp_rev; sdw_res.link_mask =3D acp_data->info.link_mask; ret =3D 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 =3D addr; adata->reg_range =3D ACP63_REG_END - ACP63_REG_START; + adata->acp_rev =3D pci->revision; pci_set_master(pci); pci_set_drvdata(pci, adata); mutex_init(&adata->acp_lock); --=20 2.34.1