[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20240724-i3c_fix-v1-7-bfa500b023d6@nxp.com>
Date: Wed, 24 Jul 2024 11:45:52 -0400
From: Frank Li <Frank.Li@....com>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>,
Boris Brezillon <boris.brezillon@...labora.com>,
Parshuram Thombare <pthombar@...ence.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Boris Brezillon <bbrezillon@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Conor Culhane <conor.culhane@...vaco.com>
Cc: linux-i3c@...ts.infradead.org, linux-kernel@...r.kernel.org,
Frank Li <Frank.Li@....com>
Subject: [PATCH 7/7] i3c: master: svc: manually emit NACK/ACK for hotjoin
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 an event type check to send out NACK if the event is not an IBI.
Signed-off-by: Frank Li <Frank.Li@....com>
---
drivers/i3c/master/svc-i3c-master.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index 5d19251238ff8..36e01d0430747 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -1113,7 +1113,15 @@ static int svc_i3c_master_xfer(struct svc_i3c_master *master,
* start.
*/
if (SVC_I3C_MSTATUS_IBIWON(reg)) {
+ int ibitype = SVC_I3C_MSTATUS_IBITYPE(reg);
+
writel(SVC_I3C_MINT_IBIWON, master->regs + SVC_I3C_MSTATUS);
+
+ /* Hardware can't auto emit NACK for hot join and master request */
+ if (ibitype == SVC_I3C_MSTATUS_IBITYPE_HOT_JOIN ||
+ ibitype == SVC_I3C_MSTATUS_IBITYPE_MASTER_REQUEST)
+ svc_i3c_master_nack_ibi(master);
+
continue;
}
--
2.34.1
Powered by blists - more mailing lists