* [PATCH 0/7] clock/dpll autoidle support @ 2011-02-08 10:10 ` Rajendra Nayak 0 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-omap Cc: paul, b-cousson, khilman, santosh.shilimkar, linux-arm-kernel, Rajendra Nayak OMAP has various clock nodes and dpll's which support hardware level autoidle. Enabling hardware level autoidle provides better power savings without much software intervention. This series does the following to help enable hardware level autoidling using clock framework for some of these nodes on OMAP3 and OMAP4 -1- Adds support for providing function pointers for enabling/disabling autoidle in clkops -2- Populates these in clkops for all OMAP3/4 dplls -3- Enables all dpll autoidle late in boot on OMAP3 and OMAP4 -4- Adds support for mx postdivider autoidle (present only on OMAP4) and enables it late in OMAP4 boot Some of the patches in this series were earlier posted and discussed as part of another series here http://marc.info/?l=linux-omap&m=129681356402594&w=2 They are now posted as a seperate series as discussed here http://marc.info/?l=linux-omap&m=129713867702170&w=2 The patches are boot tested on OMAP3430sdp and OMAP4430sdp. The following changes since commit 100b33c8bd8a3235fd0b7948338d6cbb3db3c63d: Linus Torvalds (1): Linux 2.6.38-rc4 are available in the git repository at: git://gitorious.org/omap-pm/linux.git dpll-autoidle Rajendra Nayak (7): omap: clock: Check for enable/disable ops support omap3: dpll: Populate clkops for dpll1_ck omap: clock: Add allow_idle/deny_idle support in clkops omap: dpll: Add allow_idle/deny_idle support for all DPLL's omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot omap4: dpll: Add dpll api to control GATE_CTRL omap4: dpll: Enable auto gate control for all MX postdividers arch/arm/mach-omap2/clock.c | 25 ++++++++++++++--- arch/arm/mach-omap2/clock.h | 5 +++ arch/arm/mach-omap2/clock3xxx_data.c | 4 +- arch/arm/mach-omap2/clock44xx_data.c | 42 +++++++++++++++--------------- arch/arm/mach-omap2/dpll3xxx.c | 42 +++++++++++++++++++++++++++++++ arch/arm/mach-omap2/pm34xx.c | 18 +++---------- arch/arm/mach-omap2/pm44xx.c | 4 +++ arch/arm/plat-omap/clock.c | 26 +++++++++++++++++++ arch/arm/plat-omap/include/plat/clock.h | 6 ++++ 9 files changed, 130 insertions(+), 42 deletions(-) ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 0/7] clock/dpll autoidle support @ 2011-02-08 10:10 ` Rajendra Nayak 0 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-arm-kernel OMAP has various clock nodes and dpll's which support hardware level autoidle. Enabling hardware level autoidle provides better power savings without much software intervention. This series does the following to help enable hardware level autoidling using clock framework for some of these nodes on OMAP3 and OMAP4 -1- Adds support for providing function pointers for enabling/disabling autoidle in clkops -2- Populates these in clkops for all OMAP3/4 dplls -3- Enables all dpll autoidle late in boot on OMAP3 and OMAP4 -4- Adds support for mx postdivider autoidle (present only on OMAP4) and enables it late in OMAP4 boot Some of the patches in this series were earlier posted and discussed as part of another series here http://marc.info/?l=linux-omap&m=129681356402594&w=2 They are now posted as a seperate series as discussed here http://marc.info/?l=linux-omap&m=129713867702170&w=2 The patches are boot tested on OMAP3430sdp and OMAP4430sdp. The following changes since commit 100b33c8bd8a3235fd0b7948338d6cbb3db3c63d: Linus Torvalds (1): Linux 2.6.38-rc4 are available in the git repository at: git://gitorious.org/omap-pm/linux.git dpll-autoidle Rajendra Nayak (7): omap: clock: Check for enable/disable ops support omap3: dpll: Populate clkops for dpll1_ck omap: clock: Add allow_idle/deny_idle support in clkops omap: dpll: Add allow_idle/deny_idle support for all DPLL's omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot omap4: dpll: Add dpll api to control GATE_CTRL omap4: dpll: Enable auto gate control for all MX postdividers arch/arm/mach-omap2/clock.c | 25 ++++++++++++++--- arch/arm/mach-omap2/clock.h | 5 +++ arch/arm/mach-omap2/clock3xxx_data.c | 4 +- arch/arm/mach-omap2/clock44xx_data.c | 42 +++++++++++++++--------------- arch/arm/mach-omap2/dpll3xxx.c | 42 +++++++++++++++++++++++++++++++ arch/arm/mach-omap2/pm34xx.c | 18 +++---------- arch/arm/mach-omap2/pm44xx.c | 4 +++ arch/arm/plat-omap/clock.c | 26 +++++++++++++++++++ arch/arm/plat-omap/include/plat/clock.h | 6 ++++ 9 files changed, 130 insertions(+), 42 deletions(-) ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 1/7] omap: clock: Check for enable/disable ops support 2011-02-08 10:10 ` Rajendra Nayak @ 2011-02-08 10:10 ` Rajendra Nayak -1 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-omap Cc: paul, b-cousson, khilman, santosh.shilimkar, linux-arm-kernel, Rajendra Nayak Check if enable/disable operations are supported for a given clock node before attempting to call them. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/clock.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 2a2f152..e0f017d 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -261,7 +261,8 @@ void omap2_clk_disable(struct clk *clk) pr_debug("clock: %s: disabling in hardware\n", clk->name); - clk->ops->disable(clk); + if (clk->ops && clk->ops->disable) + clk->ops->disable(clk); if (clk->clkdm) omap2_clkdm_clk_disable(clk->clkdm, clk); @@ -312,10 +313,13 @@ int omap2_clk_enable(struct clk *clk) } } - ret = clk->ops->enable(clk); - if (ret) { - WARN(1, "clock: %s: could not enable: %d\n", clk->name, ret); - goto oce_err3; + if (clk->ops && clk->ops->enable) { + ret = clk->ops->enable(clk); + if (ret) { + WARN(1, "clock: %s: could not enable: %d\n", + clk->name, ret); + goto oce_err3; + } } return 0; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 1/7] omap: clock: Check for enable/disable ops support @ 2011-02-08 10:10 ` Rajendra Nayak 0 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-arm-kernel Check if enable/disable operations are supported for a given clock node before attempting to call them. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/clock.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 2a2f152..e0f017d 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -261,7 +261,8 @@ void omap2_clk_disable(struct clk *clk) pr_debug("clock: %s: disabling in hardware\n", clk->name); - clk->ops->disable(clk); + if (clk->ops && clk->ops->disable) + clk->ops->disable(clk); if (clk->clkdm) omap2_clkdm_clk_disable(clk->clkdm, clk); @@ -312,10 +313,13 @@ int omap2_clk_enable(struct clk *clk) } } - ret = clk->ops->enable(clk); - if (ret) { - WARN(1, "clock: %s: could not enable: %d\n", clk->name, ret); - goto oce_err3; + if (clk->ops && clk->ops->enable) { + ret = clk->ops->enable(clk); + if (ret) { + WARN(1, "clock: %s: could not enable: %d\n", + clk->name, ret); + goto oce_err3; + } } return 0; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 2/7] omap3: dpll: Populate clkops for dpll1_ck 2011-02-08 10:10 ` Rajendra Nayak @ 2011-02-08 10:10 ` Rajendra Nayak -1 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-omap Cc: paul, b-cousson, khilman, santosh.shilimkar, linux-arm-kernel, Rajendra Nayak DPLL1 on omap3 is very similar to the rest of the non-core dpll's. Hence populate clkops_omap3_noncore_dpll_ops as the clkops for it, instead of the currently populated clkops_null. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/clock3xxx_data.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 403a4a1..3e9d721 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c @@ -296,7 +296,7 @@ static struct dpll_data dpll1_dd = { static struct clk dpll1_ck = { .name = "dpll1_ck", - .ops = &clkops_null, + .ops = &clkops_omap3_noncore_dpll_ops, .parent = &sys_ck, .dpll_data = &dpll1_dd, .round_rate = &omap2_dpll_round_rate, -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 2/7] omap3: dpll: Populate clkops for dpll1_ck @ 2011-02-08 10:10 ` Rajendra Nayak 0 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-arm-kernel DPLL1 on omap3 is very similar to the rest of the non-core dpll's. Hence populate clkops_omap3_noncore_dpll_ops as the clkops for it, instead of the currently populated clkops_null. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/clock3xxx_data.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 403a4a1..3e9d721 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c @@ -296,7 +296,7 @@ static struct dpll_data dpll1_dd = { static struct clk dpll1_ck = { .name = "dpll1_ck", - .ops = &clkops_null, + .ops = &clkops_omap3_noncore_dpll_ops, .parent = &sys_ck, .dpll_data = &dpll1_dd, .round_rate = &omap2_dpll_round_rate, -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 3/7] omap: clock: Add allow_idle/deny_idle support in clkops 2011-02-08 10:10 ` Rajendra Nayak @ 2011-02-08 10:10 ` Rajendra Nayak -1 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-omap Cc: paul, b-cousson, khilman, santosh.shilimkar, linux-arm-kernel, Rajendra Nayak On OMAP various clock nodes (dpll's, mx post dividers, interface clocks) support hardware level autogating which can be controlled from software. Support such functionality by adding two new function pointer allow_idle and deny_idle in the clkops structure. These function pointers can be populated for any clock node which supports hardware level autogating. Also add 2 new functions (omap_clk_enable_auotidle and omap_clk_disable_autoidle) which can be called from architecture specific PM core code, if hardware level autogating (for all supported clock nodes) is to be enabled or disabled. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/plat-omap/clock.c | 26 ++++++++++++++++++++++++++ arch/arm/plat-omap/include/plat/clock.h | 6 ++++++ 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index fc62fb5..6889c5a 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c @@ -335,6 +335,32 @@ struct clk *omap_clk_get_by_name(const char *name) return ret; } +void omap_clk_enable_autoidle(void) +{ + struct clk *c; + + mutex_lock(&clocks_mutex); + + list_for_each_entry(c, &clocks, node) + if (c->ops->allow_idle) + c->ops->allow_idle(c); + + mutex_unlock(&clocks_mutex); +} + +void omap_clk_disable_autoidle(void) +{ + struct clk *c; + + mutex_lock(&clocks_mutex); + + list_for_each_entry(c, &clocks, node) + if (c->ops->deny_idle) + c->ops->deny_idle(c); + + mutex_unlock(&clocks_mutex); +} + /* * Low level helpers */ diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h index 8eb0ada..167f1e0 100644 --- a/arch/arm/plat-omap/include/plat/clock.h +++ b/arch/arm/plat-omap/include/plat/clock.h @@ -25,6 +25,8 @@ struct clockdomain; * @disable: fn ptr that enables the current clock in hardware * @find_idlest: function returning the IDLEST register for the clock's IP blk * @find_companion: function returning the "companion" clk reg for the clock + * @allow_idle: fn ptr that enables autoidle for the current clock in hardware + * @deny_idle: fn ptr that disables autoidle for the current clock in hardware * * A "companion" clk is an accompanying clock to the one being queried * that must be enabled for the IP module connected to the clock to @@ -42,6 +44,8 @@ struct clkops { u8 *, u8 *); void (*find_companion)(struct clk *, void __iomem **, u8 *); + void (*allow_idle)(struct clk *); + void (*deny_idle)(struct clk *); }; #ifdef CONFIG_ARCH_OMAP2PLUS @@ -292,6 +296,8 @@ extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table); extern void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table); #endif extern struct clk *omap_clk_get_by_name(const char *name); +extern void omap_clk_enable_autoidle(void); +extern void omap_clk_disable_autoidle(void); extern const struct clkops clkops_null; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 3/7] omap: clock: Add allow_idle/deny_idle support in clkops @ 2011-02-08 10:10 ` Rajendra Nayak 0 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-arm-kernel On OMAP various clock nodes (dpll's, mx post dividers, interface clocks) support hardware level autogating which can be controlled from software. Support such functionality by adding two new function pointer allow_idle and deny_idle in the clkops structure. These function pointers can be populated for any clock node which supports hardware level autogating. Also add 2 new functions (omap_clk_enable_auotidle and omap_clk_disable_autoidle) which can be called from architecture specific PM core code, if hardware level autogating (for all supported clock nodes) is to be enabled or disabled. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/plat-omap/clock.c | 26 ++++++++++++++++++++++++++ arch/arm/plat-omap/include/plat/clock.h | 6 ++++++ 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index fc62fb5..6889c5a 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c @@ -335,6 +335,32 @@ struct clk *omap_clk_get_by_name(const char *name) return ret; } +void omap_clk_enable_autoidle(void) +{ + struct clk *c; + + mutex_lock(&clocks_mutex); + + list_for_each_entry(c, &clocks, node) + if (c->ops->allow_idle) + c->ops->allow_idle(c); + + mutex_unlock(&clocks_mutex); +} + +void omap_clk_disable_autoidle(void) +{ + struct clk *c; + + mutex_lock(&clocks_mutex); + + list_for_each_entry(c, &clocks, node) + if (c->ops->deny_idle) + c->ops->deny_idle(c); + + mutex_unlock(&clocks_mutex); +} + /* * Low level helpers */ diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h index 8eb0ada..167f1e0 100644 --- a/arch/arm/plat-omap/include/plat/clock.h +++ b/arch/arm/plat-omap/include/plat/clock.h @@ -25,6 +25,8 @@ struct clockdomain; * @disable: fn ptr that enables the current clock in hardware * @find_idlest: function returning the IDLEST register for the clock's IP blk * @find_companion: function returning the "companion" clk reg for the clock + * @allow_idle: fn ptr that enables autoidle for the current clock in hardware + * @deny_idle: fn ptr that disables autoidle for the current clock in hardware * * A "companion" clk is an accompanying clock to the one being queried * that must be enabled for the IP module connected to the clock to @@ -42,6 +44,8 @@ struct clkops { u8 *, u8 *); void (*find_companion)(struct clk *, void __iomem **, u8 *); + void (*allow_idle)(struct clk *); + void (*deny_idle)(struct clk *); }; #ifdef CONFIG_ARCH_OMAP2PLUS @@ -292,6 +296,8 @@ extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table); extern void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table); #endif extern struct clk *omap_clk_get_by_name(const char *name); +extern void omap_clk_enable_autoidle(void); +extern void omap_clk_disable_autoidle(void); extern const struct clkops clkops_null; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 4/7] omap: dpll: Add allow_idle/deny_idle support for all DPLL's 2011-02-08 10:10 ` Rajendra Nayak @ 2011-02-08 10:10 ` Rajendra Nayak -1 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-omap Cc: paul, b-cousson, khilman, santosh.shilimkar, linux-arm-kernel, Rajendra Nayak All OMAP3/4 dpll's support hardware level autogating. Populate allow_idle/deny_idle function pointers for all DPLL's in clkops. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/clock.c | 8 +++++++- arch/arm/mach-omap2/clock.h | 1 + arch/arm/mach-omap2/clock3xxx_data.c | 2 +- arch/arm/mach-omap2/clock44xx_data.c | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index e0f017d..909e3c5 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -377,10 +377,16 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) const struct clkops clkops_omap3_noncore_dpll_ops = { .enable = omap3_noncore_dpll_enable, .disable = omap3_noncore_dpll_disable, + .allow_idle = omap3_dpll_allow_idle, + .deny_idle = omap3_dpll_deny_idle, }; -#endif +const struct clkops clkops_omap3_core_dpll_ops = { + .allow_idle = omap3_dpll_allow_idle, + .deny_idle = omap3_dpll_deny_idle, +}; +#endif /* * OMAP2+ clock reset and init functions diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 896584e..2a939e5 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -146,5 +146,6 @@ extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table) #endif extern const struct clkops clkops_omap3_noncore_dpll_ops; +extern const struct clkops clkops_omap3_core_dpll_ops; #endif diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 3e9d721..7cf89f8 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c @@ -429,7 +429,7 @@ static struct dpll_data dpll3_dd = { static struct clk dpll3_ck = { .name = "dpll3_ck", - .ops = &clkops_null, + .ops = &clkops_omap3_core_dpll_ops, .parent = &sys_ck, .dpll_data = &dpll3_dd, .round_rate = &omap2_dpll_round_rate, diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index de9ec8d..b843b6e 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c @@ -443,7 +443,7 @@ static struct clk dpll_core_ck = { .parent = &sys_clkin_ck, .dpll_data = &dpll_core_dd, .init = &omap2_init_dpll_parent, - .ops = &clkops_null, + .ops = &clkops_omap3_core_dpll_ops, .recalc = &omap3_dpll_recalc, }; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 4/7] omap: dpll: Add allow_idle/deny_idle support for all DPLL's @ 2011-02-08 10:10 ` Rajendra Nayak 0 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-arm-kernel All OMAP3/4 dpll's support hardware level autogating. Populate allow_idle/deny_idle function pointers for all DPLL's in clkops. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/clock.c | 8 +++++++- arch/arm/mach-omap2/clock.h | 1 + arch/arm/mach-omap2/clock3xxx_data.c | 2 +- arch/arm/mach-omap2/clock44xx_data.c | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index e0f017d..909e3c5 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -377,10 +377,16 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) const struct clkops clkops_omap3_noncore_dpll_ops = { .enable = omap3_noncore_dpll_enable, .disable = omap3_noncore_dpll_disable, + .allow_idle = omap3_dpll_allow_idle, + .deny_idle = omap3_dpll_deny_idle, }; -#endif +const struct clkops clkops_omap3_core_dpll_ops = { + .allow_idle = omap3_dpll_allow_idle, + .deny_idle = omap3_dpll_deny_idle, +}; +#endif /* * OMAP2+ clock reset and init functions diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 896584e..2a939e5 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -146,5 +146,6 @@ extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table) #endif extern const struct clkops clkops_omap3_noncore_dpll_ops; +extern const struct clkops clkops_omap3_core_dpll_ops; #endif diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 3e9d721..7cf89f8 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c @@ -429,7 +429,7 @@ static struct dpll_data dpll3_dd = { static struct clk dpll3_ck = { .name = "dpll3_ck", - .ops = &clkops_null, + .ops = &clkops_omap3_core_dpll_ops, .parent = &sys_ck, .dpll_data = &dpll3_dd, .round_rate = &omap2_dpll_round_rate, diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index de9ec8d..b843b6e 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c @@ -443,7 +443,7 @@ static struct clk dpll_core_ck = { .parent = &sys_clkin_ck, .dpll_data = &dpll_core_dd, .init = &omap2_init_dpll_parent, - .ops = &clkops_null, + .ops = &clkops_omap3_core_dpll_ops, .recalc = &omap3_dpll_recalc, }; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 5/7] omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot 2011-02-08 10:10 ` Rajendra Nayak @ 2011-02-08 10:10 ` Rajendra Nayak -1 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-omap Cc: paul, b-cousson, khilman, santosh.shilimkar, linux-arm-kernel, Rajendra Nayak Enable all dpll autoidle for OMAP4 and OMAP3 (OMAP3 already had dpll autoidle turned on, but was done using low level cm accessor apis). On OMAP3, replace the cm accessor apis doing this with the now available support for doing this in clock framework, using omap_clk_enable_autoidle(). Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/pm34xx.c | 18 ++++-------------- arch/arm/mach-omap2/pm44xx.c | 4 ++++ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 2f864e4..5a101fa 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -38,6 +38,7 @@ #include <plat/prcm.h> #include <plat/gpmc.h> #include <plat/dma.h> +#include <plat/clock.h> #include <asm/tlbflush.h> @@ -814,21 +815,10 @@ static void __init prcm_setup_regs(void) omap_ctrl_writel(OMAP3430_AUTOIDLE_MASK, OMAP2_CONTROL_SYSCONFIG); /* - * Set all plls to autoidle. This is needed until autoidle is - * enabled by clockfw + * Set all plls to autoidle. + * TODO: Add all the iclk autoidles in here as well. */ - omap2_cm_write_mod_reg(1 << OMAP3430_AUTO_IVA2_DPLL_SHIFT, - OMAP3430_IVA2_MOD, CM_AUTOIDLE2); - omap2_cm_write_mod_reg(1 << OMAP3430_AUTO_MPU_DPLL_SHIFT, - MPU_MOD, - CM_AUTOIDLE2); - omap2_cm_write_mod_reg((1 << OMAP3430_AUTO_PERIPH_DPLL_SHIFT) | - (1 << OMAP3430_AUTO_CORE_DPLL_SHIFT), - PLL_MOD, - CM_AUTOIDLE); - omap2_cm_write_mod_reg(1 << OMAP3430ES2_AUTO_PERIPH2_DPLL_SHIFT, - PLL_MOD, - CM_AUTOIDLE2); + omap_clk_enable_autoidle(); /* * Enable control of expternal oscillator through diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index 76cfff2..8431d41 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c @@ -15,6 +15,7 @@ #include <linux/list.h> #include <linux/err.h> #include <linux/slab.h> +#include <plat/clock.h> #include "powerdomain.h" #include <mach/omap4-common.h> @@ -111,6 +112,9 @@ static int __init omap4_pm_init(void) pr_err("Failed to setup powerdomains\n"); goto err2; } + + /* Enable autoidle for all clks which support it*/ + omap_clk_enable_autoidle(); #endif #ifdef CONFIG_SUSPEND -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 5/7] omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot @ 2011-02-08 10:10 ` Rajendra Nayak 0 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-arm-kernel Enable all dpll autoidle for OMAP4 and OMAP3 (OMAP3 already had dpll autoidle turned on, but was done using low level cm accessor apis). On OMAP3, replace the cm accessor apis doing this with the now available support for doing this in clock framework, using omap_clk_enable_autoidle(). Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/pm34xx.c | 18 ++++-------------- arch/arm/mach-omap2/pm44xx.c | 4 ++++ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 2f864e4..5a101fa 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -38,6 +38,7 @@ #include <plat/prcm.h> #include <plat/gpmc.h> #include <plat/dma.h> +#include <plat/clock.h> #include <asm/tlbflush.h> @@ -814,21 +815,10 @@ static void __init prcm_setup_regs(void) omap_ctrl_writel(OMAP3430_AUTOIDLE_MASK, OMAP2_CONTROL_SYSCONFIG); /* - * Set all plls to autoidle. This is needed until autoidle is - * enabled by clockfw + * Set all plls to autoidle. + * TODO: Add all the iclk autoidles in here as well. */ - omap2_cm_write_mod_reg(1 << OMAP3430_AUTO_IVA2_DPLL_SHIFT, - OMAP3430_IVA2_MOD, CM_AUTOIDLE2); - omap2_cm_write_mod_reg(1 << OMAP3430_AUTO_MPU_DPLL_SHIFT, - MPU_MOD, - CM_AUTOIDLE2); - omap2_cm_write_mod_reg((1 << OMAP3430_AUTO_PERIPH_DPLL_SHIFT) | - (1 << OMAP3430_AUTO_CORE_DPLL_SHIFT), - PLL_MOD, - CM_AUTOIDLE); - omap2_cm_write_mod_reg(1 << OMAP3430ES2_AUTO_PERIPH2_DPLL_SHIFT, - PLL_MOD, - CM_AUTOIDLE2); + omap_clk_enable_autoidle(); /* * Enable control of expternal oscillator through diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c index 76cfff2..8431d41 100644 --- a/arch/arm/mach-omap2/pm44xx.c +++ b/arch/arm/mach-omap2/pm44xx.c @@ -15,6 +15,7 @@ #include <linux/list.h> #include <linux/err.h> #include <linux/slab.h> +#include <plat/clock.h> #include "powerdomain.h" #include <mach/omap4-common.h> @@ -111,6 +112,9 @@ static int __init omap4_pm_init(void) pr_err("Failed to setup powerdomains\n"); goto err2; } + + /* Enable autoidle for all clks which support it*/ + omap_clk_enable_autoidle(); #endif #ifdef CONFIG_SUSPEND -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 6/7] omap4: dpll: Add dpll api to control GATE_CTRL 2011-02-08 10:10 ` Rajendra Nayak @ 2011-02-08 10:10 ` Rajendra Nayak -1 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-omap Cc: paul, b-cousson, khilman, santosh.shilimkar, linux-arm-kernel, Rajendra Nayak On OMAP4, the dpll post divider outputs (MX outputs) provide a way to allow/deny hardware level autogating. Allowing autoidle would mean that the hw would autogate this clock when there is no dependency for it. Denying idle would mean that this clock output will be forced to stay enabled. Add dpll api's to read/allow/deny idle control for these dpll mx postdividers. NOTE: The gatectrl bit set to 0 allows gatectrl, and the bit set to 1 denies gatectrl. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/clock.h | 3 ++ arch/arm/mach-omap2/dpll3xxx.c | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 2a939e5..c450d69 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -65,6 +65,9 @@ u32 omap3_dpll_autoidle_read(struct clk *clk); int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate); int omap3_noncore_dpll_enable(struct clk *clk); void omap3_noncore_dpll_disable(struct clk *clk); +int omap4_dpllmx_gatectrl_read(struct clk *clk); +void omap4_dpllmx_allow_gatectrl(struct clk *clk); +void omap4_dpllmx_deny_gatectrl(struct clk *clk); #ifdef CONFIG_OMAP_RESET_CLOCKS void omap2_clk_disable_unused(struct clk *clk); diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c index f77022b..4571e94 100644 --- a/arch/arm/mach-omap2/dpll3xxx.c +++ b/arch/arm/mach-omap2/dpll3xxx.c @@ -34,6 +34,7 @@ #include "clock.h" #include "cm2xxx_3xxx.h" #include "cm-regbits-34xx.h" +#include "cm-regbits-44xx.h" /* CM_AUTOIDLE_PLL*.AUTO_* bit values */ #define DPLL_AUTOIDLE_DISABLE 0x0 @@ -612,3 +613,44 @@ unsigned long omap3_clkoutx2_recalc(struct clk *clk) rate = clk->parent->rate * 2; return rate; } + +/* Supported only on OMAP4 */ +int omap4_dpllmx_gatectrl_read(struct clk *clk) +{ + u32 v; + + if (!clk || !clk->clksel_reg || !cpu_is_omap44xx()) + return -EINVAL; + + v = __raw_readl(clk->clksel_reg); + v &= OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK; + v >>= __ffs(OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK); + + return v; +} + +void omap4_dpllmx_allow_gatectrl(struct clk *clk) +{ + u32 v; + + if (!clk || !clk->clksel_reg || !cpu_is_omap44xx()) + return; + + v = __raw_readl(clk->clksel_reg); + /* Clear the bit to allow gatectrl */ + v &= ~OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK; + __raw_writel(v, clk->clksel_reg); +} + +void omap4_dpllmx_deny_gatectrl(struct clk *clk) +{ + u32 v; + + if (!clk || !clk->clksel_reg || !cpu_is_omap44xx()) + return; + + v = __raw_readl(clk->clksel_reg); + /* Set the bit to deny gatectrl */ + v |= OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK; + __raw_writel(v, clk->clksel_reg); +} -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 6/7] omap4: dpll: Add dpll api to control GATE_CTRL @ 2011-02-08 10:10 ` Rajendra Nayak 0 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-arm-kernel On OMAP4, the dpll post divider outputs (MX outputs) provide a way to allow/deny hardware level autogating. Allowing autoidle would mean that the hw would autogate this clock when there is no dependency for it. Denying idle would mean that this clock output will be forced to stay enabled. Add dpll api's to read/allow/deny idle control for these dpll mx postdividers. NOTE: The gatectrl bit set to 0 allows gatectrl, and the bit set to 1 denies gatectrl. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/clock.h | 3 ++ arch/arm/mach-omap2/dpll3xxx.c | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 2a939e5..c450d69 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -65,6 +65,9 @@ u32 omap3_dpll_autoidle_read(struct clk *clk); int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate); int omap3_noncore_dpll_enable(struct clk *clk); void omap3_noncore_dpll_disable(struct clk *clk); +int omap4_dpllmx_gatectrl_read(struct clk *clk); +void omap4_dpllmx_allow_gatectrl(struct clk *clk); +void omap4_dpllmx_deny_gatectrl(struct clk *clk); #ifdef CONFIG_OMAP_RESET_CLOCKS void omap2_clk_disable_unused(struct clk *clk); diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c index f77022b..4571e94 100644 --- a/arch/arm/mach-omap2/dpll3xxx.c +++ b/arch/arm/mach-omap2/dpll3xxx.c @@ -34,6 +34,7 @@ #include "clock.h" #include "cm2xxx_3xxx.h" #include "cm-regbits-34xx.h" +#include "cm-regbits-44xx.h" /* CM_AUTOIDLE_PLL*.AUTO_* bit values */ #define DPLL_AUTOIDLE_DISABLE 0x0 @@ -612,3 +613,44 @@ unsigned long omap3_clkoutx2_recalc(struct clk *clk) rate = clk->parent->rate * 2; return rate; } + +/* Supported only on OMAP4 */ +int omap4_dpllmx_gatectrl_read(struct clk *clk) +{ + u32 v; + + if (!clk || !clk->clksel_reg || !cpu_is_omap44xx()) + return -EINVAL; + + v = __raw_readl(clk->clksel_reg); + v &= OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK; + v >>= __ffs(OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK); + + return v; +} + +void omap4_dpllmx_allow_gatectrl(struct clk *clk) +{ + u32 v; + + if (!clk || !clk->clksel_reg || !cpu_is_omap44xx()) + return; + + v = __raw_readl(clk->clksel_reg); + /* Clear the bit to allow gatectrl */ + v &= ~OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK; + __raw_writel(v, clk->clksel_reg); +} + +void omap4_dpllmx_deny_gatectrl(struct clk *clk) +{ + u32 v; + + if (!clk || !clk->clksel_reg || !cpu_is_omap44xx()) + return; + + v = __raw_readl(clk->clksel_reg); + /* Set the bit to deny gatectrl */ + v |= OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK; + __raw_writel(v, clk->clksel_reg); +} -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 7/7] omap4: dpll: Enable auto gate control for all MX postdividers 2011-02-08 10:10 ` Rajendra Nayak @ 2011-02-08 10:10 ` Rajendra Nayak -1 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-omap Cc: paul, b-cousson, khilman, santosh.shilimkar, linux-arm-kernel, Rajendra Nayak Enable hardware gate control for all dpll MX postdividers. This requires the allow_idle/deny_idle functions to be populated for all clock nodes (mx post dividers) in clkops. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/clock.c | 5 ++++ arch/arm/mach-omap2/clock.h | 1 + arch/arm/mach-omap2/clock44xx_data.c | 40 +++++++++++++++++----------------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 909e3c5..6ec4c67 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -388,6 +388,11 @@ const struct clkops clkops_omap3_core_dpll_ops = { #endif +const struct clkops clkops_omap4_dpllmx_ops = { + .allow_idle = omap4_dpllmx_allow_gatectrl, + .deny_idle = omap4_dpllmx_deny_gatectrl, +}; + /* * OMAP2+ clock reset and init functions */ diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index c450d69..0725a6a 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -150,5 +150,6 @@ extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table) extern const struct clkops clkops_omap3_noncore_dpll_ops; extern const struct clkops clkops_omap3_core_dpll_ops; +extern const struct clkops clkops_omap4_dpllmx_ops; #endif diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index b843b6e..157c51f 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c @@ -328,7 +328,7 @@ static struct clk dpll_abe_m2x2_ck = { .clksel = dpll_abe_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -395,7 +395,7 @@ static struct clk dpll_abe_m3x2_ck = { .clksel = dpll_abe_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_ABE, .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -465,7 +465,7 @@ static struct clk dpll_core_m6x2_ck = { .clksel = dpll_core_m6x2_div, .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_CORE, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -495,7 +495,7 @@ static struct clk dpll_core_m2_ck = { .clksel = dpll_core_m2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_CORE, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -515,7 +515,7 @@ static struct clk dpll_core_m5x2_ck = { .clksel = dpll_core_m6x2_div, .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_CORE, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -581,7 +581,7 @@ static struct clk dpll_core_m4x2_ck = { .clksel = dpll_core_m6x2_div, .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_CORE, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -606,7 +606,7 @@ static struct clk dpll_abe_m2_ck = { .clksel = dpll_abe_m2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -632,7 +632,7 @@ static struct clk dpll_core_m7x2_ck = { .clksel = dpll_core_m6x2_div, .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_CORE, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -704,7 +704,7 @@ static struct clk dpll_iva_m4x2_ck = { .clksel = dpll_iva_m4x2_div, .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_IVA, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -716,7 +716,7 @@ static struct clk dpll_iva_m5x2_ck = { .clksel = dpll_iva_m4x2_div, .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_IVA, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -764,7 +764,7 @@ static struct clk dpll_mpu_m2_ck = { .clksel = dpll_mpu_m2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_MPU, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -837,7 +837,7 @@ static struct clk dpll_per_m2_ck = { .clksel = dpll_per_m2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -861,7 +861,7 @@ static struct clk dpll_per_m2x2_ck = { .clksel = dpll_per_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -887,7 +887,7 @@ static struct clk dpll_per_m4x2_ck = { .clksel = dpll_per_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_PER, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -899,7 +899,7 @@ static struct clk dpll_per_m5x2_ck = { .clksel = dpll_per_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_PER, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -911,7 +911,7 @@ static struct clk dpll_per_m6x2_ck = { .clksel = dpll_per_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_PER, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -923,7 +923,7 @@ static struct clk dpll_per_m7x2_ck = { .clksel = dpll_per_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_PER, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -979,7 +979,7 @@ static struct clk dpll_unipro_m2x2_ck = { .clksel = dpll_unipro_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_UNIPRO, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -1028,7 +1028,7 @@ static struct clk dpll_usb_ck = { static struct clk dpll_usb_clkdcoldo_ck = { .name = "dpll_usb_clkdcoldo_ck", .parent = &dpll_usb_ck, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &followparent_recalc, }; @@ -1043,7 +1043,7 @@ static struct clk dpll_usb_m2_ck = { .clksel = dpll_usb_m2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_USB, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 7/7] omap4: dpll: Enable auto gate control for all MX postdividers @ 2011-02-08 10:10 ` Rajendra Nayak 0 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-08 10:10 UTC (permalink / raw) To: linux-arm-kernel Enable hardware gate control for all dpll MX postdividers. This requires the allow_idle/deny_idle functions to be populated for all clock nodes (mx post dividers) in clkops. Signed-off-by: Rajendra Nayak <rnayak@ti.com> --- arch/arm/mach-omap2/clock.c | 5 ++++ arch/arm/mach-omap2/clock.h | 1 + arch/arm/mach-omap2/clock44xx_data.c | 40 +++++++++++++++++----------------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 909e3c5..6ec4c67 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -388,6 +388,11 @@ const struct clkops clkops_omap3_core_dpll_ops = { #endif +const struct clkops clkops_omap4_dpllmx_ops = { + .allow_idle = omap4_dpllmx_allow_gatectrl, + .deny_idle = omap4_dpllmx_deny_gatectrl, +}; + /* * OMAP2+ clock reset and init functions */ diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index c450d69..0725a6a 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -150,5 +150,6 @@ extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table) extern const struct clkops clkops_omap3_noncore_dpll_ops; extern const struct clkops clkops_omap3_core_dpll_ops; +extern const struct clkops clkops_omap4_dpllmx_ops; #endif diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index b843b6e..157c51f 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c @@ -328,7 +328,7 @@ static struct clk dpll_abe_m2x2_ck = { .clksel = dpll_abe_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -395,7 +395,7 @@ static struct clk dpll_abe_m3x2_ck = { .clksel = dpll_abe_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_ABE, .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -465,7 +465,7 @@ static struct clk dpll_core_m6x2_ck = { .clksel = dpll_core_m6x2_div, .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_CORE, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -495,7 +495,7 @@ static struct clk dpll_core_m2_ck = { .clksel = dpll_core_m2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_CORE, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -515,7 +515,7 @@ static struct clk dpll_core_m5x2_ck = { .clksel = dpll_core_m6x2_div, .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_CORE, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -581,7 +581,7 @@ static struct clk dpll_core_m4x2_ck = { .clksel = dpll_core_m6x2_div, .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_CORE, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -606,7 +606,7 @@ static struct clk dpll_abe_m2_ck = { .clksel = dpll_abe_m2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -632,7 +632,7 @@ static struct clk dpll_core_m7x2_ck = { .clksel = dpll_core_m6x2_div, .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_CORE, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -704,7 +704,7 @@ static struct clk dpll_iva_m4x2_ck = { .clksel = dpll_iva_m4x2_div, .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_IVA, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -716,7 +716,7 @@ static struct clk dpll_iva_m5x2_ck = { .clksel = dpll_iva_m4x2_div, .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_IVA, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -764,7 +764,7 @@ static struct clk dpll_mpu_m2_ck = { .clksel = dpll_mpu_m2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_MPU, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -837,7 +837,7 @@ static struct clk dpll_per_m2_ck = { .clksel = dpll_per_m2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -861,7 +861,7 @@ static struct clk dpll_per_m2x2_ck = { .clksel = dpll_per_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -887,7 +887,7 @@ static struct clk dpll_per_m4x2_ck = { .clksel = dpll_per_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M4_DPLL_PER, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -899,7 +899,7 @@ static struct clk dpll_per_m5x2_ck = { .clksel = dpll_per_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M5_DPLL_PER, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -911,7 +911,7 @@ static struct clk dpll_per_m6x2_ck = { .clksel = dpll_per_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M6_DPLL_PER, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -923,7 +923,7 @@ static struct clk dpll_per_m7x2_ck = { .clksel = dpll_per_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M7_DPLL_PER, .clksel_mask = OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -979,7 +979,7 @@ static struct clk dpll_unipro_m2x2_ck = { .clksel = dpll_unipro_m2x2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_UNIPRO, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, @@ -1028,7 +1028,7 @@ static struct clk dpll_usb_ck = { static struct clk dpll_usb_clkdcoldo_ck = { .name = "dpll_usb_clkdcoldo_ck", .parent = &dpll_usb_ck, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &followparent_recalc, }; @@ -1043,7 +1043,7 @@ static struct clk dpll_usb_m2_ck = { .clksel = dpll_usb_m2_div, .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_USB, .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK, - .ops = &clkops_null, + .ops = &clkops_omap4_dpllmx_ops, .recalc = &omap2_clksel_recalc, .round_rate = &omap2_clksel_round_rate, .set_rate = &omap2_clksel_set_rate, -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 2/7] omap3: dpll: Populate clkops for dpll1_ck 2011-02-08 10:10 ` Rajendra Nayak @ 2011-02-12 23:18 ` Paul Walmsley -1 siblings, 0 replies; 26+ messages in thread From: Paul Walmsley @ 2011-02-12 23:18 UTC (permalink / raw) To: Rajendra Nayak Cc: linux-omap, b-cousson, khilman, santosh.shilimkar, linux-arm-kernel On Tue, 8 Feb 2011, Rajendra Nayak wrote: > DPLL1 on omap3 is very similar to the rest of > the non-core dpll's. > Hence populate clkops_omap3_noncore_dpll_ops > as the clkops for it, instead of the > currently populated clkops_null. > > Signed-off-by: Rajendra Nayak <rnayak@ti.com> Thanks, queued in branch 'clk_a_2.6.39' of git://git.pwsan.com/linux-2.6. This patch is integrated as part of the tag 'tmp-integration-2.6.39-20110212-003' and the branch 'integration-2.6.39' of git://git.pwsan.com/linux-integration. - Paul ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 2/7] omap3: dpll: Populate clkops for dpll1_ck @ 2011-02-12 23:18 ` Paul Walmsley 0 siblings, 0 replies; 26+ messages in thread From: Paul Walmsley @ 2011-02-12 23:18 UTC (permalink / raw) To: linux-arm-kernel On Tue, 8 Feb 2011, Rajendra Nayak wrote: > DPLL1 on omap3 is very similar to the rest of > the non-core dpll's. > Hence populate clkops_omap3_noncore_dpll_ops > as the clkops for it, instead of the > currently populated clkops_null. > > Signed-off-by: Rajendra Nayak <rnayak@ti.com> Thanks, queued in branch 'clk_a_2.6.39' of git://git.pwsan.com/linux-2.6. This patch is integrated as part of the tag 'tmp-integration-2.6.39-20110212-003' and the branch 'integration-2.6.39' of git://git.pwsan.com/linux-integration. - Paul ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 1/7] omap: clock: Check for enable/disable ops support 2011-02-08 10:10 ` Rajendra Nayak @ 2011-02-12 23:17 ` Paul Walmsley -1 siblings, 0 replies; 26+ messages in thread From: Paul Walmsley @ 2011-02-12 23:17 UTC (permalink / raw) To: Rajendra Nayak Cc: linux-omap, b-cousson, khilman, santosh.shilimkar, linux-arm-kernel On Tue, 8 Feb 2011, Rajendra Nayak wrote: > Check if enable/disable operations are supported for a given > clock node before attempting to call them. > > Signed-off-by: Rajendra Nayak <rnayak@ti.com> Thanks, queued in branch 'clk_a_2.6.39' of git://git.pwsan.com/linux-2.6. This patch is integrated as part of the tag 'tmp-integration-2.6.39-20110212-003' and the branch 'integration-2.6.39' of git://git.pwsan.com/linux-integration. - Paul ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 1/7] omap: clock: Check for enable/disable ops support @ 2011-02-12 23:17 ` Paul Walmsley 0 siblings, 0 replies; 26+ messages in thread From: Paul Walmsley @ 2011-02-12 23:17 UTC (permalink / raw) To: linux-arm-kernel On Tue, 8 Feb 2011, Rajendra Nayak wrote: > Check if enable/disable operations are supported for a given > clock node before attempting to call them. > > Signed-off-by: Rajendra Nayak <rnayak@ti.com> Thanks, queued in branch 'clk_a_2.6.39' of git://git.pwsan.com/linux-2.6. This patch is integrated as part of the tag 'tmp-integration-2.6.39-20110212-003' and the branch 'integration-2.6.39' of git://git.pwsan.com/linux-integration. - Paul ^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [PATCH 1/7] omap: clock: Check for enable/disable ops support 2011-02-12 23:17 ` Paul Walmsley @ 2011-02-14 12:15 ` Rajendra Nayak -1 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-14 12:15 UTC (permalink / raw) To: Paul Walmsley Cc: linux-omap, Benoit Cousson, Kevin Hilman, Santosh Shilimkar, linux-arm-kernel Hi Paul, > -----Original Message----- > From: Paul Walmsley [mailto:paul@pwsan.com] > Sent: Sunday, February 13, 2011 4:48 AM > To: Rajendra Nayak > Cc: linux-omap@vger.kernel.org; b-cousson@ti.com; khilman@ti.com; santosh.shilimkar@ti.com; linux-arm- > kernel@lists.infradead.org > Subject: Re: [PATCH 1/7] omap: clock: Check for enable/disable ops support > > On Tue, 8 Feb 2011, Rajendra Nayak wrote: > > > Check if enable/disable operations are supported for a given > > clock node before attempting to call them. > > > > Signed-off-by: Rajendra Nayak <rnayak@ti.com> > > Thanks, queued in branch 'clk_a_2.6.39' of git://git.pwsan.com/linux-2.6. This patch seems to be needed in clk_autoidle_a_2.6.39 too, without which there is an abort at boot on OMAP4. Regards, Rajendra > > This patch is integrated as part of the tag > 'tmp-integration-2.6.39-20110212-003' and the branch 'integration-2.6.39' > of git://git.pwsan.com/linux-integration. > > > - Paul ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 1/7] omap: clock: Check for enable/disable ops support @ 2011-02-14 12:15 ` Rajendra Nayak 0 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-14 12:15 UTC (permalink / raw) To: linux-arm-kernel Hi Paul, > -----Original Message----- > From: Paul Walmsley [mailto:paul at pwsan.com] > Sent: Sunday, February 13, 2011 4:48 AM > To: Rajendra Nayak > Cc: linux-omap at vger.kernel.org; b-cousson at ti.com; khilman at ti.com; santosh.shilimkar at ti.com; linux-arm- > kernel at lists.infradead.org > Subject: Re: [PATCH 1/7] omap: clock: Check for enable/disable ops support > > On Tue, 8 Feb 2011, Rajendra Nayak wrote: > > > Check if enable/disable operations are supported for a given > > clock node before attempting to call them. > > > > Signed-off-by: Rajendra Nayak <rnayak@ti.com> > > Thanks, queued in branch 'clk_a_2.6.39' of git://git.pwsan.com/linux-2.6. This patch seems to be needed in clk_autoidle_a_2.6.39 too, without which there is an abort at boot on OMAP4. Regards, Rajendra > > This patch is integrated as part of the tag > 'tmp-integration-2.6.39-20110212-003' and the branch 'integration-2.6.39' > of git://git.pwsan.com/linux-integration. > > > - Paul ^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [PATCH 1/7] omap: clock: Check for enable/disable ops support 2011-02-14 12:15 ` Rajendra Nayak @ 2011-02-14 16:49 ` Paul Walmsley -1 siblings, 0 replies; 26+ messages in thread From: Paul Walmsley @ 2011-02-14 16:49 UTC (permalink / raw) To: Rajendra Nayak Cc: linux-omap, Benoit Cousson, Kevin Hilman, Santosh Shilimkar, linux-arm-kernel On Mon, 14 Feb 2011, Rajendra Nayak wrote: > > -----Original Message----- > > From: Paul Walmsley [mailto:paul@pwsan.com] > > Sent: Sunday, February 13, 2011 4:48 AM > > To: Rajendra Nayak > > Cc: linux-omap@vger.kernel.org; b-cousson@ti.com; khilman@ti.com; > santosh.shilimkar@ti.com; linux-arm- > > kernel@lists.infradead.org > > Subject: Re: [PATCH 1/7] omap: clock: Check for enable/disable ops > support > > > > On Tue, 8 Feb 2011, Rajendra Nayak wrote: > > > > > Check if enable/disable operations are supported for a given > > > clock node before attempting to call them. > > > > > > Signed-off-by: Rajendra Nayak <rnayak@ti.com> > > > > Thanks, queued in branch 'clk_a_2.6.39' of > git://git.pwsan.com/linux-2.6. > > This patch seems to be needed in clk_autoidle_a_2.6.39 too, > without which there is an abort at boot on OMAP4. Thanks for the note - I think 'clk_autoidle_a_2.6.39' was based on v2.6.38-rc4, rather than on 'clk_a_2.6.39'. Fixed now. - Paul ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 1/7] omap: clock: Check for enable/disable ops support @ 2011-02-14 16:49 ` Paul Walmsley 0 siblings, 0 replies; 26+ messages in thread From: Paul Walmsley @ 2011-02-14 16:49 UTC (permalink / raw) To: linux-arm-kernel On Mon, 14 Feb 2011, Rajendra Nayak wrote: > > -----Original Message----- > > From: Paul Walmsley [mailto:paul at pwsan.com] > > Sent: Sunday, February 13, 2011 4:48 AM > > To: Rajendra Nayak > > Cc: linux-omap at vger.kernel.org; b-cousson at ti.com; khilman at ti.com; > santosh.shilimkar at ti.com; linux-arm- > > kernel at lists.infradead.org > > Subject: Re: [PATCH 1/7] omap: clock: Check for enable/disable ops > support > > > > On Tue, 8 Feb 2011, Rajendra Nayak wrote: > > > > > Check if enable/disable operations are supported for a given > > > clock node before attempting to call them. > > > > > > Signed-off-by: Rajendra Nayak <rnayak@ti.com> > > > > Thanks, queued in branch 'clk_a_2.6.39' of > git://git.pwsan.com/linux-2.6. > > This patch seems to be needed in clk_autoidle_a_2.6.39 too, > without which there is an abort at boot on OMAP4. Thanks for the note - I think 'clk_autoidle_a_2.6.39' was based on v2.6.38-rc4, rather than on 'clk_a_2.6.39'. Fixed now. - Paul ^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [PATCH 0/7] clock/dpll autoidle support 2011-02-08 10:10 ` Rajendra Nayak @ 2011-02-10 8:59 ` Rajendra Nayak -1 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-10 8:59 UTC (permalink / raw) To: Rajendra Nayak, linux-omap Cc: paul, Benoit Cousson, Kevin Hilman, Santosh Shilimkar, linux-arm-kernel > -----Original Message----- > From: Rajendra Nayak [mailto:rnayak@ti.com] > Sent: Tuesday, February 08, 2011 3:41 PM > To: linux-omap@vger.kernel.org > Cc: paul@pwsan.com; b-cousson@ti.com; khilman@ti.com; santosh.shilimkar@ti.com; linux-arm- > kernel@lists.infradead.org; Rajendra Nayak > Subject: [PATCH 0/7] clock/dpll autoidle support > > OMAP has various clock nodes and dpll's > which support hardware level autoidle. > Enabling hardware level autoidle provides > better power savings without much software > intervention. > > This series does the following to help enable > hardware level autoidling using clock framework > for some of these nodes on OMAP3 and OMAP4 > > -1- Adds support for providing function pointers > for enabling/disabling autoidle in clkops > -2- Populates these in clkops for all OMAP3/4 dplls > -3- Enables all dpll autoidle late in boot on OMAP3 and OMAP4 > -4- Adds support for mx postdivider autoidle (present > only on OMAP4) and enables it late in OMAP4 boot Some more testing with this patch series to get OMAP4 to sleep showed a few issues, mainly with the patches adding gate ctrl support for MX postdividers, listed below.. [PATCH 6/7] omap4: dpll: Add dpll api to control GATE_CTRL [PATCH 7/7] omap4: dpll: Enable auto gate control for all MX postdividers Will fix the following issues.. -1- Autogating support for clkout_x2 nodes (for PER and ABE DPLL) was'nt addressed -2- The clkdcoldo output (dpll_usb_clkdcoldo_ck) of USB dpll did not have the clksel populated and hence gate ctrl for it was'nt getting programmed. ... and post a respin of this series shortly. Regards, Rajendra > > Some of the patches in this series were earlier posted > and discussed as part of another series here > http://marc.info/?l=linux-omap&m=129681356402594&w=2 > They are now posted as a seperate series as discussed > here > http://marc.info/?l=linux-omap&m=129713867702170&w=2 > > The patches are boot tested on OMAP3430sdp and > OMAP4430sdp. > > The following changes since commit 100b33c8bd8a3235fd0b7948338d6cbb3db3c63d: > Linus Torvalds (1): > Linux 2.6.38-rc4 > > are available in the git repository at: > > git://gitorious.org/omap-pm/linux.git dpll-autoidle > > Rajendra Nayak (7): > omap: clock: Check for enable/disable ops support > omap3: dpll: Populate clkops for dpll1_ck > omap: clock: Add allow_idle/deny_idle support in clkops > omap: dpll: Add allow_idle/deny_idle support for all DPLL's > omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot > omap4: dpll: Add dpll api to control GATE_CTRL > omap4: dpll: Enable auto gate control for all MX postdividers > > arch/arm/mach-omap2/clock.c | 25 ++++++++++++++--- > arch/arm/mach-omap2/clock.h | 5 +++ > arch/arm/mach-omap2/clock3xxx_data.c | 4 +- > arch/arm/mach-omap2/clock44xx_data.c | 42 +++++++++++++++--------------- > arch/arm/mach-omap2/dpll3xxx.c | 42 +++++++++++++++++++++++++++++++ > arch/arm/mach-omap2/pm34xx.c | 18 +++---------- > arch/arm/mach-omap2/pm44xx.c | 4 +++ > arch/arm/plat-omap/clock.c | 26 +++++++++++++++++++ > arch/arm/plat-omap/include/plat/clock.h | 6 ++++ > 9 files changed, 130 insertions(+), 42 deletions(-) ^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 0/7] clock/dpll autoidle support @ 2011-02-10 8:59 ` Rajendra Nayak 0 siblings, 0 replies; 26+ messages in thread From: Rajendra Nayak @ 2011-02-10 8:59 UTC (permalink / raw) To: linux-arm-kernel > -----Original Message----- > From: Rajendra Nayak [mailto:rnayak at ti.com] > Sent: Tuesday, February 08, 2011 3:41 PM > To: linux-omap at vger.kernel.org > Cc: paul at pwsan.com; b-cousson at ti.com; khilman at ti.com; santosh.shilimkar at ti.com; linux-arm- > kernel at lists.infradead.org; Rajendra Nayak > Subject: [PATCH 0/7] clock/dpll autoidle support > > OMAP has various clock nodes and dpll's > which support hardware level autoidle. > Enabling hardware level autoidle provides > better power savings without much software > intervention. > > This series does the following to help enable > hardware level autoidling using clock framework > for some of these nodes on OMAP3 and OMAP4 > > -1- Adds support for providing function pointers > for enabling/disabling autoidle in clkops > -2- Populates these in clkops for all OMAP3/4 dplls > -3- Enables all dpll autoidle late in boot on OMAP3 and OMAP4 > -4- Adds support for mx postdivider autoidle (present > only on OMAP4) and enables it late in OMAP4 boot Some more testing with this patch series to get OMAP4 to sleep showed a few issues, mainly with the patches adding gate ctrl support for MX postdividers, listed below.. [PATCH 6/7] omap4: dpll: Add dpll api to control GATE_CTRL [PATCH 7/7] omap4: dpll: Enable auto gate control for all MX postdividers Will fix the following issues.. -1- Autogating support for clkout_x2 nodes (for PER and ABE DPLL) was'nt addressed -2- The clkdcoldo output (dpll_usb_clkdcoldo_ck) of USB dpll did not have the clksel populated and hence gate ctrl for it was'nt getting programmed. ... and post a respin of this series shortly. Regards, Rajendra > > Some of the patches in this series were earlier posted > and discussed as part of another series here > http://marc.info/?l=linux-omap&m=129681356402594&w=2 > They are now posted as a seperate series as discussed > here > http://marc.info/?l=linux-omap&m=129713867702170&w=2 > > The patches are boot tested on OMAP3430sdp and > OMAP4430sdp. > > The following changes since commit 100b33c8bd8a3235fd0b7948338d6cbb3db3c63d: > Linus Torvalds (1): > Linux 2.6.38-rc4 > > are available in the git repository at: > > git://gitorious.org/omap-pm/linux.git dpll-autoidle > > Rajendra Nayak (7): > omap: clock: Check for enable/disable ops support > omap3: dpll: Populate clkops for dpll1_ck > omap: clock: Add allow_idle/deny_idle support in clkops > omap: dpll: Add allow_idle/deny_idle support for all DPLL's > omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot > omap4: dpll: Add dpll api to control GATE_CTRL > omap4: dpll: Enable auto gate control for all MX postdividers > > arch/arm/mach-omap2/clock.c | 25 ++++++++++++++--- > arch/arm/mach-omap2/clock.h | 5 +++ > arch/arm/mach-omap2/clock3xxx_data.c | 4 +- > arch/arm/mach-omap2/clock44xx_data.c | 42 +++++++++++++++--------------- > arch/arm/mach-omap2/dpll3xxx.c | 42 +++++++++++++++++++++++++++++++ > arch/arm/mach-omap2/pm34xx.c | 18 +++---------- > arch/arm/mach-omap2/pm44xx.c | 4 +++ > arch/arm/plat-omap/clock.c | 26 +++++++++++++++++++ > arch/arm/plat-omap/include/plat/clock.h | 6 ++++ > 9 files changed, 130 insertions(+), 42 deletions(-) ^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2011-02-14 16:49 UTC | newest] Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-02-08 10:10 [PATCH 0/7] clock/dpll autoidle support Rajendra Nayak 2011-02-08 10:10 ` Rajendra Nayak 2011-02-08 10:10 ` [PATCH 1/7] omap: clock: Check for enable/disable ops support Rajendra Nayak 2011-02-08 10:10 ` Rajendra Nayak 2011-02-08 10:10 ` [PATCH 2/7] omap3: dpll: Populate clkops for dpll1_ck Rajendra Nayak 2011-02-08 10:10 ` Rajendra Nayak 2011-02-08 10:10 ` [PATCH 3/7] omap: clock: Add allow_idle/deny_idle support in clkops Rajendra Nayak 2011-02-08 10:10 ` Rajendra Nayak 2011-02-08 10:10 ` [PATCH 4/7] omap: dpll: Add allow_idle/deny_idle support for all DPLL's Rajendra Nayak 2011-02-08 10:10 ` Rajendra Nayak 2011-02-08 10:10 ` [PATCH 5/7] omap: dpll: Enable all OMAP3/4 dpll autoidle late at boot Rajendra Nayak 2011-02-08 10:10 ` Rajendra Nayak 2011-02-08 10:10 ` [PATCH 6/7] omap4: dpll: Add dpll api to control GATE_CTRL Rajendra Nayak 2011-02-08 10:10 ` Rajendra Nayak 2011-02-08 10:10 ` [PATCH 7/7] omap4: dpll: Enable auto gate control for all MX postdividers Rajendra Nayak 2011-02-08 10:10 ` Rajendra Nayak 2011-02-12 23:18 ` [PATCH 2/7] omap3: dpll: Populate clkops for dpll1_ck Paul Walmsley 2011-02-12 23:18 ` Paul Walmsley 2011-02-12 23:17 ` [PATCH 1/7] omap: clock: Check for enable/disable ops support Paul Walmsley 2011-02-12 23:17 ` Paul Walmsley 2011-02-14 12:15 ` Rajendra Nayak 2011-02-14 12:15 ` Rajendra Nayak 2011-02-14 16:49 ` Paul Walmsley 2011-02-14 16:49 ` Paul Walmsley 2011-02-10 8:59 ` [PATCH 0/7] clock/dpll autoidle support Rajendra Nayak 2011-02-10 8:59 ` Rajendra Nayak
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.