On Fri, Aug 14, 2009 at 10:07:44PM +1000, Benjamin Herrenschmidt wrote: > My idea is that struct clock would contain function pointers for the > enable/disable/get_rate/ etc... methods
If you look at OMAP, doing that gets very expensive, both in terms of number of lines of code, size of structure and maintainence thereof. Neither does a 'clk_ops' structure containing all of the function pointers work either for OMAP (OMAP has such a structure just for enable and disable methods, of which there are about two or three to chose from, but the rounding, set_rate and propagation methods are per-clk. This balance seems to work well for OMAP.) FYI, there are 140 struct clk definitions for OMAP24xx, and 215 for OMAP34xx, all statically initialized. See arch/arm/mach-omap2/clock?4xx.h -- Russell King _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev