From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759079Ab2CHX0N (ORCPT ); Thu, 8 Mar 2012 18:26:13 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:42994 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753165Ab2CHX0L (ORCPT ); Thu, 8 Mar 2012 18:26:11 -0500 Date: Fri, 9 Mar 2012 00:25:49 +0100 From: Sascha Hauer To: "Turquette, Mike" , Andrew Lunn , Paul Walmsley , linaro-dev@lists.linaro.org, Linus Walleij , patches@linaro.org, Stephen Boyd , Mark Brown , Magnus Damm , linux-kernel@vger.kernel.org, Rob Herring , Richard Zhao , Grant Likely , Deepak Saxena , Saravana Kannan , Thomas Gleixner , Shawn Guo , Amit Kucheria , Russell King , Jeremy Kerr , Arnd Bergman , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v5 3/4] clk: introduce the common clock framework Message-ID: <20120308232549.GU3852@pengutronix.de> References: <1330763341-3437-4-git-send-email-mturquette@linaro.org> <20120303133158.GA26882@pengutronix.de> <20120304115201.GB26882@pengutronix.de> <20120305073836.GU3852@pengutronix.de> <20120306190039.GJ3852@pengutronix.de> <20120308062739.GE18513@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120308062739.GE18513@lunn.ch> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 00:16:02 up 117 days, 7:03, 33 users, load average: 0.00, 0.01, 0.15 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 08, 2012 at 07:27:39AM +0100, Andrew Lunn wrote: > > Assuming that some day OMAP code can be refactored to allow for lazy > > (or at least initcall-based) registration of clocks then perhaps your > > suggestion can take root. Which leads me to this question: are there > > any other platforms out there that require the level of expose to > > struct clk present in this patchset? OMAP does, for now, but if that > > changes then I need to know if others require this as well. > > Hi Mike > > For kirkwood, i use static clk's for all but my root clock. I cannot > statically know the rate of the root clock, so i have to determine it > at boot time using heuristics, PCI ID, etc. > > I used statics thinking it would be less code. No idea if it actually > is, and there is nothing stopping me moving to creating the clocks > after creating the root clock. I'd say use the nonstatic ones. I think using the static initializers will cause us much pain in the future. I've been through several rebases on the i.MX clock rework and everytime I wish my sed foo would be better. Now imagine what happens when it turns out that the internal struct clk layout or the structs for the muxes/dividers/gates have to be changed. This task is next to impossible when we have thousands of clocks scattered around the tree. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |