Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3990526imu; Tue, 18 Dec 2018 07:25:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/XCCKrUDlRJFJ1jT7TETeqgat+deyQ/819nH7Gm3SboKSvrZ+yhuX8gZreQShP1v22aqkqM X-Received: by 2002:aa7:84d3:: with SMTP id x19mr1947965pfn.220.1545146734482; Tue, 18 Dec 2018 07:25:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545146734; cv=none; d=google.com; s=arc-20160816; b=IHXrJO28X//koLFkLOJfyahGSCEeboH524OwSDXlq9uHGclQz6GK3OaGYk0qV4ysDA 00du4gOdxO/6MFKJvLADCZaeEkGTOo0x2wJ0JWU8uPNM9L/fXAvo30v8exZzvS8xn0/n PJ423zdIL5XHwvsBnUUxczJoY6os4nrbBjpgFNeob/6nt5ASKY0oP9HP7LzHWgabZmnO 0vyj8bvMm7lFZKAGST3w4YlzRXXPlp8NIsiUkR0k0HVCJk2uKlQx3HK66H9Vn6Om9euB 6ZAWZk28J289/sAiwnq8QLHRacs2y54NROcr9ikeOlpR8xpYs532+Pm7iYmnhIp/Nbhg kItA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Y4el27VG3mIWmMs55MQGBbaKyCO/P4+47qjWu1dvR68=; b=SrJPGUicpMHMuGrlVALg5X9y/uQLDxggGds149ct+E4H/Bs+QoDdCaCgEFgxD+HwLJ rhia1LbPQhO9lw5o26+7UqO5+pizajF/ESZLZbpY20H+mrdsnFTBaj/GViPz+YhlN9h1 aBZjJ6FxfOAktDM6qFdrV/ZB8KzpSzbQL5lypLUMObZPPdb/H3XpUKCu6K2ON3IZ7b7r rzNrCcRyEPcn12/w1ptSy16s20vuB6bkWmGxjJhMhAMtVNnVGqt8JhEHOoj+7bYiDW69 nYCwfp6PlPPu/g8tMLI7HGDJu2Zmgx0MwqTfPgT/WXBtpfqdqIez4O2fvB1RbLHVIKEe grXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m32si13877316pld.86.2018.12.18.07.25.18; Tue, 18 Dec 2018 07:25:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726630AbeLRPXb (ORCPT + 99 others); Tue, 18 Dec 2018 10:23:31 -0500 Received: from mail.bootlin.com ([62.4.15.54]:34331 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbeLRPXa (ORCPT ); Tue, 18 Dec 2018 10:23:30 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 0BE86207B2; Tue, 18 Dec 2018 16:23:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost (aaubervilliers-681-1-38-38.w90-88.abo.wanadoo.fr [90.88.157.38]) by mail.bootlin.com (Postfix) with ESMTPSA id CBC8220CC9; Tue, 18 Dec 2018 16:23:17 +0100 (CET) Date: Tue, 18 Dec 2018 16:23:18 +0100 From: Maxime Ripard To: Jagan Teki Cc: Yong Deng , Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Chen-Yu Tsai , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi , linux-amarula@amarulasolutions.com, Michael Trimarchi Subject: Re: [PATCH v4 3/6] media: sun6i: Update default CSI_SCLK for A64 Message-ID: <20181218152318.duynff7f5m2gxtv4@flea> References: <20181218113320.4856-1-jagan@amarulasolutions.com> <20181218113320.4856-4-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4rtcmfm6g5qdxw5j" Content-Disposition: inline In-Reply-To: <20181218113320.4856-4-jagan@amarulasolutions.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --4rtcmfm6g5qdxw5j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 18, 2018 at 05:03:17PM +0530, Jagan Teki wrote: > Unfortunately A64 CSI cannot work with default CSI_SCLK rate. >=20 > A64 BSP is using 300MHz clock rate as default csi clock, > so sun6i_csi require explicit change to update CSI_SCLK > rate to 300MHZ for A64 SoC's. >=20 > So, set the clk_mod to 300MHz only for A64. >=20 > Signed-off-by: Jagan Teki > --- > drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers= /media/platform/sunxi/sun6i-csi/sun6i_csi.c > index 9ff61896e4bb..91470edf7581 100644 > --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c > +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c > @@ -822,6 +822,11 @@ static int sun6i_csi_resource_request(struct sun6i_c= si_dev *sdev, > return PTR_ERR(sdev->clk_mod); > } > =20 > + /* A64 require 300MHz mod clock to operate properly */ > + if (of_device_is_compatible(pdev->dev.of_node, > + "allwinner,sun50i-a64-csi")) > + clk_set_rate_exclusive(sdev->clk_mod, 300000000); > + If you're using clk_set_rate_exclusive, you need to put back the "exclusive" reference once you're not using the clock. Doing it here is not really optimal either, since you'll put a constraint on the system (maintaining that clock at 300MHz), while it's not in use. Maxime --=20 Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --4rtcmfm6g5qdxw5j Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXBkQ5gAKCRDj7w1vZxhR xQfnAQCLy8uWDrSK1eiEhduglmuwquW5pVDaaf80iBhg2iP3fgEAsk2H6EeHeTAD GBlKJX0bjUHXYyh9gM64c6P8PkuAxgk= =Uh0F -----END PGP SIGNATURE----- --4rtcmfm6g5qdxw5j--