Skip to content

Commit fc09ffd

Browse files
jhnikulaalexandrebelloni
authored andcommitted
i3c: mipi-i3c-hci: Change interrupt status prints to dev_dbg()
Change interrupt status prints from local DBG() macro to dev_dbg() in order to make it easier to enable them without needing to recompile code with DEBUG defined. While doing so, spell out the status register names as they are in the specification to make it easier to differentiate between different interrupt status registers. Since dynamic debug prints can include the line number remove the "(in)" and "(out)" markers from the PIO interrupt status prints. Prefix the ring interrupt status print using "Ring %d" instead of "rh%d" to make it uniform across all other prints showing the ring number. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250827103009.243771-2-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent ec01115 commit fc09ffd

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ static irqreturn_t i3c_hci_irq_handler(int irq, void *dev_id)
553553

554554
val = reg_read(INTR_STATUS);
555555
reg_write(INTR_STATUS, val);
556-
DBG("INTR_STATUS = %#x", val);
556+
dev_dbg(&hci->master.dev, "INTR_STATUS %#x", val);
557557

558558
if (val)
559559
result = IRQ_HANDLED;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,8 @@ static bool hci_dma_irq_handler(struct i3c_hci *hci)
760760

761761
rh = &rings->headers[i];
762762
status = rh_reg_read(INTR_STATUS);
763-
DBG("rh%d status: %#x", i, status);
763+
dev_dbg(&hci->master.dev, "Ring %d: RH_INTR_STATUS %#x",
764+
i, status);
764765
if (!status)
765766
continue;
766767
rh_reg_write(INTR_STATUS, status);

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,8 @@ static bool hci_pio_irq_handler(struct i3c_hci *hci)
986986

987987
spin_lock(&pio->lock);
988988
status = pio_reg_read(INTR_STATUS);
989-
DBG("(in) status: %#x/%#x", status, pio->enabled_irqs);
989+
dev_dbg(&hci->master.dev, "PIO_INTR_STATUS %#x/%#x",
990+
status, pio->enabled_irqs);
990991
status &= pio->enabled_irqs | STAT_LATENCY_WARNINGS;
991992
if (!status) {
992993
spin_unlock(&pio->lock);
@@ -1023,8 +1024,8 @@ static bool hci_pio_irq_handler(struct i3c_hci *hci)
10231024
pio->enabled_irqs &= ~STAT_CMD_QUEUE_READY;
10241025

10251026
pio_reg_write(INTR_SIGNAL_ENABLE, pio->enabled_irqs);
1026-
DBG("(out) status: %#x/%#x",
1027-
pio_reg_read(INTR_STATUS), pio_reg_read(INTR_SIGNAL_ENABLE));
1027+
dev_dbg(&hci->master.dev, "PIO_INTR_STATUS %#x/%#x",
1028+
pio_reg_read(INTR_STATUS), pio_reg_read(INTR_SIGNAL_ENABLE));
10281029
spin_unlock(&pio->lock);
10291030
return true;
10301031
}

0 commit comments

Comments
 (0)