Skip to content

Commit eeeec6c

Browse files
jhnikulaalexandrebelloni
authored andcommitted
i3c: mipi-i3c-hci: Allow only relevant INTR_STATUS bit updates
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. It allow to get rid of "unexpected INTR_STATUS" error messages on old v0.5 IP version and is a no-op for later versions starting from v0.8. Signed-off-by: Jarkko Nikula <[email protected]> Reviewed-by: Frank Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 0af2f6b commit eeeec6c

File tree

1 file changed

+7
-2
lines changed
  • drivers/i3c/master/mipi-i3c-hci

1 file changed

+7
-2
lines changed

drivers/i3c/master/mipi-i3c-hci/core.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,9 +699,14 @@ static int i3c_hci_init(struct i3c_hci *hci)
699699
if (ret)
700700
return -ENXIO;
701701

702-
/* Disable all interrupts and allow all signal updates */
702+
/* Disable all interrupts */
703703
reg_write(INTR_SIGNAL_ENABLE, 0x0);
704-
reg_write(INTR_STATUS_ENABLE, 0xffffffff);
704+
/*
705+
* Only allow bit 31:10 signal updates because
706+
* Bit 0:9 are reserved in IP version >= 0.8
707+
* Bit 0:5 are defined in IP version < 0.8 but not handled by PIO code
708+
*/
709+
reg_write(INTR_STATUS_ENABLE, GENMASK(31, 10));
705710

706711
/* Make sure our data ordering fits the host's */
707712
regval = reg_read(HC_CONTROL);

0 commit comments

Comments
 (0)