Message ID | 20240819-i3c_fix-v3-7-7d69f7b0a05e@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org> 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 25927C5472C for <linux-i3c@archiver.kernel.org>; Mon, 19 Aug 2024 16:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=JiPMHevSheoPvMh4bWvvkSfZoKbQKefNJAEd+gNv8DE=; b=iDndPK/rsKnlNNSY/9kIPNKHm6 sgsVCCnfezOe3DsruO+70OIhMbWo4XMahRf04jx9vWMLrYfQu0gY9nZ5pVfttIg/+mX5ju6bX7ceX MoWtlnAPnHXFx+JWsg12084gmEKefSrCOmkk78TspQf1nQjcKlHJAk30pRSaLwB+UbXFxyuivwuva lsUoZZ18sVcMJbckRrKRV+lJeJWa7N6vkMxJjYSFFPhCKGQJx09UbXv3RiTGyEkIIzdVgGarr3h6g TuwCF7epXyIC2QN81S6S8I4r8fjg7s7fstuImW7wZciQCLyOwNufYefBWvYW1lrLjU3BImejudZ0y ryuxVD1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg4qo-000000024jp-2ZRV; Mon, 19 Aug 2024 16:03:22 +0000 Received: from mail-northeuropeazlp170110001.outbound.protection.outlook.com ([2a01:111:f403:c200::1] helo=DB3PR0202CU003.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg4q9-000000024HY-1LcR for linux-i3c@lists.infradead.org; Mon, 19 Aug 2024 16:02:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PoCDReAd2Uy3ICMrqJbZIgBqA3aDaSqjypTGXqZakchjHnu7XE7HUsQ1Prf9SyrFYnrJ9W1XCGVODaSOTjZeKpVE0qC+oYIoF7+muuNwXknmH7tYZth2n3JGPowuooA4cR5/SeZJiFYtjVe19BjCBwOMNN6gbpw3ltDeMeyeUgKgq/D6+3sB4dQNg9aap95UMjchpnXsow68UlB1EnjSBgaewGqotZjNFAWEiJbAV2M1MNq7lz7MVWAE6Fde+Ddde6dwG9m+2VgusGH+DIn7Rq17p4q5KjC5Dl2qtNpNqQIqcbm7suJIr4WzLJohVLlWfkI504ads97B1ZloUXkwUg== 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=7cmOmx2TRWp/2Uy3nWsX2Ky5UGNNorgOPghwcI1aG9c=; b=Yqmy4WDgDHLRSKYGFneRE9dgO8lc9ERl/ymSafzYvv4UbNs47BUqJvRvEyYiFCUu9cJumqnP15p4jThtvRrViLZE+pCMmzhGbEEwFzJLLfjhMH+RbltPKTJGCJYI3xfdrls3g8MAX5HMEcYzxrGaLOW2HPi0n6CfSx2BXVt2ckb9TonvqDXMg1rm47dAARbYMXs1ohvPKwxGbnpcmg/bsVsdBrmG1XQlev5NIXB8ruYe90oqRCUlPRE8OyjqBSRdAmoXSyb3tkDoBb6bprOqOr7YL850Pi4ZHqX7/1tPTiLooeIcbGjXnCYqjbl2/z5ttLCxXr2tWyyFe+oFUmadMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7cmOmx2TRWp/2Uy3nWsX2Ky5UGNNorgOPghwcI1aG9c=; b=XPhj33h7SXSOZ1aJTfq7O7nDlUaqVDfPcOP5sgySnTZbsNBMuGMVde4KoAWXucN/hrimW7RECAqDuQKkvV+wjP2ue3tfTGKqiTgT/2IZjI8bMlbBJo0ZCgfh+0FR6kcOzTeuiVdxx0qMdr42GEshml7RmjCIMZCitnsQjTairJyhadYg34AsRB3LYSv5ZcjIjvOAtnqKBM2GRML2bE1B8kMpn7q4ma2ozVZoE64WBHdQpFWplqrxB7HwryyzU7l9EYqH9sFzN4XZ4wjCan15diqqdzpr5q8yXEzfLc+xcqUSWaKE4Nxf4oBG8mMVNvpURlGbpfVnlcHNBefKgU29Wg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DU0PR04MB9659.eurprd04.prod.outlook.com (2603:10a6:10:320::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Mon, 19 Aug 2024 16:02:24 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%3]) with mapi id 15.20.7875.019; Mon, 19 Aug 2024 16:02:24 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Mon, 19 Aug 2024 12:02:01 -0400 Subject: [PATCH v3 07/11] i3c: master: svc: manually emit NACK/ACK for hotjoin Message-Id: <20240819-i3c_fix-v3-7-7d69f7b0a05e@nxp.com> References: <20240819-i3c_fix-v3-0-7d69f7b0a05e@nxp.com> In-Reply-To: <20240819-i3c_fix-v3-0-7d69f7b0a05e@nxp.com> To: Alexandre Belloni <alexandre.belloni@bootlin.com>, Boris Brezillon <boris.brezillon@collabora.com>, Parshuram Thombare <pthombar@cadence.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Boris Brezillon <bbrezillon@kernel.org>, Arnd Bergmann <arnd@arndb.de>, Miquel Raynal <miquel.raynal@bootlin.com>, Conor Culhane <conor.culhane@silvaco.com> Cc: linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, Frank Li <Frank.Li@nxp.com> X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1724083326; l=1762; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=wdMOaxvdED4nYxZmlnJu7BdBDpzKEEzpzk8ZMhb0ahU=; b=A56sFgcvX9sbc0McVV+FF39qyIvzaJ3q29C7EXlzuFph00h+KCPaKoJcZwn6zRH+9VG0+5nr5 RzmTz/NrbVcBljgxIY2ch94IWForttrCfjQq4dh+QrJZ28MBSHMtFWJ X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SA9PR03CA0005.namprd03.prod.outlook.com (2603:10b6:806:20::10) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DU0PR04MB9659:EE_ X-MS-Office365-Filtering-Correlation-Id: b14d999a-0810-4ff4-5b24-08dcc06850bb X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?a6lMDl9maGy1NCtV2iC2rtwA/ttdtTd?= =?utf-8?q?vSMjBo5o+orqTeKsVucJt5T3cwFbccNxuiOzxtHC8cxkXsqn7LtpIQZiAmyrQhkh+?= =?utf-8?q?jCSPDBRmXHPlcHU20uZyq7P7xvxh2D4/g+Zm//Imx2PuV5q89+gJzV1WbQW2oxfye?= =?utf-8?q?7jiLWPYZWZwkzVBU63tbUfOyAkrmu39aHRS5NSrv+lykWFlZkGd0vaVnA9NS7kLww?= =?utf-8?q?NMJCVzKO+DrbRxoCHZ19o/jzZChbg0Up41kStiBGBnf7tRAN3FNobiYsz+tQ2L6Yq?= =?utf-8?q?0zXZiJN1X0lIF+PwpMhD2vpgT1PM0QKk1UpaQ5nwkVYbQ8aDOD69O2hLIWJPbPyd0?= =?utf-8?q?tBN5EHL9EMQ40YVWjxN362ypetgZgz+BDIquQfO6POK1dWz3beDXpqeQWptmCzv6b?= =?utf-8?q?iWkmpok8vKTLWPSZHVSx+25z6Iu13L4Ei4vUbsjOMRzQfGT86w+w4XPgLYHjGY8lm?= =?utf-8?q?YpIcHW4DzCUYjDWx7RvoUHCIYmXbfiPMHv1Gs/beZyokq4LxgdBMt0oyKEFN9hKVP?= =?utf-8?q?3fjNv6qHjXS6upwSBwKjqsjSZdGT9m204rfBNnBP39IfGLWwxUXYyVaQkmlboTNFv?= =?utf-8?q?6MJyvveQGjYnJyyK1rzJzn7ltABFkP5jcZCVBM5IHn8wHo+R89CiFH5L1Yku18Nd5?= =?utf-8?q?FP30D/X7QYCk5jXeEm6WoQKhh/3b4GRhCaV24ovR0HDgvudU27Bxsje/kfudNoSN1?= =?utf-8?q?MFCpc/to5kc+eoPMh0+O0C5td5BZ5buCXzdwV4inwwGozWBfHjirUySa3oyiMyr+q?= =?utf-8?q?nYnFPd4lna5yVIz7+WsaabDdQ8XPtl66P+C1foE2wkI8q/1Feh3jFJ+NVpwIPV0Ih?= =?utf-8?q?X24XRXnC6QyreDkkbn7yPzwXS954/Rrpu2j7qhWDCzEqwgur0gmi0JaAlSgDl3dXu?= =?utf-8?q?Q0l4107KhnzGMp9+SK/XWQnTwMaqOyzKJXmjxPAVHNHVxaPhi6/U0yGKMI+fvMEMF?= =?utf-8?q?LYqf4oGnWn0Vt86lBZjGwy7XR+J0DDcLDd7Qflb3av24Vs1FLvtC8y/VPC4z2quTe?= =?utf-8?q?n8gb55XqpNZ4pUQf6ZaOd1N0Fk2d1Dut32uucHXTsircmZY99+Lo26sI5yaOJrWw2?= =?utf-8?q?yt+dPEO8uwp1kkQUiHXQ0mUqqL9WuAuXmPEEdJ69/VwBwKGzqu2LKPALAU5uoymsC?= =?utf-8?q?WYNUa+pN3yRXZHgBmf8Ma/UghUZ4aDOzUsMMO8MoVMNDYE27vdd9rmatvEAQi3GNj?= =?utf-8?q?1tDBP/0tBFk/arz2DRtKmlwfQ6H6wKZ4wgcq6EdTlspglWLpEYZqrWeTxBAk2YL/s?= =?utf-8?q?wQXVLi+wk5RakhY89CRwyADkDa1ZYyo7WQpzoy1qtsL+3JoBwjsWqAXkPsioU/Z7a?= =?utf-8?q?+1J9Sck0zVjykb44ZjECWgfFO2c8xwj+yw=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?zStpXw4wmZL5TjbpwY+65RJBolSI?= =?utf-8?q?7/WqXkryx2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JFHYZKAj9pyd1DaD3EJs2jrfpPAZaweHOtgMttuD9wO4BvawmLl?= =?utf-8?q?x6zpWasfyqUR9nFFXZMMjpCH41syxeVw4i4tVUJga4TdLWB3LP2Z+MAh0pXXtloYD?= =?utf-8?q?PYPwNNqrFKbbgW1CuNn+2XV+E66zoZE/dKPE+hvt3tDvV7kuoQiAtPkp+J4frZ0Qy?= =?utf-8?q?3bvBGpvu9/Suin191BLiCEFEqR8jaQd9sQtA+I9q+vIKZrHUar5Ig94TlvAdrKd6d?= =?utf-8?q?tkf9GD1hogzpyInSc7mfvRW2nrZJzsOqNk4OLvQp+PGL6tV93ZRhDA4R+GFO9Cwi3?= =?utf-8?q?uo7Yd45dz2Nub8aL0XSVH8GmSYNEbYvyLZm7SszZTJB2EOZZqyJwX6D7jijzYJd1R?= =?utf-8?q?Ra7/M45htkFcTqkc/CE4/HlqOzR/qQFtUeZ3xFN+TckzXtYw1zy6raiXP5p25C6L+?= =?utf-8?q?UqiNh1XG916q5paB7S2xULLDLPhnjkumeESFGWq5cEMUpEBk0cXuev8/OXeVrWMHM?= =?utf-8?q?9BNT5czheG/mfzbISUXxvkzsU+8Cc+T8JR/so/Vn+Y7MyMagmJr7ujry+egKyLhC7?= =?utf-8?q?JmqET+tUJLvAXQv8eYC7rsAZ4njZuCu3aaQ2KNuyh7xqaEv6pCePTK7FX0qrrzqPo?= =?utf-8?q?5DNGmz7lv8ir?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b14d999a-0810-4ff4-5b24-08dcc06850bb X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2024 16:02:24.4231 (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: xYU9coy+HAgHcXCC+F4uEFkCtNxVidEk6kKlvkuQYtNtGg+iS2ACdMGCg1GC46hlTXvk3YtdxnQ8Dk2nc8pmvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9659 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240819_090241_474895_7EF3BE34 X-CRM114-Status: GOOD ( 13.84 ) X-BeenThere: linux-i3c@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-i3c.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-i3c>, <mailto:linux-i3c-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-i3c/> List-Post: <mailto:linux-i3c@lists.infradead.org> List-Help: <mailto:linux-i3c-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-i3c>, <mailto:linux-i3c-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-i3c" <linux-i3c-bounces@lists.infradead.org> Errors-To: linux-i3c-bounces+linux-i3c=archiver.kernel.org@lists.infradead.org |
Series |
i3c: master: some fix and improvemnt for hotjoin
|
expand
|
Hi Frank, Frank.Li@nxp.com wrote on Mon, 19 Aug 2024 12:02:01 -0400: > When the address is arbitrated at send address, the hardware can auto-send > NACK if it is an IBI. However, manual emission of NACK/ACK is needed for > hot join or controller request events. > > Add help function svc_i3c_master_handle_ibi_won() to check event type and > send out NACK if the event is not an IBI. > > Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Thanks, Miquèl
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c index 5d19251238ff8..d665639523e3c 100644 --- a/drivers/i3c/master/svc-i3c-master.c +++ b/drivers/i3c/master/svc-i3c-master.c @@ -405,6 +405,24 @@ static void svc_i3c_master_nack_ibi(struct svc_i3c_master *master) master->regs + SVC_I3C_MCTRL); } +static int svc_i3c_master_handle_ibi_won(struct svc_i3c_master *master, u32 mstatus) +{ + u32 ibitype; + + ibitype = SVC_I3C_MSTATUS_IBITYPE(mstatus); + + writel(SVC_I3C_MINT_IBIWON, master->regs + SVC_I3C_MSTATUS); + + /* Hardware can't auto emit NACK for hot join and master request */ + switch (ibitype) { + case SVC_I3C_MSTATUS_IBITYPE_HOT_JOIN: + case SVC_I3C_MSTATUS_IBITYPE_MASTER_REQUEST: + svc_i3c_master_nack_ibi(master); + } + + return 0; +} + static void svc_i3c_master_ibi_work(struct work_struct *work) { struct svc_i3c_master *master = container_of(work, struct svc_i3c_master, ibi_work); @@ -1113,7 +1131,7 @@ static int svc_i3c_master_xfer(struct svc_i3c_master *master, * start. */ if (SVC_I3C_MSTATUS_IBIWON(reg)) { - writel(SVC_I3C_MINT_IBIWON, master->regs + SVC_I3C_MSTATUS); + svc_i3c_master_handle_ibi_won(master, reg); continue; }
When the address is arbitrated at send address, the hardware can auto-send NACK if it is an IBI. However, manual emission of NACK/ACK is needed for hot join or controller request events. Add help function svc_i3c_master_handle_ibi_won() to check event type and send out NACK if the event is not an IBI. Signed-off-by: Frank Li <Frank.Li@nxp.com> --- drivers/i3c/master/svc-i3c-master.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)