linux-i3c.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/4] i3c: mipi-i3c-hci: Allow only relevant INTR_STATUS bit updates
@ 2025-03-12 11:10 Jarkko Nikula
  2025-03-12 11:10 ` [PATCH v2 2/4] i3c: mipi-i3c-hci: Fix handling status of i3c_hci_irq_handler() Jarkko Nikula
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jarkko Nikula @ 2025-03-12 11:10 UTC (permalink / raw)
  To: linux-i3c; +Cc: Alexandre Belloni, Frank Li, Jarkko Nikula

Since MIPI I3C HCI specification version v0.8 INTR_STATUS bits 9:0 are
reserved. Version v0.5 has bits 9 and 5:0 in use but not handled by the
current driver code and not needed in DMA transfers.

PIO transfers with v0.5 would require changes to both
core.c: i3c_hci_irq_handler() and pio.c: hci_pio_irq_handler() though.

For these reasons don't enable signal updates from INTR_STATUS bits 9:0.

This change gets rid of "unexpected INTR_STATUS" on old v0.5 IP version
and is a no-op for later versions starting from v0.8.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
v2: Simplified the last sentence according to Frank Li's suggestion.
---
 drivers/i3c/master/mipi-i3c-hci/core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
index a71226d7ca59..e139d7e4d252 100644
--- a/drivers/i3c/master/mipi-i3c-hci/core.c
+++ b/drivers/i3c/master/mipi-i3c-hci/core.c
@@ -699,9 +699,10 @@ static int i3c_hci_init(struct i3c_hci *hci)
 	if (ret)
 		return -ENXIO;
 
-	/* Disable all interrupts and allow all signal updates */
+	/* Disable all interrupts */
 	reg_write(INTR_SIGNAL_ENABLE, 0x0);
-	reg_write(INTR_STATUS_ENABLE, 0xffffffff);
+	/* Allow signal updates relevant to IP versions 0.8 and beyond */
+	reg_write(INTR_STATUS_ENABLE, GENMASK(31, 10));
 
 	/* Make sure our data ordering fits the host's */
 	regval = reg_read(HC_CONTROL);
-- 
2.47.2


-- 
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-03-12 16:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12 11:10 [PATCH v2 1/4] i3c: mipi-i3c-hci: Allow only relevant INTR_STATUS bit updates Jarkko Nikula
2025-03-12 11:10 ` [PATCH v2 2/4] i3c: mipi-i3c-hci: Fix handling status of i3c_hci_irq_handler() Jarkko Nikula
2025-03-12 16:26   ` Frank Li
2025-03-12 11:10 ` [PATCH v2 3/4] i3c: mipi-i3c-hci: Change name of INTR_STATUS bit 11 Jarkko Nikula
2025-03-12 16:24   ` Frank Li
2025-03-12 11:10 ` [PATCH v2 4/4] i3c: mipi-i3c-hci: Move unexpected INTR_STATUS print before IO handler Jarkko Nikula
2025-03-12 14:42 ` [PATCH v2 1/4] i3c: mipi-i3c-hci: Allow only relevant INTR_STATUS bit updates Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).