From patchwork Tue Feb 27 17:32:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 10245845 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 135D060384 for ; Tue, 27 Feb 2018 17:33:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03CC828A12 for ; Tue, 27 Feb 2018 17:33:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC82128A14; Tue, 27 Feb 2018 17:33:10 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1290C28A1A for ; Tue, 27 Feb 2018 17:33:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751729AbeB0RdG (ORCPT ); Tue, 27 Feb 2018 12:33:06 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:59827 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751540AbeB0RdC (ORCPT ); Tue, 27 Feb 2018 12:33:02 -0500 Received: from w540.lan (unknown [IPv6:2001:b07:2e0:f265:b1a6:a124:afcf:59d5]) (Authenticated sender: jacopo@jmondi.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B8EAAC5A69; Tue, 27 Feb 2018 18:32:59 +0100 (CET) From: Jacopo Mondi To: mchehab@kernel.org, laurent.pinchart@ideasonboard.com, hverkuil@xs4all.nl Cc: Jacopo Mondi , dylan.laduranty@mesotic.com, linux-media@vger.kernel.org Subject: [PATCH] media: platform: renesas-ceu: Fix CSTRST_CPON mask Date: Tue, 27 Feb 2018 18:32:52 +0100 Message-Id: <1519752772-1583-1-git-send-email-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.7.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The CSTRST_CPON mask was wrongly assigned to BIT(1) instead of BIT(0). Fix that by changing the mask opportunely. Reported-by: Dylan Laduranty Signed-off-by: Jacopo Mondi --- Mauro: could you please pick up this patch since you already applied the CEU series to your tree if I'm not wrong? Laurent, in this email exchange: https://www.mail-archive.com/linux-media@vger.kernel.org/msg123779.html you asked me to measure the number of cycles required to fully reset the interface in order to quantify the proper delay loops. I was testing this using the wrong bit, and I always got 0, and I assumed 1usec was enough. Good news is that I re-tested this on SH and RZ and I still have 0, so no driver change is required apart from the bitmask one \o/ --- drivers/media/platform/renesas-ceu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/media/platform/renesas-ceu.c b/drivers/media/platform/renesas-ceu.c index cfabe1a..c7d3659 100644 --- a/drivers/media/platform/renesas-ceu.c +++ b/drivers/media/platform/renesas-ceu.c @@ -95,7 +95,7 @@ /* CEU operating flag bit. */ #define CEU_CAPCR_CTNCP BIT(16) -#define CEU_CSTRST_CPTON BIT(1) +#define CEU_CSTRST_CPTON BIT(0) /* Platform specific IRQ source flags. */ #define CEU_CETCR_ALL_IRQS_RZ 0x397f313