From patchwork Fri Jul 19 08:49:03 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: 13737010 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011028.outbound.protection.outlook.com [52.101.65.28]) (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 2D09B7BAF7; Fri, 19 Jul 2024 08:40:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.28 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721378412; cv=fail; b=h6tGgtbNGfW1TyAojyENFlEOd784t/Czorsr1hiFb1tWmLi4g7k18HotAlYLa5b9WH5goQ50Bcsna3SoDjXkE8rUOuWXq1MkEQdbG67Tkp48PvXornLESIjuuEoThxm54zWTCYlHAQgDrL0o3pgDshpbgSZnL29yvjGsgWyu4HQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721378412; c=relaxed/simple; bh=KYyEfSPq7YTUfASdWBxFNDvg2GrfN4Fd23BsX7GvZFk=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=uY6WBBvEtf92Yq1DZtELujuCCO9mN5SPo4lNefZ9pwdOBcBD+isnP568BSQNgmqzvwRcSuXiefQl4OMwKvOrFI8cq8Eu+ejnvF9TspUoqiSYYaWwBUxyj9iYkGxTBkpLbtURXK0iv4W9pW8ZgrglpNps0IYrYwkM1rcClIwBUoQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=RHZ5Y5J8; arc=fail smtp.client-ip=52.101.65.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="RHZ5Y5J8" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JytShI+csmUPQFmWxejCjcaGPdtYdTO2K37x0DwFJg3Ej3OhINk13ZD60AcnIyymwWkbB+kKSnJI/hITVoa2znPfwoCQs6HQzLKa7v3M3eakHwSbjbKNFGU4eCYWIBWELpql10/b6xIGnK9AnNxtroXFRUs6pAHIwJ0yr9idJLrUDpdWmk3Z4DMq2Y3WNmAzl2jz5sboDw3lM2v9TMsKPsyR2gvQL8cUXp7kP7MnFKAcPjH15Xu/t74dufZIm2L+IHP8LnKdtzi395psEiuyVCKma8agHUjzTKUNh/OK9A+S1BNIAiZ68NRer+i1d495nG/Db5rbUdx9em2ZHoKxaw== 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=Oi/KMaB6KbDIf9Uij0D+ag02a/o21x+A7FUICQWfbXM=; b=n0OE4kS+c71XrymmqX4df7aCQkGtD5wKKn6tbZJJGixZlsCMuBJVhORIXsGDELCuOejKsI1/jdh14/XwGf8QHm8P2ZwyVjEsyfxpQiJL22KxG8hEmzN0jOjAgaQC708zwiXY+TAqJmzWvgxg8tD8UOmas89o7SBSx8xJ3z7aGEvadV4576NfjPTeqJq74QYGA3bYRKtKkfDltaCvHUcsve/9GS3kOiERjMyDsELJ58sW1AJmvEKgJ0e5hDNPMcrnjOwg/nQAlGuAch0xRpNkDC7QSXeScfdp+tS+zf1pGcVU4xPuxgsJGZ6X3AoHHV82+7bv+HdE1Y60azIlItcAkg== 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=Oi/KMaB6KbDIf9Uij0D+ag02a/o21x+A7FUICQWfbXM=; b=RHZ5Y5J8HGfqcV32cqgo+BdA2rOE++gaqQ+G2p3PcVF4UGsf9IqKZHmEPSt509zDSvARHwZ0RUt1zVIs6MPlEg/W+h9TcMai8EjhUpEzwki/q+w+LrSch+Zn1W8qJRN7+wJbC2SRHNkd+QWCs3WrGjCRUMPwJKAxrj2KxEEJUGw= 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 DB8PR04MB6812.eurprd04.prod.outlook.com (2603:10a6:10:f8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.18; Fri, 19 Jul 2024 08:40:07 +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.7762.020; Fri, 19 Jul 2024 08:40:07 +0000 From: "Peng Fan (OSS)" Date: Fri, 19 Jul 2024 16:49:03 +0800 Subject: [PATCH v2 1/2] remoteproc: imx_rproc: allow tx_block to be set Message-Id: <20240719-imx_rproc-v2-1-cd8549aa3f1f@nxp.com> References: <20240719-imx_rproc-v2-0-cd8549aa3f1f@nxp.com> In-Reply-To: <20240719-imx_rproc-v2-0-cd8549aa3f1f@nxp.com> To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Daniel Baluta , Iuliana Prodan , Marek Vasut Cc: linux-remoteproc@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1721378951; l=2299; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=Co0X/fogF63BIl2CA2vyYF72Bd5h0JVH5Wy6/50cNts=; b=qkU82bWr+/4fpZIt+QZQGjAmRKZ+8WVVx+prEVydlbLyA9AKLK4ECcgmLJYo/qujPHWjvdbL/ yieUS7iGJagCSNrVOVLRregeykEHNvN94SLY+bhAl84UcUGM9lTlBoS X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR03CA0129.apcprd03.prod.outlook.com (2603:1096:4:91::33) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|DB8PR04MB6812:EE_ X-MS-Office365-Filtering-Correlation-Id: 1be662f6-3944-4906-75ca-08dca7ce64a6 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|1800799024|7416014|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?sojac84sNSFz0W6Rp3/WnTk3Rn1x25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8?q?HHidZF75LqlOx1dNWsMflDjBns95cTt9FMV61o6z6hvJbcH7XJJb6vfxMQZONYgH3?= =?utf-8?q?LusjCnksvjNAOuC75icQFAdjxlX8n3YdotXGI44YCdaH0ZZqBqAnqBoUWoonqoT0e?= =?utf-8?q?HrBihfSUlBS3r7ZT8Utn3gHq1/a+k313OkmebouI0z1UrQxfK5n+izIte9tnlEmSy?= =?utf-8?q?20x0KBb1y6eWr+ED9StF4oDCwiWIYfaT1r56d0NAtJPnnTmSaAtTNu6Qr2lN9cxHO?= =?utf-8?q?lo90R1JCgLCgZjQzoPtz4Kslt10Fp/P36rzSut5leombzGSI35aAmJsZrJHG5i2hZ?= =?utf-8?q?T0tsmPPKpvBPSjSdXQigoS6KTdoAwK3HdTjdfs3gfWtUmotmDo1pd/rt7vTJF1Bzj?= =?utf-8?q?6NhtGu8Vj9s7EG7FxWBvhC0lcNBRm/wysZzwE7L9aODlsMv6YaPn+uKjF2ID60Xfw?= =?utf-8?q?L/21IPB92Bdvx51y3iVW5TVlYAwPDRtrFQ=3D=3D?= 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)(1800799024)(7416014)(376014)(52116014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?fasNs/h+bxNBbBbaO5N6B25BCrxM?= =?utf-8?q?58g/RBGTt/rYR6oZkkjNeDuD4JN8B07MXufgei07JwaaZ5UDueHU+bdSfRGUIs767?= =?utf-8?q?MfDr9TJtp/LYjeu036qenBTgxm/8U+14QOGRm4NPlvAjWv6K0UigGprckDJ02MiDF?= =?utf-8?q?99bqfpbhrEl97/Qnm1NHIYBXcizUWxXZ5JKWQA5Zd87SRwqCbfqPe+KEDbajAuTn8?= =?utf-8?q?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-8?q?uSV+LL1LUMuOhFx+fTg850LBHxUvVwFY2Ii+P4VVL2cGkCMMD2DVvzQupcRSXRTJV?= =?utf-8?q?HvpCuPY09mpmClFwP9pnM+gRAcdvBcXMRm8USdpKrptfDABNXGQdrar4n8CcY3rur?= =?utf-8?q?8Por4QReJgU1OWzc4CzmABC6cEs7l++zxjTRHe6K6Y8YKaSCoVgQAsT6ywQWXs9L/?= =?utf-8?q?qO2yUfFgJtp3K/b6YuV+8P0gnlNt8wLcOTgy9QfN53eeHL58B6zrMAM/S4Ybx5yyZ?= =?utf-8?q?E5R5JJ10BZo2FHmhT1EQT9iAU2KKfMOKLwyBuJ7Rz+WTePeIZqA1l4iMl3cSC7Pin?= =?utf-8?q?rB7NGQXlaD0b2JH8MyKftiaXRVrBxlbjHkG7ohGe7xGwOq0zydJYDuEINnx6BIk22?= =?utf-8?q?sTkCgq6afa9iaO9LflCpHIMDQRGglDrGgl1IsFQU/YDREKEwdLlrahy3hWhtDaxtB?= =?utf-8?q?4fr2QFwHvscM?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1be662f6-3944-4906-75ca-08dca7ce64a6 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2024 08:40:07.4522 (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: inxpjBsOjXRQw+c0RmYJh4WzYhSO00TcJGcLSSJEzFySRAON6dRklNGESfEYFmViPqADEwwOsfLZl5w33IOF/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6812 From: Peng Fan Current tx_block is set to true, but there is case that no need to wait response. Linux just needs to send data to remote processor, so let's allow tx_block could be set to false. No functional changes. Signed-off-by: Peng Fan --- drivers/remoteproc/imx_rproc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 552fccebf7e2..01cf1dfb2e87 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -90,7 +90,7 @@ struct imx_rproc_mem { #define ATT_CORE_MASK 0xffff #define ATT_CORE(I) BIT((I)) -static int imx_rproc_xtr_mbox_init(struct rproc *rproc); +static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block); static void imx_rproc_free_mbox(struct rproc *rproc); struct imx_rproc { @@ -369,7 +369,7 @@ static int imx_rproc_start(struct rproc *rproc) struct arm_smccc_res res; int ret; - ret = imx_rproc_xtr_mbox_init(rproc); + ret = imx_rproc_xtr_mbox_init(rproc, true); if (ret) return ret; @@ -629,7 +629,7 @@ static void imx_rproc_kick(struct rproc *rproc, int vqid) static int imx_rproc_attach(struct rproc *rproc) { - return imx_rproc_xtr_mbox_init(rproc); + return imx_rproc_xtr_mbox_init(rproc, true); } static int imx_rproc_detach(struct rproc *rproc) @@ -794,7 +794,7 @@ static void imx_rproc_rx_callback(struct mbox_client *cl, void *msg) queue_work(priv->workqueue, &priv->rproc_work); } -static int imx_rproc_xtr_mbox_init(struct rproc *rproc) +static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block) { struct imx_rproc *priv = rproc->priv; struct device *dev = priv->dev; @@ -817,7 +817,7 @@ static int imx_rproc_xtr_mbox_init(struct rproc *rproc) cl = &priv->cl; cl->dev = dev; - cl->tx_block = true; + cl->tx_block = tx_block; cl->tx_tout = 100; cl->knows_txdone = false; cl->rx_callback = imx_rproc_rx_callback; @@ -1083,7 +1083,7 @@ static int imx_rproc_probe(struct platform_device *pdev) INIT_WORK(&priv->rproc_work, imx_rproc_vq_work); - ret = imx_rproc_xtr_mbox_init(rproc); + ret = imx_rproc_xtr_mbox_init(rproc, true); if (ret) goto err_put_wkq;