From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Nelson Date: Fri, 17 Apr 2015 09:12:28 -0700 Subject: [U-Boot] Clock tree in U-Boot Message-ID: <553130EC.40504@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi all, Heiko's recent patch set [1] to control the LDB clock on i.MX5/6 boards makes it painfully obvious that some semblance of clock tree is needed, even if it starts off as a shell. We currently have routines declared in [2] that should be moved into a more common spot: void clk_enable(struct clk *clk); void clk_disable(struct clk *clk); u32 clk_get_rate(struct clk *clk); int clk_set_rate(struct clk *clk, unsigned long rate); long clk_round_rate(struct clk *clk, unsigned long rate); int clk_set_parent(struct clk *clk, struct clk *parent); int clk_get_usecount(struct clk *clk); struct clk *clk_get_parent(struct clk *clk); Can we get some agreement on a proper subset of [3] that's appropriate for use in U-Boot? My thought is that the list above, plus some form of clk_get() and/or clk_get_sys() would be a good start. Please advise, Eric [1] http://lists.denx.de/pipermail/u-boot/2015-April/thread.html#210677 [2] http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/video/ipu.h#l245 [3] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/clk.h?id=refs/tags/v4.0