Commit 10201396 authored by Dylan Hung's avatar Dylan Hung Committed by Alexandre Belloni

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: e389b1d7 ("i3c: dw: Add support for in-band interrupts")
Signed-off-by: default avatarDylan Hung <dylan_hung@aspeedtech.com>
Link: https://lore.kernel.org/r/20240119054547.983693-1-dylan_hung@aspeedtech.comSigned-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent cb0a3955
...@@ -1163,8 +1163,10 @@ static void dw_i3c_master_set_sir_enabled(struct dw_i3c_master *master, ...@@ -1163,8 +1163,10 @@ static void dw_i3c_master_set_sir_enabled(struct dw_i3c_master *master,
global = reg == 0xffffffff; global = reg == 0xffffffff;
reg &= ~BIT(idx); reg &= ~BIT(idx);
} else { } else {
global = reg == 0; bool hj_rejected = !!(readl(master->regs + DEVICE_CTRL) & DEV_CTRL_HOT_JOIN_NACK);
reg |= BIT(idx); reg |= BIT(idx);
global = (reg == 0xffffffff) && hj_rejected;
} }
writel(reg, master->regs + IBI_SIR_REQ_REJECT); writel(reg, master->regs + IBI_SIR_REQ_REJECT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment