From mboxrd@z Thu Jan 1 00:00:00 1970 From: robherring2@gmail.com (Rob Herring) Date: Tue, 13 Mar 2012 16:48:00 -0500 Subject: [PATCH v6 2/3] clk: introduce the common clock framework In-Reply-To: <1331366064-1273-3-git-send-email-mturquette@linaro.org> References: <1331366064-1273-1-git-send-email-mturquette@linaro.org> <1331366064-1273-3-git-send-email-mturquette@linaro.org> Message-ID: <4F5FC090.90005@gmail.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Mike, On 03/10/2012 01:54 AM, Mike Turquette wrote: > The common clock framework defines a common struct clk useful across > most platforms as well as an implementation of the clk api that drivers > can use safely for managing clocks. > > The net result is consolidation of many different struct clk definitions > and platform-specific clock framework implementations. > > This patch introduces the common struct clk, struct clk_ops and an > implementation of the well-known clock api in include/clk/clk.h. > Platforms may define their own hardware-specific clock structure and > their own clock operation callbacks, so long as it wraps an instance of > struct clk_hw. > > See Documentation/clk.txt for more details. > > This patch is based on the work of Jeremy Kerr, which in turn was based > on the work of Ben Herrenschmidt. > > Signed-off-by: Mike Turquette > Signed-off-by: Mike Turquette > Cc: Russell King > Cc: Jeremy Kerr > Cc: Thomas Gleixner > Cc: Arnd Bergman > Cc: Paul Walmsley > Cc: Shawn Guo > Cc: Sascha Hauer > Cc: Richard Zhao > Cc: Saravana Kannan > Cc: Magnus Damm > Cc: Rob Herring > Cc: Mark Brown > Cc: Linus Walleij > Cc: Stephen Boyd > Cc: Amit Kucheria > Cc: Deepak Saxena > Cc: Grant Likely > Cc: Andrew Lunn snip > + > + /* > + * walk the list of orphan clocks and reparent any that are children of > + * this clock > + */ > + hlist_for_each_entry(orphan, tmp, &clk_orphan_list, child_node) In __clk_init, this needs to be hlist_for_each_entry_safe as entries can be removed. Rob