Skip to content

Commit 6a12f56

Browse files
nxpfranklialexandrebelloni
authored andcommitted
i3c: master: svc: need check IBIWON for dynamic address assignment
When sending REQUEST_PROC_DAA, emit START and address 7E. Address arbitration may occur at this time if other devices trigger HJ, IBI, or CR events. When IBIWON happen during a REQUEST_PROC_DAA, NACK the IBI request then send a repeated start to continue current dynamic address assignment. Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20241002-svc-i3c-hj-v6-3-7e6e1d3569ae@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent e22405a commit 6a12f56

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/i3c/master/svc-i3c-master.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,9 @@ static int svc_i3c_master_do_daa_locked(struct svc_i3c_master *master,
872872
int ret, i;
873873

874874
while (true) {
875+
/* clean SVC_I3C_MINT_IBIWON w1c bits */
876+
writel(SVC_I3C_MINT_IBIWON, master->regs + SVC_I3C_MSTATUS);
877+
875878
/* SVC_I3C_MCTRL_REQUEST_PROC_DAA have two mode, ENTER DAA or PROCESS DAA.
876879
*
877880
* ENTER DAA:
@@ -923,6 +926,9 @@ static int svc_i3c_master_do_daa_locked(struct svc_i3c_master *master,
923926
ret = svc_i3c_master_readb(master, data, 2);
924927
if (ret)
925928
break;
929+
} else if (SVC_I3C_MSTATUS_IBIWON(reg)) {
930+
svc_i3c_master_handle_ibi_won(master, reg);
931+
continue;
926932
} else if (SVC_I3C_MSTATUS_MCTRLDONE(reg)) {
927933
if (SVC_I3C_MSTATUS_STATE_IDLE(reg) &&
928934
SVC_I3C_MSTATUS_COMPLETE(reg)) {

0 commit comments

Comments
 (0)