[PATCHv10 01/41] clk: add support for platform specific clock I/O wrapper functions

Paul Walmsley paul at pwsan.com
Tue Dec 17 22:33:53 EST 2013


On Tue, 17 Dec 2013, Paul Walmsley wrote:

> On Tue, 26 Nov 2013, Tero Kristo wrote:
> 
> > Current clock wrappers assume simple and direct mapped hardware register
> > access. Improve this support by adding functionality for registering
> > platform specific clock I/O wrappers, which can be used to support
> > various features needed like endianess conversions, indexed regmap support,
> > etc. Default I/O wrapper provided also which uses the existing direct
> > I/O mapped behavior.
> 
> I think it makes more sense to define per-SoC register read and write 
> functions,

Sorry, this should have read "per-IP block register read and write 
functions".

> for the same reason that I think it makes more sense to define clock 
> data as part of the IP blocks that contain the clocks' registers.  The 
> register read and write functions should be implemented by the drivers 
> for the IP blocks that the clocks are contained in.  That way the 
> register read and write functions can take whatever steps are necessary 
> to ensure that the IP block registers are accessible before performing 
> the read/write; can implement non-MMIO register accesses if needed; and 
> can operate on register offsets, rather than absolute addresses.
> 
> Something like the following draft implementation.  Also needed would be a 
> way for clock providers that rely on the common clock providers (e.g., 
> divider, mux, etc.) to pass in the struct clk_ll_ops pointer.  I guess the 
> simplest way to implement this would be to add another set of registration 
> functions - e.g., clk_register_divider_ipb() or clk_register_divider2() or 
> something similar.  These functions would be similar to 
> clk_register_divider(), but would take a pointer to a struct clk_ll_ops 
> and pass that along to the CCF core.


- Paul



More information about the linux-arm-kernel mailing list