Message ID | 20240829-i3c_fix-v4-7-ebcbd5efceba@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012066.outbound.protection.outlook.com [52.101.66.66]) (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 38B491BB6BB for <imx@lists.linux.dev>; Thu, 29 Aug 2024 21:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724966115; cv=fail; b=eDCP4IiSB8hstIRfamggJKMHW8j8qDCsZUVBlneo5GvHppvfThnSnYQDO37LEC1oxWhL3dXNm3wj0enf1Ss3JrBbDjuWk6vUECOCJMu4MFCz2icMe7BZP8otzIaJsZG7I128lRVZIxCcOw/4bLqwT9CM8raOLdV+yjLT1cDsRNE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724966115; c=relaxed/simple; bh=Abu8R9fjCyCOO6LsZNj8SF9ckbtApgfch6j5wEiJ3L0=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=s+i6e1Fe4RSpF+D6zJLs3g2b+BHBQlxp7IwsdfwPG77X1NN3ZfZ0lYTnAH6tORwW9Px9s9gKyYA+wc5tyzpFpIO2B6wStfy9mzUDC1ifT/7YHY3e31G7W9dulF+xhjVGy4g6P8Rx0Jrmh7L3eJI0Ib3HPvYKYOrY2l/nx6ICveg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=ZrEPAsl3; arc=fail smtp.client-ip=52.101.66.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="ZrEPAsl3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YobVni+mq3poyw4AzlilK79ka+vFch4UMsAFfqnlU8WjXTE6tIDY0a1OUdnP9ORa26ZIyLMBFtRYKsM8YqFcrcIPLdP79ARB0Sfo76S09ngKKo3KdsVQlSSRq9XLyCG8Xk3UcJXUxrVH2kY0YcFUvPM8cziNU1FPwc8WE6qCvdPvwExEtfj8Qm9yuGAV7buqU17dFV4zdKg9j4xrSo789HmjEFZ9WS7bKBgWvkuwOjFLdVJWpvVJBwpoGFhVSy3QIMEbckdmzpZfwq0iXOY46xGvioxDlVdtOil+jtwZemczQ0l683ZbZHffnieSwgD3ihPS4oe5JkyaEVJ+ecjYng== 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=JGcdrxq3VsDXfDuenVX/J6JpFFtyfXUUfnacJFSh40Q=; b=qfmWNCUgCsEQrn03ksrdnguOeUVHHLbfMhEQynSyWKrVNcLqAhmCQOmoRGWLfqZxBOiUhCLneWgBhy5e06i1SiwPs8WZZtn9spF8cH4Ag/EbwSmf/4tDsmj7e8y9ragWmrNhiBagODuY1gjMhvbXr1XutcTDkArRrcVwipj23+hsn7COgWKMdFM5L20VoTcXWAXWBC4QNBUf2R8TldMcFsYA3U/Z+4Up+PzGWYB9YXW7/f3AzPXv86dz54NKooiVkjJVE+m+BoDJ4ynsgdyqoWQuOmOwupEpIQx4cy4Z2v9qz0WmUgHRmSs78Gn2RnqM44ybTfANqPnaEvmLkmCBPQ== 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=JGcdrxq3VsDXfDuenVX/J6JpFFtyfXUUfnacJFSh40Q=; b=ZrEPAsl3Wnb5VVCcyiimPy3atnJTMqZrHsLx3P6uiFa+YnSm/5TYGgA1ZYYrCZFzq0p8dB1RuEHjKFJvod1Vhl3RR1kpiqB7QRsPcbYZYKp0alyxg4vvr/J+yfmENGO/da42moc39t4s5A3wMFqfLx3mA5oWetBjGNgaMIC0Z+dJseb/xWG4mUXJAQROZBcZFKGfdxTbz6Cr5Rk+Z1srftYOl+9T+96aoBZaudDZSlufJ6K+drf0FTMD5px+yXqvyajlXpgB13j7w6cVZW8En5EMi9WGacBCSuZYCr1eqkln156oRnnePw2sZv7EZPT5m5YCTnkFVxHM6a7vAwDRkA== 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 AM9PR04MB8971.eurprd04.prod.outlook.com (2603:10a6:20b:40a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.20; Thu, 29 Aug 2024 21:15:09 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.7897.027; Thu, 29 Aug 2024 21:15:09 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Thu, 29 Aug 2024 17:14:04 -0400 Subject: [PATCH v4 07/11] i3c: master: svc: manually emit NACK/ACK for hotjoin Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240829-i3c_fix-v4-7-ebcbd5efceba@nxp.com> References: <20240829-i3c_fix-v4-0-ebcbd5efceba@nxp.com> In-Reply-To: <20240829-i3c_fix-v4-0-ebcbd5efceba@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=1724966083; l=1870; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=Abu8R9fjCyCOO6LsZNj8SF9ckbtApgfch6j5wEiJ3L0=; b=lNyY3IKUOLnuOh7Pz9pmkiRTkyrrKIcQYW38dRa4KN/3ICEhLIlwIyg4n6Rn+rraDgKgXEEKt yX5Auqk4+peAOMeBomHTz9hQvcEX1Qlh93x/U3mt3L1Nhr8loVKww9F X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0219.namprd13.prod.outlook.com (2603:10b6:a03:2c1::14) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: <imx.lists.linux.dev> List-Subscribe: <mailto:imx+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:imx+unsubscribe@lists.linux.dev> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AM9PR04MB8971:EE_ X-MS-Office365-Filtering-Correlation-Id: 72c58072-0607-436e-1a65-08dcc86fa963 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|376014|1800799024|52116014|7416014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Udv2byenybrXbjzwz1desHB6yXi60XK?= =?utf-8?q?N4bZ2vaxUE3U9aFGxUKptvZb5xFq0lq6i7bdjQCB87TN2+mS1f00wDvcTCjtSvhwS?= =?utf-8?q?WEBOuA/m//RBBNLptSp5DIPFmvqzrtjw0O+m9yp2l6feCuuegNZrU09+B3yC1h/cJ?= =?utf-8?q?Vw8EzXxcHDrtTCRfNjYLAqaQ0VyNxjkesFlW4UAMwUzllE2Up5CnJ7KSeXRrUtt12?= =?utf-8?q?ggRnrJJowUhdUvnO2FEmUpu4PgM2Vk3e0toP0jAe9JZC5ty5nT3IlKzUL4lL4fYKK?= =?utf-8?q?IZiTd5QLlQwCrnchrx+meoKw+wsOOp0s3oLM1DRv1Ne098qQxt20JvGg9kVVAv8SE?= =?utf-8?q?TkE6RvJo4krORTpnVs9daRdgPmErIZcdqh34THfgIGByiCRw9VxjRwY5Sz8MaS/0A?= =?utf-8?q?ogSWntFJOdLyKqVbjvlpNU3L0kRmfVtcRs69J8+ysET1mCj+pf7ej7eysiC1vRpnC?= =?utf-8?q?F2me6Vut/M4nvt4LhNfEtEdWMT3NtKKnRTv/XJ8WGR1xP9dMYwsG2G/C4tq/4E+KP?= =?utf-8?q?RzHuObdi8RcheSttZgX1EntuFbS4ydNYclfFwkDtvQzzVj8pBOkI9kcJm1YqTd3fT?= =?utf-8?q?kK0fpXmF6PE6ootr37Rg/lEdZnX4mTJHY2yw25vM7kJTfYCvdK1BNzOUnK5ZUSdbm?= =?utf-8?q?1ApGB2VQDIjZ191qFSCZMcsxHokK+p9cTfJfcV9OT0Yq+CXrw2MybkRSBzg7SLC6Z?= =?utf-8?q?ZqY+UnYowAyDhBK1Kqrnnv/MPB9WyU2hFMP1wlOByT8m1D3YY5rlUiR8vz9biCJwx?= =?utf-8?q?zmQcRHmbfpoiJtzjxLugvlMThlTb442tPeFJf+0QLnesi6aM7wE4qC4hEcQa/lw4X?= =?utf-8?q?XmQBKcrsR7OIlIChj7eHxY/AEWS6CqkQG3Lc+LBWE1O26qJTBVwqUQ5vG3xjiJ4M6?= =?utf-8?q?PUXeewIj1vwNHdc9iPKdH1HrfjLiqZOa6T7+JsPbW07kcwBReq6Eve1Y79l2cokVh?= =?utf-8?q?vpOBvZJUGgA/HyOiBWAKUFb4MuJFPZGZU1Vl38sHxjKWoQqb1C2hzhhZP8nfQieOb?= =?utf-8?q?zLizBIfQZ2bZsuleHIG+qqGJeSTZAlMPGzave+kIXXM6bJF1nlovGXh4z9nlqXS6W?= =?utf-8?q?mi29VkYQD+Hc8CwmUMIlVOTluJPrETEfSdrwIf3pAhZyq5QSamsyfiqIqObp8BSO/?= =?utf-8?q?QB7gJZ5Jrtve0mJebrvLXdJ6WMCKulmjEVSGzrIOD+GSiWRyXsO4p8QN3sXYsGz6g?= =?utf-8?q?oHcIASRmWhJOk8oOTaC1G2Ckcblr5NwMvtRxNXB0EhmJCMSXxUo/fPUyXVrHOHVkK?= =?utf-8?q?57g7uQbIlWrtZp1m8LUkrXhh7Pmb0ULZLU6ODc12ZPIM9FLICx0HE2Mw2qbEYXUbe?= =?utf-8?q?w0NHaimFAdEYunODSMvz3M8KGzlMkbpgjA=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)(376014)(1800799024)(52116014)(7416014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X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D/AqYzvENjiZjHFX1dapO12EVx8l1Fbj89otGdo+2Wm6w2EkO8bjjid?= =?utf-8?q?cI4xyOjZglvcUrREBFCKg+JoqONF2ELV91zUHgSQDGtKmCPnyLP/Lb+ebudCgI8Ef?= =?utf-8?q?7ak7Cz84JjeWzuTFaueQ+1twGpZblqp7I2cqpNW9STm3odz0fXpmZVzv6XzRT3HxD?= =?utf-8?q?Fd2R5vTYt+CzIwDra/VYwfWMm5OTLRUpGpZdPY1JFXsc893r4/bY69jcqIWLEuwiH?= =?utf-8?q?BoNuFDow1XTpOffBCl6ai10lm5fX1zD0e/mVCS2lnvQK4yKggSKf6sOOSukJD8pII?= =?utf-8?q?iEZOs5mmHE9zipPgevvgtXQviLJpKCbDWPL9cikZr8yjR9HgWWnoVbTDJYVzurdlV?= =?utf-8?q?pg+DvrcyBNpMAIlfAyqClPWS3cLjNPzg9qsQHYqkICiyofgCk5t5FSCPTuYPJZ4/H?= =?utf-8?q?XxagVsyM+bU8o1PFqMVg+W9xOcdHjgXImhokRb9XYyOH7dfU9a2TAZwBsPZ57ewcW?= =?utf-8?q?NRWoL9wbmDhr/bLOmgVUsJox8ppjgULOMsijYWDwvZlB7ZTPnTNZvlkADRg6OKbe7?= =?utf-8?q?3Tuy2HDXYj6UZfa9GfXWzIhLFCxKkTfVJ0W3qgCbY6vWjEIqaF56pdB9NmsVCdE9c?= =?utf-8?q?AnO2RDM6menXcpPQnSwCfVyHv67zjqAowh/R5Oa9EVDCqo/JgTSBTbY1s5SA36SU6?= =?utf-8?q?jn559o0hTw7x?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72c58072-0607-436e-1a65-08dcc86fa963 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2024 21:15:08.9330 (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: achJiPKrjX64lc3o/If3jodcW3eXBdJzi6lqSiNx8uSZ+tN4vcKUdrhroUx4e/70cX2Yt5oPjJFUZACiYrD0Eg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8971 |
Series |
i3c: master: some fix and improvemnt for hotjoin
|
expand
|
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c index ad999a1346686..122778b51c720 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; }