aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform/s5p-jpeg
diff options
context:
space:
mode:
authorTony K Nadackal2017-08-08 07:27:06 -0400
committerMauro Carvalho Chehab2017-08-20 08:01:45 -0400
commit787d8620912a42b32a72ef241b48466e63d3d266 (patch)
treea3cc93769de7705cb1afc46baa18d1407f2270ea /drivers/media/platform/s5p-jpeg
parent630dde63001dc62be7abcc54101a80209ad6ec38 (diff)
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>
Diffstat (limited to 'drivers/media/platform/s5p-jpeg')
-rw-r--r--drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c
index c78403368e5b..c72789bae6ed 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c
@@ -21,6 +21,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);
udelay(100);