Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6015468pxb; Mon, 14 Feb 2022 13:11:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJzD5tZHpUbetjcEPyWGteSNr3tpI6aZx3u/phO3jmr8kW9verLYzDtS4qYB5zePraslQAAj X-Received: by 2002:a17:902:7582:: with SMTP id j2mr671664pll.115.1644873068365; Mon, 14 Feb 2022 13:11:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644873068; cv=none; d=google.com; s=arc-20160816; b=J+RphRViV4siEmGi2pVy7reo5g+WcCbPtFzwPflJqOCqpiSDdzRvQ19PxSLc7xG1Cf JrdDh8TwS/pRpr3rxuhpTbegRs/0oHpdNAvRLJQzo88pN4Rhqrcy42i5+hQfUUWsI2Nn vWbqWyj9oskeP9W+sQP2z4/BtQoRJo/A14oKzazqBpegyfJJonFekdPxnBcsVcB9j0Eb keM0SYCHTaEW8UGtmlgHCqauhOCzgSBwY+tucnwLX5J1yzcpI8UwIC2vFoLziwL5JU+l LR9f1Ve0CTRSgKRxdERyfiHR2HwKcgFYhvkZlHBSGaL1PY5RvVJ12jtbVrd7vGz8PO0W unzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iR0DnAm+naioDN+7NLEJAyxKQJVi0YaO++XnNNDyWo8=; b=PbgC3gaUNMsNvmbVEeChmGmNrC3aEKepyzFbRaLCXTqblZpQk4lIWk5rTEE5eWGdAp TWiAoYNg7EY+DVI2+x8ahBQuih8tBTZvDGT5cJi9H3n8viKgKj9cPWY26mdqezBStnuj MjoUPlDv2Yugl2BrxwsGoze9Nhzq1HfbowWqewjpL4gywzU4ULDO/Mci4eobY1Db5CLf 8DGny1dLVVZsiaHK40n69OsiFfnEhE/nAr5bXrlSc+IhE8ea7WYiWkTC2NyHsKT81sJX 1NpP4b48vKq+nzKfUeqUYNQqystEdcOivhjM7znYCI5R7Us32l8JxSwRoZJ6Nch4XUKq l9Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BeuZItta; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l15si13444518pls.278.2022.02.14.13.11.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:11:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BeuZItta; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 75FDB211D4F; Mon, 14 Feb 2022 12:31:02 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356372AbiBNQbV (ORCPT + 99 others); Mon, 14 Feb 2022 11:31:21 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:39872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236701AbiBNQbU (ORCPT ); Mon, 14 Feb 2022 11:31:20 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A37960D89; Mon, 14 Feb 2022 08:31:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644856270; x=1676392270; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/rNAITY1+98uvbGAZzlsiQlo0IS/4Nq0dkDRoszUuaY=; b=BeuZIttaCaix2+ct0TPYPBEyQC5sz40+DMQIYdYcq/4mtdQyNYrnkGdS MnxTVBuM1PFfdiFlnmDoFkwN4S1toC6KZ/idsbmWMLTAx9P2pBmXpCnZ7 ixgqWiZTpCqNXmzNMZMd28GEoRVehuSM2aAoZmpYzXA7AnLB4ejo8iGmt 2FEAePObj3qo4z93ToQr1M/dNJ3Koz6l6qz9f8slVv5gyu3q+UDdtEndK S3JXn1YMGiL4k73rePaZtGy4mtRD+W1fzZnm7C29rHNWdDLnVrJr+oV7I 4pQ5MpHlkOO9HH/2Gog18PSK/+oIMF2XUhRMGa/zg3BJquZbsZUbwv4e5 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10258"; a="250071302" X-IronPort-AV: E=Sophos;i="5.88,368,1635231600"; d="scan'208";a="250071302" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2022 08:31:08 -0800 X-IronPort-AV: E=Sophos;i="5.88,368,1635231600"; d="scan'208";a="603341808" Received: from punajuuri.fi.intel.com (HELO paasikivi.fi.intel.com) ([10.237.72.43]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2022 08:31:04 -0800 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with SMTP id C7AE6201DB; Mon, 14 Feb 2022 18:31:01 +0200 (EET) Date: Mon, 14 Feb 2022 18:31:01 +0200 From: Sakari Ailus To: Paul Kocialkowski Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, linux-staging@lists.linux.dev, Yong Deng , Mauro Carvalho Chehab , Rob Herring , Maxime Ripard , Hans Verkuil , Chen-Yu Tsai , Jernej Skrabec , Greg Kroah-Hartman , Helen Koike , Laurent Pinchart , Thomas Petazzoni Subject: Re: [PATCH v2 21/66] media: sun6i-csi: Always set exclusive module clock rate Message-ID: References: <20220205185429.2278860-1-paul.kocialkowski@bootlin.com> <20220205185429.2278860-22-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220205185429.2278860-22-paul.kocialkowski@bootlin.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, Thanks for the patchbomb. On Sat, Feb 05, 2022 at 07:53:44PM +0100, Paul Kocialkowski wrote: > In some situations the default rate of the module clock is not the > required one for operation (for example when reconfiguring the clock > tree to use a different parent). As a result, always set the correct > rate for the clock (and take care of cleanup). > > Signed-off-by: Paul Kocialkowski > --- > .../platform/sunxi/sun6i-csi/sun6i_csi.c | 54 ++++++++++++++----- > 1 file changed, 41 insertions(+), 13 deletions(-) > > diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c > index 8155e9560164..2355088fdc37 100644 > --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c > +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c > @@ -856,28 +849,53 @@ static int sun6i_csi_resources_setup(struct sun6i_csi_device *csi_dev, > return PTR_ERR(csi_dev->clk_ram); > } > > + if (of_device_is_compatible(dev->of_node, "allwinner,sun50i-a64-csi")) > + clk_mod_rate = 300000000; > + else > + clk_mod_rate = 297000000; This would be nice to put in OF match data. Of course the driver did this already before the patch. The approach still scales badly. -- Regards, Sakari Ailus