[U-Boot] Clock tree in U-Boot

Eric Nelson eric.nelson at boundarydevices.com
Fri Apr 17 18:12:28 CEST 2015


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


More information about the U-Boot mailing list