From patchwork Tue Aug 8 11:27:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Pietrasiewicz X-Patchwork-Id: 9887587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 859F3601EB for ; Tue, 8 Aug 2017 11:28:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77077287AB for ; Tue, 8 Aug 2017 11:28:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B74F287B1; Tue, 8 Aug 2017 11:28:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ED566287AB for ; Tue, 8 Aug 2017 11:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-reply-to:Message-id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=cmYpYFZLMIDGkZ0RyPCTjDDIxvoL0FOHN5yw/MlEl6M=; b=sf6MwQbd8YAbJCIWYESjCTmOHv eHvL1hWia8wog9TMy4SBnc/ORecpS2V0tQb4isQ5pOiPBHd7erOQKxC3X6KXeHABJdUUwmPDI8jyZ y1GTfE8yJEA1WA5gcbrrSGa2rsUxeVZW+dRegkWojpG2ZpJmXTepGj/QV2eml1pCPNdKJBtCIybGy nV15YlWmtCjOfh6H6JA4qLNExh812Asj7HFyV4N8Urs36sQ8hNy6WPZwp9YQsVhHtEFUf/x/aZCmS s+cOjT7cW29KpJLs2Dt9n13w5u978Vkhqy5kHjAUdTwXY+DKQvTuza9fMgTzzuEkyGeba+m+miamm DoVVvOZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1df2g8-0003WV-Pv; Tue, 08 Aug 2017 11:28:04 +0000 Received: from mailout3.w1.samsung.com ([210.118.77.13]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1df2fl-00034S-3p for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2017 11:27:42 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OUD0014F6HHNV70@mailout3.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 08 Aug 2017 12:27:17 +0100 (BST) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170808112717eucas1p200e8cb862e2afdd5e86d00f28b45d30c~Y21W8Osbh1819518195eucas1p2a; Tue, 8 Aug 2017 11:27:17 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 4B.24.12907.410A9895; Tue, 8 Aug 2017 12:27:16 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170808112716eucas1p27388118c826671edd88e79e68ceb7821~Y21WTfVxO2121221212eucas1p2d; Tue, 8 Aug 2017 11:27:16 +0000 (GMT) X-AuditID: cbfec7f1-f793a6d00000326b-db-5989a014030e Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 32.51.20118.410A9895; Tue, 8 Aug 2017 12:27:16 +0100 (BST) Received: from AMDC831.digital.local ([106.116.147.122]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OUD002SM6H90300@eusync1.samsung.com>; Tue, 08 Aug 2017 12:27:16 +0100 (BST) From: Andrzej Pietrasiewicz To: linux-samsung-soc@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/5] media: platform: s5p-jpeg: Clear JPEG_CODEC_ON bits in sw reset function Date: Tue, 08 Aug 2017 13:27:06 +0200 Message-id: <1502191628-11958-3-git-send-email-andrzej.p@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1502191628-11958-1-git-send-email-andrzej.p@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAIsWRmVeSWpSXmKPExsWy7djPc7oiCzojDQ4f1rWY9bKdxWLjjPWs Fre3bmCxOH9+A7vFpsfXWC16NmxltZhxfh+Txdojd9ktVj+rsOi/eonNgctjx90ljB47Z91l 99i0qpPNY/OSeo8t/UBe35ZVjB6fN8kFsEdx2aSk5mSWpRbp2yVwZSybfJyx4AlnxdudbewN jCs4uhg5OSQETCSmHJ3GBmGLSVy4tx7I5uIQEljKKPFmySlmCOczo8Txjn9MMB2r3x9ggkgs Y5Q4tqQbqqWBSWL9id/sIFVsAsYSew92MILYIgJZEqcnNYJ1MwtcYZL4uV4PxBYWiJf4sucD K4jNIqAqsfHvBLBeXgFXiZsvpzBDbJOTOHlsMlgNp4CbxMd7M9gh4v3sEi/3iHQxcgDZshKb DkCVu0hcPNYIVSIs8er4FihbRuLy5G4WkDslBCYzSmy4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VLzdFCgmkJ5akZqemFqQWwfQxcXBK NTCW3dxUeU52tk5DfZgpe+YBFvMrW9J+VWUsOf1v7cGAj8fzlnK6P0y/YXf2ZfN7+2eGn0Jz /H4yPY2OEE7n3sqQnMLkmpvebFq2flrtRB7TFy6RebYpXrPNuddqcOc+4XsosqChdmUMO4NY uqqjJYNg3Czeh13cgs/On8hrP/jgp8ED+zD5L0osxRmJhlrMRcWJAPX8ZsaUAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170808112716eucas1p27388118c826671edd88e79e68ceb7821 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?QW5kcnplaiBQaWV0cmFzaWV3aWN6G1NSUE9MLUtlcm5lbCAo?= =?UTF-8?B?VFApG+yCvOyEseyghOyekBtTZW5pb3IgU29mdHdhcmUgRW5naW5lZXI=?= X-Global-Sender: =?UTF-8?B?QW5kcnplaiBUb21hc3ogUGlldHJhc2lld2ljehtTUlBPTC1L?= =?UTF-8?B?ZXJuZWwgKFRQKRtTYW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2Fy?= =?UTF-8?B?ZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170808112716eucas1p27388118c826671edd88e79e68ceb7821 X-RootMTR: 20170808112716eucas1p27388118c826671edd88e79e68ceb7821 References: <1502191352-11595-1-git-send-email-andrzej.p@samsung.com> <1502191628-11958-1-git-send-email-andrzej.p@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170808_042741_315110_D7BFCE77 X-CRM114-Status: GOOD ( 12.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thierry Escande , Bartlomiej Zolnierkiewicz , Mauro Carvalho Chehab , Krzysztof Kozlowski , Jacek Anaszewski , Andrzej Pietrasiewicz , Marek Szyprowski MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tony K Nadackal 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 e.g. bootloader uses the codec and leaves it in a bad state. Signed-off-by: Tony K Nadackal [Updated commit message] Signed-off-by: Andrzej Pietrasiewicz --- drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c index c784033..c72789b 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);