[PATCH v6 2/3] clk: introduce the common clock framework
From: Rob Herring <hidden>
Date: 2012-03-13 21:48:08
Also in:
lkml
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 <redacted> Signed-off-by: Mike Turquette <redacted> Cc: Russell King <redacted> Cc: Jeremy Kerr <redacted> Cc: Thomas Gleixner <redacted> Cc: Arnd Bergman <redacted> Cc: Paul Walmsley <paul@pwsan.com> Cc: Shawn Guo <redacted> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Richard Zhao <redacted> Cc: Saravana Kannan <redacted> Cc: Magnus Damm <magnus.damm@gmail.com> Cc: Rob Herring <redacted> Cc: Mark Brown <redacted> Cc: Linus Walleij <redacted> Cc: Stephen Boyd <redacted> Cc: Amit Kucheria <redacted> Cc: Deepak Saxena <redacted> Cc: Grant Likely <redacted> Cc: Andrew Lunn <andrew@lunn.ch>
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