From patchwork Tue Jul 9 14:09:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13728125 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E015EC3DA41 for ; Tue, 9 Jul 2024 14:02:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=C4upfGYyhv3wfIPAR3t03xft5bnG8ay4hRhDOTNnfuc=; b=vPQ99LDDftV6C85iDhO3fivMI6 +sJgd8zZSglpv0e0GBvhhubfl4EWRQ8DiyJnKZtikX7WLtCi3wccbFp3qWS9aL/l85JvM3gkf2zho /fMMCFCr3WIhhR9Vy4DOS/SoIUdrq8Y5EYBnzuE1+gmqq680CNBu1Ox2pwPI0jPjkw+7wPvlmQbwR d0UNFp/u017yrrlMDloaKv+c+OkmK7Nu3zEIciPuqgwFcYoPDEA+cFbP8sb2HnAUrfiSwz0hbHMQq gwrakskwxMuyVMb90JTMeW7XACeJ9aE75efbz9eczmlZ4C8ReEQCswHtgkX4uXukjfgUjem2UNvnw 7tNUNtvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRBPk-00000007USP-3j2E; Tue, 09 Jul 2024 14:01:52 +0000 Received: from mail-westeuropeazlp170110003.outbound.protection.outlook.com ([2a01:111:f403:c201::3] helo=AS8PR04CU009.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRBPJ-00000007UFy-0ajC for linux-arm-kernel@lists.infradead.org; Tue, 09 Jul 2024 14:01:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eeMbFGHRalINOSHgFSrKGnDgoR5VVbPbY0Bz6MPMOsZ2A3vWt10IOb23hg+bu8rWWQyCl/y/RlFzmNenJ+T/5yJq80OWSeY8f0ZWc7hze9+5xjXEwc1jzQJiEv24PbjmWdBBXxunuv6FBXpsDq+9DgIERNZCBXmyh6EVodKc9ISdHxdkWTJvOWaeh5OVvxDwxW0TXl13DA/7ZWPLwgnVUSw+HqThrfa/qhea0XWLzSVEBAF9KOjDiaLP2OF3op+U3NBnc7MuLyHfJvRKg04Mr3sanGtkjnyekO/TqXjjg0AEXamk2CY/cLMnUsKpwzTxg1XZKX9QwD+rN7cwtCNEpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=C4upfGYyhv3wfIPAR3t03xft5bnG8ay4hRhDOTNnfuc=; b=YBlVJlR6Ih5HgzzIMXTWLBe4b3VXupraElIc4bpoFO5nGXb7iG6QKt5zqWcFaYebLQX8FXteFN2TXGQMs/VfH1X5YvYFqAouvuPpUi8RtUJ5zMXUxid8Um+WkUyJ6cCmn/USvhjE47Pq2VrbH7eJMpbnIKZcxGAiPvVO04iknDfZ2MsyhlnB6A9dXDuVlY/b+XZ+cbblVe6Mw3cwcf+u5nXwMCsNp4p3hTSkFNMAdVPE9JltRpBsebnSf5ujv54c9I4p88Oj1uhN0fA3oc8s9dofAZaDk4OT4ebrGqLSRHS3bPZfhR5J3JiAs98JOmDMvYnhsZJF5qWO0ofbKUcgWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C4upfGYyhv3wfIPAR3t03xft5bnG8ay4hRhDOTNnfuc=; b=WsvRIzd8P+toho5JCi30bxqI61unoerVYZBd9g4YUSOfJPfh6HHIKAKIgtEXiMgFgp3PMUMbZdlAqB6x3KdvsKUz+hIdgDtqO6mfHxMphCKwUKuZFprTpDHsDuJSDuOC8k9Y5URO491Lr2GuHlqvuqCnmrCuYzWaJdxGsvC0JFs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by PAXPR04MB8622.eurprd04.prod.outlook.com (2603:10a6:102:219::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.36; Tue, 9 Jul 2024 14:01:12 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%4]) with mapi id 15.20.7741.033; Tue, 9 Jul 2024 14:01:12 +0000 From: "Peng Fan (OSS)" To: sudeep.holla@arm.com, cristian.marussi@arm.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, arm-scmi@vger.kernel.org, devicetree@vger.kernel.org, Peng Fan Subject: [PATCH V3 2/2] firmware: arm_scmi: set mailbox timeout value from device tree Date: Tue, 9 Jul 2024 22:09:57 +0800 Message-Id: <20240709140957.3171255-2-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20240709140957.3171255-1-peng.fan@oss.nxp.com> References: <20240709140957.3171255-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SI2P153CA0035.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::14) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|PAXPR04MB8622:EE_ X-MS-Office365-Filtering-Correlation-Id: 8ed39383-e31b-460f-bc88-08dca01f976e X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: /OSFLw7L0H4FnQ5uP4oRHyHit9TnolWvM8bE9e/LvoSKCO9Bak07HtyBAYDdodEWuH2DpMNHqct5h1yL8AwF9eOTpx5hdxrOSU/H3wb/QZ5ZGQ43Gh/BWIcQFKsi4vE4oh9Ov4kEo/i9zLYGPTFqYBLV+enXgfaJ4X39qW5SLoJQMdyAk7NMk6WvX2W4hC1jUWxdA1QKblklivMnJ1fDbwf8P1i71jD6PqDOoanqc1CKwWSLoAHJm8QfhhVeTG4uzI4M4aDYCH8QnIngKTRY0agt19rKbyEIvqJxbW8EGK5lfwpmfenwlYYSvDvvMyaKppXZ8PuDDa9US//x2KKeU08IsEgxpHubeoXYAkqIQW7Gud/vASXYuiHUk3UrUjN05oKsexG2wghGci5ly0D6RlRe2SSd7YNPdrGX2ccwhwrw/Xi9WUBIw3Up+1abyBagspSbgJJFqzLuPXiHaHmxl97Wt6LuaIPJb6xXbALWkfXZip+Ij48LtT9BE4RN8Cw5csjU+zx9tcxVyHKBzI3+dUFYfr572J7L0fMyXi4Oma3kvG6yik74hocNQFjHz8/eZP5pHqXUT83fdbiNBAw3R/8Fvh3xsj3hBBevEQ4oqHELy/KhqLdue0GCfJLXUfg4YHYtbXT9VXA5yxK1YtjEfZ5/UTrJPleERcgoS8pVJEEmk2yn6AFQtQzXzJtY5KIasMPmIRZH+c2fq0e+We86G+1v32kDp9N5d43fyOPw/cdMuGsHb56JDgyzcCooI9et1iWE3ELlRvJxXIOYXzX4os/sbeSqCzmhMGOutKoYMnQdrFedtu+G3ruqa97U2s33T0UDtU9i8NdIL9BrUzMRVgVTEg4kkveibALhM3CUcJVr8aXg/Pp77EKQXIyCJZ4eL7nKGe3ArICKwXmqExGuJSW5iHP4CA7E8SRZqiHEuyX4oxnGgoEnts1vtRXqga77xtu5J5h/xTPBtpgDsO2JPMvwP/ZWi/WCd9GSaY4ulFyb3SuQ6SRMi1LeWp54JfdRBjN6ra2RTR1Oc+80WRsOuUsXlGaW4I/wnCbcQnj57XSPXEmQwY+ixrBGOjhDb10r0I5qpLoK32n99KWZQ1mWVxa6TMi3aOSNqfD/X++17duCIstpFOaRWIqstJAjY8w0Ms42CiO0TUMQgU9KXNfUXrSbRcTNKNqzTKnmzNB0cUiY1eGpy79LJFYfKr6gq8spdowFnOe59EeLV1iSMz9PQNxih3htfDUL1GsTkOoRpUX3I2Kuy1dR/seBx1KD/xl6ltPykZlteDOUIR6sPjhuYKbpRtYycvCx1k8JmmHPiiD5Ue+CPUhnrtZlE39DwB6W5aH56FFg9O6tra8nRhqo31dI8eTQeBxyDuJ62PlxLz+EyvkmoDY678h7mIhDcSrC6e7FCsoQZO+aJ/c+DN2WZA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oA1LkSZ7J247P3nQtcBvKALon2Bya2bHa99QuSW3UDKWErjMdN9vdAJETLsDmX1HWBGXRBdYACY+b6tE6+issi7KFqqoXnVl4QriSpwp8Sp/qUlEJBTe7ZvnBzrWHswred7UMCmEpIl63BEjlg6PS3Ueioqb5axGZv5FV2Mo+02cJY0dR0k/yY7Q5m8HTsyh6vGGwruR+AHP6C6UGI7khB+frOFCTJv0wGjoYuIqb/ok3iUzKeyK5ixdj1Co8sNv0iSIM6RNy+rUqspjI8stYmE9ip11/gf1WTr4TrOyIda9aeFlXX0XA4QfMEkLTrCUXPlzBvaBLTuYw44oob8uF/otKbJ4wCS8xa4oZwrUv8EHe/343z4MC1dcLYq5R5Aq/jL1aYVZ39KMo8tmOAdru6MYSm8hPwHimRBUagUonjqrjiYSmsmOobqGT2joHvrPqqTLKzrKMXGcznmXnGIVALEhGjwV8WGAq5e0Wr7m16eaLTRfNZ7GvbFAiOGMKo1SZlYFcxGtULXkAgTBMqemHPdX7S579er2Jeo2JhhWLHM3Fcx0OuGUZrH6nTUIO6SBfh7tBWxy73whIoO8rWYCmIR1X9XjqWzR73Zg0IjTtF8i/Age+6eVRwrMg1b60PgWrChushE7e9zc+N0jpPNx5wMXPuAcYpJcNurCKCyqlrjIfHonT1bmQAtHme77jbMvmGDPRfhyExXcCVnWQ+lEyfMLJ1XM/qqRR4SMlUaHKfxHiLq02Zbra7hDcmR2bMDFn/JeitX3usR0QP23nd7uGyxVbPTQpuN+BulKAERkhpGm2REi2UJeSBp27+EtLKD9qBCKhGm0xFnYPBwmeiz/wXlFCddOUzmM7bhxugcS+EtCZebmGNCjmnn5uCRR3t1i3da8VnriowvhoBBj1HnOBMWrsLygLoUcqtmFLHdskWTt9rowoMua1PbC7QkffAs/jUfyulRU4SNDehIOe3xrPytEahLGvGIkbUFYa85uF+6NNxWTcbkeKzqACSnPn19pxAVXZQo3Zw9FYMucdfk0FM0U7almMuavryvGgH2TZs3Mkt4rZn3vaULd2RBM4NarparJbqHTif9yLLM0OYRIg8ugF2v0IRvLSIc3ZmewheH7DO2qa9VubA2LX9vdNWvn2EGgbbj0kGyuqpcrHjt3zGx3vcpXcgYTknQ0wS+GVCk9mWDpaV1EmMt19MHPBmDXuss+YU21eTzQqzOIkbxq9Qqr9L2lr1TYEAr8ARbaKE1++Ba+nhvWmLYfrzeyeW7BXiNisdmNJ7wZDc+xCdzVVDAB/hvauFySCXgVRruw+BrxTITK0q9H0q55ebwyMgy7T0dewhjn2Hxs/08sA6YYRtPlrMyR5Y/e7kfX+jDE0ycoY5/KXtqV37oDaRJJvECXKIw4/19/MhRh+7YJLt4kb5em26vigv41VgvbzWxvZwUIu4iCxgyEWhyH6GqEwcv7N5eGNJSrlPXZNUeg/7be76WbBQdn7j6EvQzwF9pvqQGZn01Gu5hmb/gPJujoYVliwrDiDzLkt0MP7UDQdyY26uEBb9iXpzJbcKV4ZgSA5dYeI2F65+xAVsHgehGqcV+t X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ed39383-e31b-460f-bc88-08dca01f976e X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2024 14:01:12.7778 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zg9Q0dH1MKyNRD8HB+Tv34dOddy6jMyM+Y1k8clY5+Fy59O+EWWy3lRGtqSOsyUzi35B0RT8AG3NNlNQsJY0GQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8622 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240709_070125_271768_46A33653 X-CRM114-Status: GOOD ( 17.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Peng Fan Each platform might have its own maximum mailbox receive channel timeout value, so get property max-rx-timeout-ms from device tree and use it. If the property does not exist, use mailbox 'scmi_desc' fixed value 30ms as before. Signed-off-by: Peng Fan --- V3: None V2: Fix build error for raw mode. drivers/firmware/arm_scmi/driver.c | 19 ++++++++++++++----- drivers/firmware/arm_scmi/raw_mode.c | 13 +++++++++---- drivers/firmware/arm_scmi/raw_mode.h | 3 ++- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 6b6957f4743f..1aa613d4cb43 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -162,6 +162,7 @@ struct scmi_debug_info { * @devreq_mtx: A mutex to serialize device creation for this SCMI instance * @dbg: A pointer to debugfs related data (if any) * @raw: An opaque reference handle used by SCMI Raw mode. + * @max_rx_timeout_ms: the maximum receive channel timeout value */ struct scmi_info { int id; @@ -188,6 +189,7 @@ struct scmi_info { struct mutex devreq_mtx; struct scmi_debug_info *dbg; void *raw; + unsigned int max_rx_timeout_ms; }; #define handle_to_scmi_info(h) container_of(h, struct scmi_info, handle) @@ -1302,11 +1304,11 @@ static int scmi_wait_for_message_response(struct scmi_chan_info *cinfo, trace_scmi_xfer_response_wait(xfer->transfer_id, xfer->hdr.id, xfer->hdr.protocol_id, xfer->hdr.seq, - info->desc->max_rx_timeout_ms, + info->max_rx_timeout_ms, xfer->hdr.poll_completion); return scmi_wait_for_reply(dev, info->desc, cinfo, xfer, - info->desc->max_rx_timeout_ms); + info->max_rx_timeout_ms); } /** @@ -2614,7 +2616,7 @@ static int scmi_chan_setup(struct scmi_info *info, struct device_node *of_node, if (!cinfo) return -ENOMEM; - cinfo->rx_timeout_ms = info->desc->max_rx_timeout_ms; + cinfo->rx_timeout_ms = info->max_rx_timeout_ms; /* Create a unique name for this transport device */ snprintf(name, 32, "__scmi_transport_device_%s_%02X", @@ -2888,7 +2890,7 @@ static struct scmi_debug_info *scmi_debugfs_common_setup(struct scmi_info *info) debugfs_create_bool("is_atomic", 0400, trans, &dbg->is_atomic); debugfs_create_u32("max_rx_timeout_ms", 0400, trans, - (u32 *)&info->desc->max_rx_timeout_ms); + (u32 *)&info->max_rx_timeout_ms); debugfs_create_u32("max_msg_size", 0400, trans, (u32 *)&info->desc->max_msg_size); @@ -2940,7 +2942,8 @@ static int scmi_debugfs_raw_mode_setup(struct scmi_info *info) info->raw = scmi_raw_mode_init(&info->handle, info->dbg->top_dentry, info->id, channels, num_chans, - info->desc, info->tx_minfo.max_msg); + info->desc, info->tx_minfo.max_msg, + info->max_rx_timeout_ms); if (IS_ERR(info->raw)) { dev_err(info->dev, "Failed to initialize SCMI RAW Mode !\n"); ret = PTR_ERR(info->raw); @@ -2953,6 +2956,7 @@ static int scmi_debugfs_raw_mode_setup(struct scmi_info *info) static int scmi_probe(struct platform_device *pdev) { int ret; + u32 timeout; char *err_str = "probe failure\n"; struct scmi_handle *handle; const struct scmi_desc *desc; @@ -3002,6 +3006,11 @@ static int scmi_probe(struct platform_device *pdev) info->atomic_threshold); handle->is_transport_atomic = scmi_is_transport_atomic; + if (!of_property_read_u32(np, "max-rx-timeout-ms", &timeout)) + info->max_rx_timeout_ms = timeout; + else + info->max_rx_timeout_ms = info->desc->max_rx_timeout_ms; + if (desc->ops->link_supplier) { ret = desc->ops->link_supplier(dev); if (ret) { diff --git a/drivers/firmware/arm_scmi/raw_mode.c b/drivers/firmware/arm_scmi/raw_mode.c index 130d13e9cd6b..06a764d106f8 100644 --- a/drivers/firmware/arm_scmi/raw_mode.c +++ b/drivers/firmware/arm_scmi/raw_mode.c @@ -165,6 +165,7 @@ struct scmi_raw_queue { * @wait_wq: A workqueue reference to the created workqueue * @dentry: Top debugfs root dentry for SCMI Raw * @gid: A group ID used for devres accounting + * @max_rx_timeout_ms: Max receive channel timeout value * * Note that this descriptor is passed back to the core after SCMI Raw is * initialized as an opaque handle to use by subsequent SCMI Raw call hooks. @@ -187,6 +188,7 @@ struct scmi_raw_mode_info { struct workqueue_struct *wait_wq; struct dentry *dentry; void *gid; + u32 max_rx_timeout_ms; }; /** @@ -379,7 +381,7 @@ static void scmi_xfer_raw_waiter_enqueue(struct scmi_raw_mode_info *raw, trace_scmi_xfer_response_wait(rw->xfer->transfer_id, rw->xfer->hdr.id, rw->xfer->hdr.protocol_id, rw->xfer->hdr.seq, - raw->desc->max_rx_timeout_ms, + raw->max_rx_timeout_ms, rw->xfer->hdr.poll_completion); mutex_lock(&raw->active_mtx); @@ -437,7 +439,7 @@ static void scmi_xfer_raw_worker(struct work_struct *work) raw = container_of(work, struct scmi_raw_mode_info, waiters_work); dev = raw->handle->dev; - max_tmo = msecs_to_jiffies(raw->desc->max_rx_timeout_ms); + max_tmo = msecs_to_jiffies(raw->max_rx_timeout_ms); do { int ret = 0; @@ -574,7 +576,7 @@ static int scmi_xfer_raw_get_init(struct scmi_raw_mode_info *raw, void *buf, dev_dbg(dev, "...retrying[%d] inflight registration\n", retry); - msleep(raw->desc->max_rx_timeout_ms / + msleep(raw->max_rx_timeout_ms / SCMI_XFER_RAW_MAX_RETRIES); } } while (ret && --retry); @@ -1162,6 +1164,7 @@ static int scmi_raw_mode_setup(struct scmi_raw_mode_info *raw, * @num_chans: The number of entries in @channels * @desc: Reference to the transport operations * @tx_max_msg: Max number of in-flight messages allowed by the transport + * @max_rx_timeout_ms: Max receive channel timeout value * * This function prepare the SCMI Raw stack and creates the debugfs API. * @@ -1170,7 +1173,8 @@ static int scmi_raw_mode_setup(struct scmi_raw_mode_info *raw, void *scmi_raw_mode_init(const struct scmi_handle *handle, struct dentry *top_dentry, int instance_id, u8 *channels, int num_chans, - const struct scmi_desc *desc, int tx_max_msg) + const struct scmi_desc *desc, int tx_max_msg, + u32 max_rx_timeout_ms) { int ret; struct scmi_raw_mode_info *raw; @@ -1188,6 +1192,7 @@ void *scmi_raw_mode_init(const struct scmi_handle *handle, raw->desc = desc; raw->tx_max_msg = tx_max_msg; raw->id = instance_id; + raw->max_rx_timeout_ms = max_rx_timeout_ms; ret = scmi_raw_mode_setup(raw, channels, num_chans); if (ret) { diff --git a/drivers/firmware/arm_scmi/raw_mode.h b/drivers/firmware/arm_scmi/raw_mode.h index 8af756a83fd1..25d4a46261e7 100644 --- a/drivers/firmware/arm_scmi/raw_mode.h +++ b/drivers/firmware/arm_scmi/raw_mode.h @@ -20,7 +20,8 @@ enum { void *scmi_raw_mode_init(const struct scmi_handle *handle, struct dentry *top_dentry, int instance_id, u8 *channels, int num_chans, - const struct scmi_desc *desc, int tx_max_msg); + const struct scmi_desc *desc, int tx_max_msg, + u32 max_rx_timeout_ms); void scmi_raw_mode_cleanup(void *raw); void scmi_raw_message_report(void *raw, struct scmi_xfer *xfer,