From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C23EC04AB6 for ; Tue, 28 May 2019 09:08:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F38D208CB for ; Tue, 28 May 2019 09:08:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726776AbfE1JIE (ORCPT ); Tue, 28 May 2019 05:08:04 -0400 Received: from shell.v3.sk ([90.176.6.54]:36875 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726628AbfE1JHz (ORCPT ); Tue, 28 May 2019 05:07:55 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 798481048A3; Tue, 28 May 2019 11:07:53 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Un6JU6auwMBf; Tue, 28 May 2019 11:07:38 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id D19CD1048A5; Tue, 28 May 2019 11:07:37 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2ZfBnQcYb63e; Tue, 28 May 2019 11:07:35 +0200 (CEST) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 7DBCA1048A1; Tue, 28 May 2019 11:07:34 +0200 (CEST) From: Lubomir Rintel To: Mauro Carvalho Chehab , Jonathan Corbet , linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Lubomir Rintel , Pavel Machek Subject: [PATCH v6 3/7] [media] marvell-ccic/mmp: enable clock before accessing registers Date: Tue, 28 May 2019 11:07:27 +0200 Message-Id: <20190528090731.10341-4-lkundrak@v3.sk> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190528090731.10341-1-lkundrak@v3.sk> References: <20190528090731.10341-1-lkundrak@v3.sk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The access to REG_CLKCTRL or REG_CTRL1 without the clock enabled hangs the machine. Enable the clock first. Signed-off-by: Lubomir Rintel Acked-by: Pavel Machek --- drivers/media/platform/marvell-ccic/mmp-driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c b/drivers/m= edia/platform/marvell-ccic/mmp-driver.c index a1b1d66e34cd..352e67fc1062 100644 --- a/drivers/media/platform/marvell-ccic/mmp-driver.c +++ b/drivers/media/platform/marvell-ccic/mmp-driver.c @@ -144,6 +144,7 @@ static int mmpcam_power_up(struct mcam_camera *mcam) * Turn on power and clocks to the controller. */ mmpcam_power_up_ctlr(cam); + mcam_clk_enable(mcam); /* * Provide power to the sensor. */ @@ -157,8 +158,6 @@ static int mmpcam_power_up(struct mcam_camera *mcam) gpio_set_value(pdata->sensor_reset_gpio, 1); /* reset is active low */ mdelay(5); =20 - mcam_clk_enable(mcam); - return 0; } =20 --=20 2.21.0