Skip to content

Commit 1020139

Browse files
aspeeddylanalexandrebelloni
authored andcommitted
i3c: dw: Disable IBI IRQ depends on hot-join and SIR enabling
Disable IBI IRQ signal and status only when hot-join and SIR enabling of all target devices attached to the bus are disabled. Fixes: e389b1d ("i3c: dw: Add support for in-band interrupts") Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com> Link: https://lore.kernel.org/r/20240119054547.983693-1-dylan_hung@aspeedtech.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent cb0a395 commit 1020139

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/i3c/master/dw-i3c-master.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1163,8 +1163,10 @@ static void dw_i3c_master_set_sir_enabled(struct dw_i3c_master *master,
11631163
global = reg == 0xffffffff;
11641164
reg &= ~BIT(idx);
11651165
} else {
1166-
global = reg == 0;
1166+
bool hj_rejected = !!(readl(master->regs + DEVICE_CTRL) & DEV_CTRL_HOT_JOIN_NACK);
1167+
11671168
reg |= BIT(idx);
1169+
global = (reg == 0xffffffff) && hj_rejected;
11681170
}
11691171
writel(reg, master->regs + IBI_SIR_REQ_REJECT);
11701172

0 commit comments

Comments
 (0)