提交 c3720e65 编写于 作者: M Ming Qian 提交者: Hans Verkuil

media: imx-jpeg: Disable useless interrupt to avoid kernel panic

There is a hardware bug that the interrupt STMBUF_HALF may be triggered
after or when disable interrupt.
It may led to unexpected kernel panic.
And interrupt STMBUF_HALF and STMBUF_RTND have no other effect.
So disable them and the unused interrupts.

meanwhile clear the interrupt status when disable interrupt.
Signed-off-by: NMing Qian <ming.qian@nxp.com>
Reviewed-by: NMirela Rabulea <mirela.rabulea@nxp.com>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
上级 c76c2e92
...@@ -76,12 +76,14 @@ void print_wrapper_info(struct device *dev, void __iomem *reg) ...@@ -76,12 +76,14 @@ void print_wrapper_info(struct device *dev, void __iomem *reg)
void mxc_jpeg_enable_irq(void __iomem *reg, int slot) void mxc_jpeg_enable_irq(void __iomem *reg, int slot)
{ {
writel(0xFFFFFFFF, reg + MXC_SLOT_OFFSET(slot, SLOT_IRQ_EN)); writel(0xFFFFFFFF, reg + MXC_SLOT_OFFSET(slot, SLOT_STATUS));
writel(0xF0C, reg + MXC_SLOT_OFFSET(slot, SLOT_IRQ_EN));
} }
void mxc_jpeg_disable_irq(void __iomem *reg, int slot) void mxc_jpeg_disable_irq(void __iomem *reg, int slot)
{ {
writel(0x0, reg + MXC_SLOT_OFFSET(slot, SLOT_IRQ_EN)); writel(0x0, reg + MXC_SLOT_OFFSET(slot, SLOT_IRQ_EN));
writel(0xFFFFFFFF, reg + MXC_SLOT_OFFSET(slot, SLOT_STATUS));
} }
void mxc_jpeg_sw_reset(void __iomem *reg) void mxc_jpeg_sw_reset(void __iomem *reg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册