浏览代码

media: s5p-jpeg: Clear JPEG_CODEC_ON bits in sw reset function

Bits EXYNOS4_DEC_MODE and EXYNOS4_ENC_MODE do not get cleared
on software reset. These bits need to be cleared explicitly.

Even though the bits in question are already cleared in interrupt
service routine, the reset should also clear them in case when
e.g. bootloader uses the codec and leaves it in a bad state.

[Updated commit message]

Signed-off-by: Tony K Nadackal <tony.kn@samsung.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Tony K Nadackal 8 年之前
父节点
当前提交
787d862091
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c

+ 4 - 0
drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c

@@ -20,6 +20,10 @@ void exynos4_jpeg_sw_reset(void __iomem *base)
 {
 	unsigned int reg;
 
+	reg = readl(base + EXYNOS4_JPEG_CNTL_REG);
+	writel(reg & ~(EXYNOS4_DEC_MODE | EXYNOS4_ENC_MODE),
+				base + EXYNOS4_JPEG_CNTL_REG);
+
 	reg = readl(base + EXYNOS4_JPEG_CNTL_REG);
 	writel(reg & ~EXYNOS4_SOFT_RESET_HI, base + EXYNOS4_JPEG_CNTL_REG);