Commit 5122f6a2 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[media] v4l: omap4iss: Enhance IRQ debugging

Add a pretty print function for ISP IRQs and remove the _INT suffix from
interrupt names to enhance readability.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 54d0059c
......@@ -197,43 +197,44 @@ void omap4iss_configure_bridge(struct iss_device *iss,
writel(isp5ctrl_val, iss->regs[OMAP4_ISS_MEM_ISP_SYS1] + ISP5_CTRL);
}
#if defined(DEBUG) && defined(ISS_ISR_DEBUG)
static inline void iss_isr_dbg(struct iss_device *iss, u32 irqstatus)
{
static const char *name[] = {
"ISP_IRQ0",
"ISP_IRQ1",
"ISP_IRQ2",
"ISP_IRQ3",
"CSIA_IRQ",
"CSIB_IRQ",
"CCP2_IRQ0",
"CCP2_IRQ1",
"CCP2_IRQ2",
"CCP2_IRQ3",
"CBUFF_IRQ",
"BTE_IRQ",
"SIMCOP_IRQ0",
"SIMCOP_IRQ1",
"SIMCOP_IRQ2",
"SIMCOP_IRQ3",
"CCP2_IRQ8",
"HS_VS_IRQ",
"res18",
"res19",
"res20",
"res21",
"res22",
"res23",
"res24",
"res25",
"res26",
"res27",
"res28",
"res29",
"res30",
"res31",
static const char * const name[] = {
"ISP_0",
"ISP_1",
"ISP_2",
"ISP_3",
"CSIA",
"CSIB",
"CCP2_0",
"CCP2_1",
"CCP2_2",
"CCP2_3",
"CBUFF",
"BTE",
"SIMCOP_0",
"SIMCOP_1",
"SIMCOP_2",
"SIMCOP_3",
"CCP2_8",
"HS_VS",
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30",
"31",
};
int i;
unsigned int i;
dev_dbg(iss->dev, "ISS IRQ: ");
......@@ -244,6 +245,54 @@ static inline void iss_isr_dbg(struct iss_device *iss, u32 irqstatus)
pr_cont("\n");
}
static inline void iss_isp_isr_dbg(struct iss_device *iss, u32 irqstatus)
{
static const char * const name[] = {
"ISIF_0",
"ISIF_1",
"ISIF_2",
"ISIF_3",
"IPIPEREQ",
"IPIPELAST_PIX",
"IPIPEDMA",
"IPIPEBSC",
"IPIPEHST",
"IPIPEIF",
"AEW",
"AF",
"H3A",
"RSZ_REG",
"RSZ_LAST_PIX",
"RSZ_DMA",
"RSZ_CYC_RZA",
"RSZ_CYC_RZB",
"RSZ_FIFO_OVF",
"RSZ_FIFO_IN_BLK_ERR",
"20",
"21",
"RSZ_EOF0",
"RSZ_EOF1",
"H3A_EOF",
"IPIPE_EOF",
"26",
"IPIPE_DPC_INI",
"IPIPE_DPC_RNEW0",
"IPIPE_DPC_RNEW1",
"30",
"OCP_ERR",
};
unsigned int i;
dev_dbg(iss->dev, "ISP IRQ: ");
for (i = 0; i < ARRAY_SIZE(name); i++) {
if ((1 << i) & irqstatus)
pr_cont("%s ", name[i]);
}
pr_cont("\n");
}
#endif
/*
* iss_isr - Interrupt Service Routine for ISS module.
* @irq: Not used currently.
......@@ -290,6 +339,10 @@ static irqreturn_t iss_isr(int irq, void *_iss)
if (isp_irqstatus & resizer_events)
omap4iss_resizer_isr(&iss->resizer,
isp_irqstatus & resizer_events);
#if defined(DEBUG) && defined(ISS_ISR_DEBUG)
iss_isp_isr_dbg(iss, isp_irqstatus);
#endif
}
omap4iss_flush(iss);
......
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