* [PATCHv3 17/17] dmtimer: remove OCP config code from plat-omap
@ 2010-09-21 8:56 Tarun Kanti DebBarma
2010-10-04 14:26 ` Cousson, Benoit
0 siblings, 1 reply; 5+ messages in thread
From: Tarun Kanti DebBarma @ 2010-09-21 8:56 UTC (permalink / raw)
To: linux-omap
Cc: Tarun Kanti DebBarma, Partha Basak, Cousson, Benoit,
Paul Walmsley, Kevin Hilman, Tony Lindgren
This patch removes the ocp config code from omap-plat
because they are supposed to be taken care of by the
hwmod framework. Specifically, following changes are
incorporated:
(1) setting of smart-idle and wakeup-enable is already
taken care in existing code and so they are simply removed
from plat-omap
(2) clockactivity configuration is not present in the present
hwmod database. Therefore this filed is initialized to '1' in
respective database.
Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Signed-off-by: Partha Basak <p-basak2@ti.com>
Cc: Cousson, Benoit <b-cousson@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 +
arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 +
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 1 +
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 1 +
arch/arm/plat-omap/dmtimer.c | 11 -----------
5 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index fc761a5..25111bf 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -168,6 +168,7 @@ static struct omap_hwmod_class_sysconfig omap2420_timer_sysc = {
SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
SYSC_HAS_AUTOIDLE),
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+ .clockact = 1, /* preserve fclk on idle */
.sysc_fields = &omap_hwmod_sysc_type1,
};
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 2ac463f..93d5c3d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -174,6 +174,7 @@ static struct omap_hwmod_class_sysconfig omap2430_timer_sysc = {
SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
SYSC_HAS_AUTOIDLE),
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+ .clockact = 1, /* preserve fclk on idle */
.sysc_fields = &omap_hwmod_sysc_type1,
};
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 1ce40e0..c64c95b 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -147,6 +147,7 @@ static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+ .clockact = 1, /* preserve fclk on idle */
.sysc_fields = &omap_hwmod_sysc_type1,
};
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 9edc518..a816d30 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -538,6 +538,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_timer_1ms_sysc = {
SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
SYSS_MISSING),
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+ .clockact = 1, /* preserve fclk on idle */
.sysc_fields = &omap_hwmod_sysc_type1,
};
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 7d57605..6211501 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -157,17 +157,6 @@ static void omap_dm_timer_reset(struct omap_dm_timer *timer)
}
omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
- l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG);
- l |= 0x02 << 3; /* Set to smart-idle mode */
- l |= 0x2 << 8; /* Set clock activity to perserve f-clock on idle */
-
- /*
- * Enable wake-up on OMAP2 CPUs.
- */
- if (cpu_class_is_omap2())
- l |= 1 << 2;
- omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l);
-
/* Match hardware reset default of posted mode */
omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG,
OMAP_TIMER_CTRL_POSTED);
--
1.6.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCHv3 17/17] dmtimer: remove OCP config code from plat-omap
2010-09-21 8:56 [PATCHv3 17/17] dmtimer: remove OCP config code from plat-omap Tarun Kanti DebBarma
@ 2010-10-04 14:26 ` Cousson, Benoit
2010-10-11 9:27 ` DebBarma, Tarun Kanti
0 siblings, 1 reply; 5+ messages in thread
From: Cousson, Benoit @ 2010-10-04 14:26 UTC (permalink / raw)
To: DebBarma, Tarun Kanti
Cc: linux-omap@vger.kernel.org, Basak, Partha, Paul Walmsley,
Kevin Hilman, Tony Lindgren
On 9/21/2010 10:56 AM, DebBarma, Tarun Kanti wrote:
> This patch removes the ocp config code from omap-plat
> because they are supposed to be taken care of by the
> hwmod framework. Specifically, following changes are
> incorporated:
> (1) setting of smart-idle and wakeup-enable is already
> taken care in existing code and so they are simply removed
> from plat-omap
> (2) clockactivity configuration is not present in the present
> hwmod database. Therefore this filed is initialized to '1' in
Typo.
> respective database.
Could you explain why, the default setting is not working for the timers?
>
> Signed-off-by: Tarun Kanti DebBarma<tarun.kanti@ti.com>
> Signed-off-by: Partha Basak<p-basak2@ti.com>
> Cc: Cousson, Benoit<b-cousson@ti.com>
> Cc: Paul Walmsley<paul@pwsan.com>
> Cc: Kevin Hilman<khilman@deeprootsystems.com>
> Cc: Tony Lindgren<tony@atomide.com>
> ---
> arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 +
> arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 +
> arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 1 +
> arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 1 +
> arch/arm/plat-omap/dmtimer.c | 11 -----------
> 5 files changed, 4 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> index fc761a5..25111bf 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> @@ -168,6 +168,7 @@ static struct omap_hwmod_class_sysconfig omap2420_timer_sysc = {
> SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
> SYSC_HAS_AUTOIDLE),
> .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> + .clockact = 1, /* preserve fclk on idle */
In theory, this field is useless unless you add a flag:
SYSC_HAS_CLOCKACTIVITY.
So how is it working in your case?
> .sysc_fields =&omap_hwmod_sysc_type1,
> };
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> index 2ac463f..93d5c3d 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> @@ -174,6 +174,7 @@ static struct omap_hwmod_class_sysconfig omap2430_timer_sysc = {
> SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
> SYSC_HAS_AUTOIDLE),
> .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> + .clockact = 1, /* preserve fclk on idle */
> .sysc_fields =&omap_hwmod_sysc_type1,
> };
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> index 1ce40e0..c64c95b 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> @@ -147,6 +147,7 @@ static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = {
> SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
> SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
> .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> + .clockact = 1, /* preserve fclk on idle */
> .sysc_fields =&omap_hwmod_sysc_type1,
> };
>
> diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> index 9edc518..a816d30 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> @@ -538,6 +538,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_timer_1ms_sysc = {
> SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
> SYSS_MISSING),
> .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> + .clockact = 1, /* preserve fclk on idle */
> .sysc_fields =&omap_hwmod_sysc_type1,
> };
>
> diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
> index 7d57605..6211501 100644
> --- a/arch/arm/plat-omap/dmtimer.c
> +++ b/arch/arm/plat-omap/dmtimer.c
> @@ -157,17 +157,6 @@ static void omap_dm_timer_reset(struct omap_dm_timer *timer)
> }
> omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
>
> - l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG);
> - l |= 0x02<< 3; /* Set to smart-idle mode */
> - l |= 0x2<< 8; /* Set clock activity to perserve f-clock on idle */
It used to be 0x2 and now you put 1:
.clockact = 1, /* preserve fclk on idle */
I do not understand how that patch can work???
Benoit
> -
> - /*
> - * Enable wake-up on OMAP2 CPUs.
> - */
> - if (cpu_class_is_omap2())
> - l |= 1<< 2;
> - omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l);
> -
> /* Match hardware reset default of posted mode */
> omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG,
> OMAP_TIMER_CTRL_POSTED);
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCHv3 17/17] dmtimer: remove OCP config code from plat-omap
2010-10-04 14:26 ` Cousson, Benoit
@ 2010-10-11 9:27 ` DebBarma, Tarun Kanti
2010-10-11 9:41 ` DebBarma, Tarun Kanti
0 siblings, 1 reply; 5+ messages in thread
From: DebBarma, Tarun Kanti @ 2010-10-11 9:27 UTC (permalink / raw)
To: Cousson, Benoit
Cc: linux-omap@vger.kernel.org, Basak, Partha, Paul Walmsley,
Kevin Hilman, Tony Lindgren
Benoit,
> -----Original Message-----
> From: Cousson, Benoit
> Sent: Monday, October 04, 2010 7:57 PM
> To: DebBarma, Tarun Kanti
> Cc: linux-omap@vger.kernel.org; Basak, Partha; Paul Walmsley; Kevin
> Hilman; Tony Lindgren
> Subject: Re: [PATCHv3 17/17] dmtimer: remove OCP config code from plat-
> omap
>
> On 9/21/2010 10:56 AM, DebBarma, Tarun Kanti wrote:
> > This patch removes the ocp config code from omap-plat
> > because they are supposed to be taken care of by the
> > hwmod framework. Specifically, following changes are
> > incorporated:
> > (1) setting of smart-idle and wakeup-enable is already
> > taken care in existing code and so they are simply removed
> > from plat-omap
> > (2) clockactivity configuration is not present in the present
> > hwmod database. Therefore this filed is initialized to '1' in
>
> Typo.
Will take care!
>
> > respective database.
>
> Could you explain why, the default setting is not working for the timers?
Ok, I just moved the existing implementation from plat-omap to hwmod database. I have not tested without this change.
>
> >
> > Signed-off-by: Tarun Kanti DebBarma<tarun.kanti@ti.com>
> > Signed-off-by: Partha Basak<p-basak2@ti.com>
> > Cc: Cousson, Benoit<b-cousson@ti.com>
> > Cc: Paul Walmsley<paul@pwsan.com>
> > Cc: Kevin Hilman<khilman@deeprootsystems.com>
> > Cc: Tony Lindgren<tony@atomide.com>
> > ---
> > arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 +
> > arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 +
> > arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 1 +
> > arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 1 +
> > arch/arm/plat-omap/dmtimer.c | 11 -----------
> > 5 files changed, 4 insertions(+), 11 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-
> omap2/omap_hwmod_2420_data.c
> > index fc761a5..25111bf 100644
> > --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> > +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> > @@ -168,6 +168,7 @@ static struct omap_hwmod_class_sysconfig
> omap2420_timer_sysc = {
> > SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
> > SYSC_HAS_AUTOIDLE),
> > .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> > + .clockact = 1, /* preserve fclk on idle */
>
> In theory, this field is useless unless you add a flag:
> SYSC_HAS_CLOCKACTIVITY.
>
> So how is it working in your case?
I guess my testing with power was not done properly. I will check and verify.
>
>
> > .sysc_fields =&omap_hwmod_sysc_type1,
> > };
> >
> > diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-
> omap2/omap_hwmod_2430_data.c
> > index 2ac463f..93d5c3d 100644
> > --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> > +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> > @@ -174,6 +174,7 @@ static struct omap_hwmod_class_sysconfig
> omap2430_timer_sysc = {
> > SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
> > SYSC_HAS_AUTOIDLE),
> > .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> > + .clockact = 1, /* preserve fclk on idle */
> > .sysc_fields =&omap_hwmod_sysc_type1,
> > };
> >
> > diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-
> omap2/omap_hwmod_3xxx_data.c
> > index 1ce40e0..c64c95b 100644
> > --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > @@ -147,6 +147,7 @@ static struct omap_hwmod_class_sysconfig
> omap3xxx_timer_1ms_sysc = {
> > SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
> > SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
> > .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> > + .clockact = 1, /* preserve fclk on idle */
> > .sysc_fields =&omap_hwmod_sysc_type1,
> > };
> >
> > diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-
> omap2/omap_hwmod_44xx_data.c
> > index 9edc518..a816d30 100644
> > --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> > +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> > @@ -538,6 +538,7 @@ static struct omap_hwmod_class_sysconfig
> omap44xx_timer_1ms_sysc = {
> > SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
> > SYSS_MISSING),
> > .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> > + .clockact = 1, /* preserve fclk on idle */
> > .sysc_fields =&omap_hwmod_sysc_type1,
> > };
> >
> > diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
> > index 7d57605..6211501 100644
> > --- a/arch/arm/plat-omap/dmtimer.c
> > +++ b/arch/arm/plat-omap/dmtimer.c
> > @@ -157,17 +157,6 @@ static void omap_dm_timer_reset(struct
> omap_dm_timer *timer)
> > }
> > omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
> >
> > - l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG);
> > - l |= 0x02<< 3; /* Set to smart-idle mode */
> > - l |= 0x2<< 8; /* Set clock activity to perserve f-clock on idle */
>
> It used to be 0x2 and now you put 1:
> .clockact = 1, /* preserve fclk on idle */
Oops... it's a mistake.
>
> I do not understand how that patch can work???
As I said, I am sure I did mess-up during power test.
In summary, I will make following updates:
.clockact = 0x2
SYSC_HAS_CLOCKACTIVITY flag should be included.
Thanks for the inputs.
-tarun
>
> > -
> > - /*
> > - * Enable wake-up on OMAP2 CPUs.
> > - */
> > - if (cpu_class_is_omap2())
> > - l |= 1<< 2;
> > - omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l);
> > -
> > /* Match hardware reset default of posted mode */
> > omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG,
> > OMAP_TIMER_CTRL_POSTED);
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCHv3 17/17] dmtimer: remove OCP config code from plat-omap
2010-10-11 9:27 ` DebBarma, Tarun Kanti
@ 2010-10-11 9:41 ` DebBarma, Tarun Kanti
2010-10-11 15:00 ` Cousson, Benoit
0 siblings, 1 reply; 5+ messages in thread
From: DebBarma, Tarun Kanti @ 2010-10-11 9:41 UTC (permalink / raw)
To: Cousson, Benoit
Cc: linux-omap@vger.kernel.org, Basak, Partha, Paul Walmsley,
Kevin Hilman, Tony Lindgren
Benoit,
> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of DebBarma, Tarun Kanti
> Sent: Monday, October 11, 2010 2:58 PM
> To: Cousson, Benoit
> Cc: linux-omap@vger.kernel.org; Basak, Partha; Paul Walmsley; Kevin
> Hilman; Tony Lindgren
> Subject: RE: [PATCHv3 17/17] dmtimer: remove OCP config code from plat-
> omap
>
> Benoit,
>
> > -----Original Message-----
> > From: Cousson, Benoit
> > Sent: Monday, October 04, 2010 7:57 PM
> > To: DebBarma, Tarun Kanti
> > Cc: linux-omap@vger.kernel.org; Basak, Partha; Paul Walmsley; Kevin
> > Hilman; Tony Lindgren
> > Subject: Re: [PATCHv3 17/17] dmtimer: remove OCP config code from plat-
> > omap
> >
> > On 9/21/2010 10:56 AM, DebBarma, Tarun Kanti wrote:
> > > This patch removes the ocp config code from omap-plat
> > > because they are supposed to be taken care of by the
> > > hwmod framework. Specifically, following changes are
> > > incorporated:
> > > (1) setting of smart-idle and wakeup-enable is already
> > > taken care in existing code and so they are simply removed
> > > from plat-omap
> > > (2) clockactivity configuration is not present in the present
> > > hwmod database. Therefore this filed is initialized to '1' in
> >
> > Typo.
> Will take care!
>
> >
> > > respective database.
> >
> > Could you explain why, the default setting is not working for the
> timers?
> Ok, I just moved the existing implementation from plat-omap to hwmod
> database. I have not tested without this change.
>
> >
> > >
> > > Signed-off-by: Tarun Kanti DebBarma<tarun.kanti@ti.com>
> > > Signed-off-by: Partha Basak<p-basak2@ti.com>
> > > Cc: Cousson, Benoit<b-cousson@ti.com>
> > > Cc: Paul Walmsley<paul@pwsan.com>
> > > Cc: Kevin Hilman<khilman@deeprootsystems.com>
> > > Cc: Tony Lindgren<tony@atomide.com>
> > > ---
> > > arch/arm/mach-omap2/omap_hwmod_2420_data.c | 1 +
> > > arch/arm/mach-omap2/omap_hwmod_2430_data.c | 1 +
> > > arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 1 +
> > > arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 1 +
> > > arch/arm/plat-omap/dmtimer.c | 11 -----------
> > > 5 files changed, 4 insertions(+), 11 deletions(-)
> > >
> > > diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> b/arch/arm/mach-
> > omap2/omap_hwmod_2420_data.c
> > > index fc761a5..25111bf 100644
> > > --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> > > +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
> > > @@ -168,6 +168,7 @@ static struct omap_hwmod_class_sysconfig
> > omap2420_timer_sysc = {
> > > SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
> > > SYSC_HAS_AUTOIDLE),
> > > .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> > > + .clockact = 1, /* preserve fclk on idle */
> >
> > In theory, this field is useless unless you add a flag:
> > SYSC_HAS_CLOCKACTIVITY.
> >
> > So how is it working in your case?
> I guess my testing with power was not done properly. I will check and
> verify.
> >
> >
> > > .sysc_fields =&omap_hwmod_sysc_type1,
> > > };
> > >
> > > diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> b/arch/arm/mach-
> > omap2/omap_hwmod_2430_data.c
> > > index 2ac463f..93d5c3d 100644
> > > --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> > > +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
> > > @@ -174,6 +174,7 @@ static struct omap_hwmod_class_sysconfig
> > omap2430_timer_sysc = {
> > > SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
> > > SYSC_HAS_AUTOIDLE),
> > > .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> > > + .clockact = 1, /* preserve fclk on idle */
> > > .sysc_fields =&omap_hwmod_sysc_type1,
> > > };
> > >
> > > diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> b/arch/arm/mach-
> > omap2/omap_hwmod_3xxx_data.c
> > > index 1ce40e0..c64c95b 100644
> > > --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > > +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
> > > @@ -147,6 +147,7 @@ static struct omap_hwmod_class_sysconfig
> > omap3xxx_timer_1ms_sysc = {
> > > SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
> > > SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE),
> > > .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> > > + .clockact = 1, /* preserve fclk on idle */
> > > .sysc_fields =&omap_hwmod_sysc_type1,
> > > };
> > >
> > > diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> b/arch/arm/mach-
> > omap2/omap_hwmod_44xx_data.c
> > > index 9edc518..a816d30 100644
> > > --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> > > +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
> > > @@ -538,6 +538,7 @@ static struct omap_hwmod_class_sysconfig
> > omap44xx_timer_1ms_sysc = {
> > > SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE |
> > > SYSS_MISSING),
> > > .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
> > > + .clockact = 1, /* preserve fclk on idle */
> > > .sysc_fields =&omap_hwmod_sysc_type1,
> > > };
> > >
> > > diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-
> omap/dmtimer.c
> > > index 7d57605..6211501 100644
> > > --- a/arch/arm/plat-omap/dmtimer.c
> > > +++ b/arch/arm/plat-omap/dmtimer.c
> > > @@ -157,17 +157,6 @@ static void omap_dm_timer_reset(struct
> > omap_dm_timer *timer)
> > > }
> > > omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
> > >
> > > - l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG);
> > > - l |= 0x02<< 3; /* Set to smart-idle mode */
> > > - l |= 0x2<< 8; /* Set clock activity to perserve f-clock on
> idle */
> >
> > It used to be 0x2 and now you put 1:
> > .clockact = 1, /* preserve fclk on idle */
> Oops... it's a mistake.
>
> >
> > I do not understand how that patch can work???
> As I said, I am sure I did mess-up during power test.
>
> In summary, I will make following updates:
> .clockact = 0x2
> SYSC_HAS_CLOCKACTIVITY flag should be included.
After going through the code I realized that this flag is already there.
I am not sure where you observed this flag missing?
-tarun
>
> >
> > > -
> > > - /*
> > > - * Enable wake-up on OMAP2 CPUs.
> > > - */
> > > - if (cpu_class_is_omap2())
> > > - l |= 1<< 2;
> > > - omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l);
> > > -
> > > /* Match hardware reset default of posted mode */
> > > omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG,
> > > OMAP_TIMER_CTRL_POSTED);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCHv3 17/17] dmtimer: remove OCP config code from plat-omap
2010-10-11 9:41 ` DebBarma, Tarun Kanti
@ 2010-10-11 15:00 ` Cousson, Benoit
0 siblings, 0 replies; 5+ messages in thread
From: Cousson, Benoit @ 2010-10-11 15:00 UTC (permalink / raw)
To: DebBarma, Tarun Kanti
Cc: linux-omap@vger.kernel.org, Basak, Partha, Paul Walmsley,
Kevin Hilman, Tony Lindgren
On 10/11/2010 11:41 AM, DebBarma, Tarun Kanti wrote:
<...>
>> In summary, I will make following updates:
>> .clockact = 0x2
>> SYSC_HAS_CLOCKACTIVITY flag should be included.
> After going through the code I realized that this flag is already there.
> I am not sure where you observed this flag missing?
You're right, it was missing from the patch, but in fact already there
in the code.
Sorry on that one.
Benoit
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-11 15:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-21 8:56 [PATCHv3 17/17] dmtimer: remove OCP config code from plat-omap Tarun Kanti DebBarma
2010-10-04 14:26 ` Cousson, Benoit
2010-10-11 9:27 ` DebBarma, Tarun Kanti
2010-10-11 9:41 ` DebBarma, Tarun Kanti
2010-10-11 15:00 ` Cousson, Benoit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).