Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-27 Thread Domenico Andreoli
Hi, On 09/22/2011 05:26 PM, Mike Turquette wrote: diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index 3530927..c53ed59 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -5,3 +5,6 @@ config CLKDEV_LOOKUP config HAVE_MACH_CLKDEV bool + +config GENERIC_CLK +

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-23 Thread Shawn Guo
Hi Mike, Some random comments/nits ... On Thu, Sep 22, 2011 at 03:26:56PM -0700, Mike Turquette wrote: +struct clk *clk_register(const struct clk_hw_ops *ops, struct clk_hw *hw, + const char *name) +{ + struct clk *clk; + + clk = kzalloc(sizeof(*clk), GFP_KERNEL); +

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-23 Thread Turquette, Mike
On Sun, Oct 23, 2011 at 5:55 AM, Shawn Guo shawn@freescale.com wrote: Hi Mike, Some random comments/nits ... Thanks for reviewing Shawn. Will roll changes into V3. Regards, Mike ___ linaro-dev mailing list linaro-dev@lists.linaro.org

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-21 Thread Richard Zhao
On Thu, Sep 22, 2011 at 03:26:56PM -0700, Mike Turquette wrote: +/* For USE_COMMON_STRUCT_CLK, these are provided in clk.c, but not exported + * through other headers; we don't want them used anywhere but here. */ +#ifdef CONFIG_USE_COMMON_STRUCT_CLK change to CONFIG_GENERIC_CLK? +extern int

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-17 Thread Richard Zhao
On Sun, Oct 16, 2011 at 07:55:21PM +0200, Sascha Hauer wrote: On Fri, Oct 14, 2011 at 06:32:33PM +0800, Richard Zhao wrote: On Fri, Oct 14, 2011 at 11:05:04AM +0100, Mark Brown wrote: On Fri, Oct 14, 2011 at 04:10:26PM +0800, Richard Zhao wrote: On Thu, Sep 22, 2011 at 03:26:56PM -0700,

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-17 Thread Mark Brown
On Mon, Oct 17, 2011 at 04:48:52PM +0800, Richard Zhao wrote: For example, devices that possible access to on-chip RAM, depend on OCRAM clock. On imx53, VPU depends on OCRAM clock, even when VPU does not use OCRAM. So if the VPU depends on OCRAM the VPU should be enabling the OCRAM clock.

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-17 Thread Richard Zhao
On Mon, Oct 17, 2011 at 10:20:28AM +0100, Mark Brown wrote: On Mon, Oct 17, 2011 at 04:48:52PM +0800, Richard Zhao wrote: For example, devices that possible access to on-chip RAM, depend on OCRAM clock. On imx53, VPU depends on OCRAM clock, even when VPU does not use OCRAM. So if the

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-17 Thread Sascha Hauer
On Mon, Oct 17, 2011 at 06:53:03PM +0800, Richard Zhao wrote: On Mon, Oct 17, 2011 at 10:20:28AM +0100, Mark Brown wrote: On Mon, Oct 17, 2011 at 04:48:52PM +0800, Richard Zhao wrote: For example, devices that possible access to on-chip RAM, depend on OCRAM clock. On imx53, VPU

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-17 Thread Russell King - ARM Linux
On Mon, Oct 17, 2011 at 01:05:39PM +0200, Sascha Hauer wrote: It's not a problem to associate multiple clocks to a device, we can do this now already. What a driver can't do now is give-me-all-clocks-I-need(dev), but this problem should not be solved at clock core level but at the clkdev

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-17 Thread Richard Zhao
On Sun, Oct 16, 2011 at 02:17:29PM -0700, Turquette, Mike wrote: On Fri, Oct 14, 2011 at 7:24 PM, Richard Zhao richard.z...@linaro.org wrote: On Fri, Oct 14, 2011 at 11:14:19AM -0700, Turquette, Mike wrote: On Thu, Sep 22, 2011 at 3:26 PM, Mike Turquette mturque...@ti.com wrote: unsigned

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-16 Thread Sascha Hauer
On Fri, Oct 14, 2011 at 06:32:33PM +0800, Richard Zhao wrote: On Fri, Oct 14, 2011 at 11:05:04AM +0100, Mark Brown wrote: On Fri, Oct 14, 2011 at 04:10:26PM +0800, Richard Zhao wrote: On Thu, Sep 22, 2011 at 03:26:56PM -0700, Mike Turquette wrote: snip essentially Mike's entire mail -

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-16 Thread Turquette, Mike
On Fri, Oct 14, 2011 at 7:24 PM, Richard Zhao richard.z...@linaro.org wrote: On Fri, Oct 14, 2011 at 11:14:19AM -0700, Turquette, Mike wrote: On Thu, Sep 22, 2011 at 3:26 PM, Mike Turquette mturque...@ti.com wrote: unsigned long omap_recalc_rate(struct clk_hw *hw) {         struct clk

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-14 Thread Richard Zhao
Hi Mike, On Thu, Sep 22, 2011 at 03:26:56PM -0700, Mike Turquette wrote: From: Jeremy Kerr jeremy.k...@canonical.com We currently have ~21 definitions of struct clk in the ARM architecture, each defined on a per-platform basis. This makes it difficult to define platform- (or architecture-)

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-14 Thread Mark Brown
On Fri, Oct 14, 2011 at 04:10:26PM +0800, Richard Zhao wrote: On Thu, Sep 22, 2011 at 03:26:56PM -0700, Mike Turquette wrote: snip essentially Mike's entire mail - *please* delete irrelevant quotes from your replies, it makes it very much easier to find the new text in your mail and is much more

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-14 Thread Richard Zhao
On Fri, Oct 14, 2011 at 11:05:04AM +0100, Mark Brown wrote: On Fri, Oct 14, 2011 at 04:10:26PM +0800, Richard Zhao wrote: On Thu, Sep 22, 2011 at 03:26:56PM -0700, Mike Turquette wrote: snip essentially Mike's entire mail - *please* delete irrelevant quotes from your replies, it makes it

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-14 Thread Turquette, Mike
On Thu, Sep 22, 2011 at 3:26 PM, Mike Turquette mturque...@ti.com wrote: From: Jeremy Kerr jeremy.k...@canonical.com  struct clk_hw_ops {        int             (*prepare)(struct clk_hw *);        void            (*unprepare)(struct clk_hw *);        int             (*enable)(struct clk_hw

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-14 Thread Richard Zhao
On Fri, Oct 14, 2011 at 11:14:19AM -0700, Turquette, Mike wrote: On Thu, Sep 22, 2011 at 3:26 PM, Mike Turquette mturque...@ti.com wrote: From: Jeremy Kerr jeremy.k...@canonical.com  struct clk_hw_ops {        int             (*prepare)(struct clk_hw *);        void            

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-14 Thread Richard Zhao
- When I define a clk array, I don't need to find another place to store .ops. ^ remove don't. sorry for that. ___ linaro-dev mailing list linaro-dev@lists.linaro.org

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-13 Thread Russell King - ARM Linux
On Thu, Sep 22, 2011 at 03:26:56PM -0700, Mike Turquette wrote: struct clk_hw_ops { int (*prepare)(struct clk_hw *); void(*unprepare)(struct clk_hw *); int (*enable)(struct clk_hw *); void(*disable)(struct clk_hw *);

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-13 Thread Turquette, Mike
On Thu, Oct 13, 2011 at 7:44 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Thu, Sep 22, 2011 at 03:26:56PM -0700, Mike Turquette wrote:   struct clk_hw_ops {       int             (*prepare)(struct clk_hw *);       void            (*unprepare)(struct clk_hw *);       int      

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-11 Thread Richard Zhao
On Thu, Sep 22, 2011 at 03:26:56PM -0700, Mike Turquette wrote: From: Jeremy Kerr jeremy.k...@canonical.com We currently have ~21 definitions of struct clk in the ARM architecture, each defined on a per-platform basis. This makes it difficult to define platform- (or architecture-)

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-06 Thread Saravana Kannan
On 09/22/2011 03:26 PM, Mike Turquette wrote: diff --git a/include/linux/clk.h b/include/linux/clk.h index 1d37f42..d6ae10b 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h +#ifdef CONFIG_GENERIC_CLK + +struct clk_hw { + struct clk *clk; +}; + +/** + * struct clk_hw_ops -

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-06 Thread Turquette, Mike
On Wed, Oct 5, 2011 at 6:17 PM, Saravana Kannan skan...@codeaurora.org wrote: On 09/22/2011 03:26 PM, Mike Turquette wrote: +       unsigned long   (*recalc_rate)(struct clk_hw *); +       long            (*round_rate)(struct clk_hw *, unsigned long); +       struct clk *    

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-04 Thread Grant Likely
On Mon, Oct 03, 2011 at 09:17:30AM -0500, Rob Herring wrote: On 09/22/2011 05:26 PM, Mike Turquette wrote: + /* Query the hardware for parent and initial rate */ + + if (clk-ops-get_parent) + /* We don't to lock against prepare/enable here, as +* the clock is

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-03 Thread Rob Herring
On 09/22/2011 05:26 PM, Mike Turquette wrote: From: Jeremy Kerr jeremy.k...@canonical.com We currently have ~21 definitions of struct clk in the ARM architecture, each defined on a per-platform basis. This makes it difficult to define platform- (or architecture-) independent clock sources

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-03 Thread Mark Brown
On Mon, Oct 03, 2011 at 09:17:30AM -0500, Rob Herring wrote: On 09/22/2011 05:26 PM, Mike Turquette wrote: A lot of stuff that should really have been cut plus... + if (clk-ops-get_parent) + /* We don't to lock against prepare/enable here, as +* the clock is not

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-03 Thread Rob Herring
On 10/03/2011 09:25 AM, Mark Brown wrote: On Mon, Oct 03, 2011 at 09:17:30AM -0500, Rob Herring wrote: On 09/22/2011 05:26 PM, Mike Turquette wrote: A lot of stuff that should really have been cut plus... + if (clk-ops-get_parent) + /* We don't to lock against prepare/enable

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-03 Thread Mark Brown
On Mon, Oct 03, 2011 at 10:24:52AM -0500, Rob Herring wrote: On 10/03/2011 09:25 AM, Mark Brown wrote: This isn't in any way specific to clocks, right now the likely solution looks to be Grant's changes for retrying probe() as new devices come on line. With that devices can return a code

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-03 Thread Russell King - ARM Linux
On Mon, Oct 03, 2011 at 05:31:08PM +0100, Mark Brown wrote: I dunno, I get the impression that some of this is due to the current limitations of the clock API rather than due to a lack of clocks - perhaps that's specific to the applications I look at, though. applications The clk API per-se

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-03 Thread Mark Brown
On Mon, Oct 03, 2011 at 05:43:09PM +0100, Russell King - ARM Linux wrote: On Mon, Oct 03, 2011 at 05:31:08PM +0100, Mark Brown wrote: [Not being many off-SoC clocks] I dunno, I get the impression that some of this is due to the current limitations of the clock API rather than due to a lack

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-10-03 Thread Turquette, Mike
On Mon, Oct 3, 2011 at 3:02 PM, Rob Herring robherri...@gmail.com wrote: Mike, On 09/22/2011 05:26 PM, Mike Turquette wrote: diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index 6db161f..e2a9719 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -23,6 +23,13 @@  

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-09-24 Thread Grant Likely
On Thu, Sep 22, 2011 at 03:26:56PM -0700, Mike Turquette wrote: From: Jeremy Kerr jeremy.k...@canonical.com We currently have ~21 definitions of struct clk in the ARM architecture, each defined on a per-platform basis. This makes it difficult to define platform- (or architecture-)

Re: [PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-09-24 Thread Turquette, Mike
On Sat, Sep 24, 2011 at 8:55 PM, Grant Likely grant.lik...@secretlab.ca wrote: On Thu, Sep 22, 2011 at 03:26:56PM -0700, Mike Turquette wrote: From: Jeremy Kerr jeremy.k...@canonical.com We currently have ~21 definitions of struct clk in the ARM architecture, each defined on a per-platform

[PATCH v2 1/7] clk: Add a generic clock infrastructure

2011-09-22 Thread Mike Turquette
From: Jeremy Kerr jeremy.k...@canonical.com We currently have ~21 definitions of struct clk in the ARM architecture, each defined on a per-platform basis. This makes it difficult to define platform- (or architecture-) independent clock sources without making assumptions about struct clk, and