Commit 787d8620 authored by Tony K Nadackal's avatar Tony K Nadackal Committed by Mauro Carvalho Chehab

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: default avatarTony K Nadackal <tony.kn@samsung.com>
Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 630dde63
......@@ -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);
......
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