All of lore.kernel.org
 help / color / mirror / Atom feed
* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-16 13:24 ` Ming Lei
  0 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-16 13:24 UTC (permalink / raw)
  To: linux-omap, Santosh Shilimkar
  Cc: Paul Walmsley, Rajendra Nayak, linux-arm-kernel

Hi,

I found that face detection module(fdif) can't be enabled successfully
without the
change in [1].

Looks like it is not a good way to do it because the dynamic dependency of
CD_CAM on l3_2 is disabled at default, not like other ones, so I guess that
it may work if the dynamic dependency is enabled by setting bit L3_2_DYNDEP
to CM_CAM_DYNAMICDEP.  After greping over arch/arm/mach-omap2 and
arch/arm/plat-omap, I did not find any operations on CM_*_DYNAMICDEP
register, so I am wondering if dynamic dependency is not used on omap4 at all
now.

Also I have tried to add 'l3_2_clkdm' into dependency table of iss_clkdm in [2],
and it doesn't work.

How could I cope with the clock domain dependency so that fdif can be
enabled successfully?


thanks,-- Ming Lei
[1], add static dependency
diff --git a/arch/arm/mach-omap2/pm44xx.c
b/arch/arm/mach-omap2/pm44xx.cindex c264ef7..23e1f8c 100644---
a/arch/arm/mach-omap2/pm44xx.c+++ b/arch/arm/mach-omap2/pm44xx.c@@
-198,6 +198,7 @@ static int __init omap4_pm_init(void) 	int ret;
	struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm; 	struct
clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm;+	struct
clockdomain *iss_clkdm;  	if (!cpu_is_omap44xx()) 		return -ENODEV;@@
-227,8 +228,10 @@ static int __init omap4_pm_init(void) 	l3_2_clkdm =
clkdm_lookup("l3_2_clkdm"); 	l4_per_clkdm =
clkdm_lookup("l4_per_clkdm"); 	ducati_clkdm =
clkdm_lookup("ducati_clkdm");+	iss_clkdm = clkdm_lookup("iss_clkdm");
	if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm)
||-		(!l3_2_clkdm) || (!ducati_clkdm) ||
(!l4_per_clkdm))+		(!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm)
||+		(!iss_clkdm)) 		goto err2;  	ret = clkdm_add_wkdep(mpuss_clkdm,
emif_clkdm);@@ -237,6 +240,7 @@ static int __init omap4_pm_init(void)
	ret |= clkdm_add_wkdep(mpuss_clkdm, l4_per_clkdm); 	ret |=
clkdm_add_wkdep(ducati_clkdm, l3_1_clkdm); 	ret |=
clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm);+	ret |=
clkdm_add_wkdep(iss_clkdm, l3_2_clkdm); 	if (ret) { 		pr_err("Failed
to add MPUSS -> L3/EMIF/L4PER, DUCATI -> L3 " 				"wakeup
dependency\n");
[2],

diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c
b/arch/arm/mach-omap2/clockdomains44xx_data.c
index 9299ac2..3f8f6a9 100644
--- a/arch/arm/mach-omap2/clockdomains44xx_data.c
+++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
@@ -65,6 +65,7 @@ static struct clkdm_dep ducati_wkup_sleep_deps[] = {
 static struct clkdm_dep iss_wkup_sleep_deps[] = {
        { .clkdm_name = "ivahd_clkdm" },
        { .clkdm_name = "l3_1_clkdm" },
+       { .clkdm_name = "l3_2_clkdm" },
        { .clkdm_name = "l3_emif_clkdm" },
        { NULL },
 };

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-16 13:24 ` Ming Lei
  0 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-16 13:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

I found that face detection module(fdif) can't be enabled successfully
without the
change in [1].

Looks like it is not a good way to do it because the dynamic dependency of
CD_CAM on l3_2 is disabled at default, not like other ones, so I guess that
it may work if the dynamic dependency is enabled by setting bit L3_2_DYNDEP
to CM_CAM_DYNAMICDEP.  After greping over arch/arm/mach-omap2 and
arch/arm/plat-omap, I did not find any operations on CM_*_DYNAMICDEP
register, so I am wondering if dynamic dependency is not used on omap4 at all
now.

Also I have tried to add 'l3_2_clkdm' into dependency table of iss_clkdm in [2],
and it doesn't work.

How could I cope with the clock domain dependency so that fdif can be
enabled successfully?


thanks,--?Ming Lei
[1], add static dependency
diff --git a/arch/arm/mach-omap2/pm44xx.c
b/arch/arm/mach-omap2/pm44xx.cindex c264ef7..23e1f8c 100644---
a/arch/arm/mach-omap2/pm44xx.c+++ b/arch/arm/mach-omap2/pm44xx.c@@
-198,6 +198,7 @@ static int __init omap4_pm_init(void)?	int ret;
	struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm;?	struct
clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm;+	struct
clockdomain *iss_clkdm;??	if (!cpu_is_omap44xx())?		return -ENODEV;@@
-227,8 +228,10 @@ static int __init omap4_pm_init(void)?	l3_2_clkdm =
clkdm_lookup("l3_2_clkdm");?	l4_per_clkdm =
clkdm_lookup("l4_per_clkdm");?	ducati_clkdm =
clkdm_lookup("ducati_clkdm");+	iss_clkdm = clkdm_lookup("iss_clkdm");
	if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm)
||-		(!l3_2_clkdm) || (!ducati_clkdm) ||
(!l4_per_clkdm))+		(!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm)
||+		(!iss_clkdm))?		goto err2;??	ret = clkdm_add_wkdep(mpuss_clkdm,
emif_clkdm);@@ -237,6 +240,7 @@ static int __init omap4_pm_init(void)
	ret |= clkdm_add_wkdep(mpuss_clkdm, l4_per_clkdm);?	ret |=
clkdm_add_wkdep(ducati_clkdm, l3_1_clkdm);?	ret |=
clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm);+	ret |=
clkdm_add_wkdep(iss_clkdm, l3_2_clkdm);?	if (ret) {?		pr_err("Failed
to add MPUSS -> L3/EMIF/L4PER, DUCATI -> L3 "?				"wakeup
dependency\n");
[2],

diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c
b/arch/arm/mach-omap2/clockdomains44xx_data.c
index 9299ac2..3f8f6a9 100644
--- a/arch/arm/mach-omap2/clockdomains44xx_data.c
+++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
@@ -65,6 +65,7 @@ static struct clkdm_dep ducati_wkup_sleep_deps[] = {
 static struct clkdm_dep iss_wkup_sleep_deps[] = {
        { .clkdm_name = "ivahd_clkdm" },
        { .clkdm_name = "l3_1_clkdm" },
+       { .clkdm_name = "l3_2_clkdm" },
        { .clkdm_name = "l3_emif_clkdm" },
        { NULL },
 };

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-16 13:24 ` Ming Lei
@ 2011-12-16 13:50   ` Ming Lei
  -1 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-16 13:50 UTC (permalink / raw)
  To: linux-omap, Santosh Shilimkar
  Cc: linux-arm-kernel, Paul Walmsley, Rajendra Nayak

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

Hi,

On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei <tom.leiming@gmail.com> wrote:

> [1], add static dependency

Sorry for the mess, see attachment for the change.

thanks,
-- 
Ming Lei

[-- Attachment #2: dyndep.patch --]
[-- Type: text/x-patch, Size: 1309 bytes --]

diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index c264ef7..23e1f8c 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -198,6 +198,7 @@ static int __init omap4_pm_init(void)
 	int ret;
 	struct clockdomain *emif_clkdm, *mpuss_clkdm, *l3_1_clkdm;
 	struct clockdomain *ducati_clkdm, *l3_2_clkdm, *l4_per_clkdm;
+	struct clockdomain *iss_clkdm;
 
 	if (!cpu_is_omap44xx())
 		return -ENODEV;
@@ -227,8 +228,10 @@ static int __init omap4_pm_init(void)
 	l3_2_clkdm = clkdm_lookup("l3_2_clkdm");
 	l4_per_clkdm = clkdm_lookup("l4_per_clkdm");
 	ducati_clkdm = clkdm_lookup("ducati_clkdm");
+	iss_clkdm = clkdm_lookup("iss_clkdm");
 	if ((!mpuss_clkdm) || (!emif_clkdm) || (!l3_1_clkdm) ||
-		(!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm))
+		(!l3_2_clkdm) || (!ducati_clkdm) || (!l4_per_clkdm) ||
+		(!iss_clkdm))
 		goto err2;
 
 	ret = clkdm_add_wkdep(mpuss_clkdm, emif_clkdm);
@@ -237,6 +240,7 @@ static int __init omap4_pm_init(void)
 	ret |= clkdm_add_wkdep(mpuss_clkdm, l4_per_clkdm);
 	ret |= clkdm_add_wkdep(ducati_clkdm, l3_1_clkdm);
 	ret |= clkdm_add_wkdep(ducati_clkdm, l3_2_clkdm);
+	ret |= clkdm_add_wkdep(iss_clkdm, l3_2_clkdm);
 	if (ret) {
 		pr_err("Failed to add MPUSS -> L3/EMIF/L4PER, DUCATI -> L3 "
 				"wakeup dependency\n");

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-16 13:50   ` Ming Lei
  0 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-16 13:50 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei <tom.leiming@gmail.com> wrote:

> [1], add static dependency

Sorry for the mess, see attachment for the change.

thanks,
-- 
Ming Lei
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dyndep.patch
Type: text/x-patch
Size: 1309 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111216/7dc305eb/attachment.bin>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-16 13:50   ` Ming Lei
@ 2011-12-16 15:13     ` Shilimkar, Santosh
  -1 siblings, 0 replies; 28+ messages in thread
From: Shilimkar, Santosh @ 2011-12-16 15:13 UTC (permalink / raw)
  To: Ming Lei; +Cc: linux-omap, linux-arm-kernel, Paul Walmsley, Rajendra Nayak

On Fri, Dec 16, 2011 at 7:20 PM, Ming Lei <tom.leiming@gmail.com> wrote:
> Hi,
>
> On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>
>> [1], add static dependency
>
> Sorry for the mess, see attachment for the change.
>
Your patch is setting static dependency between ISS and l3_2.
It's not dynamic dep. Dynamic dep is managed through hardware and they
are not configurable. But with static dep. you can over-ride that behavior
as you have done.

This will impact power since l3_2 can't idle as long as iss clock
domain is active.

I need to check internal code-base but I don't remember this
issue observed so far.

Regards
Santosh

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-16 15:13     ` Shilimkar, Santosh
  0 siblings, 0 replies; 28+ messages in thread
From: Shilimkar, Santosh @ 2011-12-16 15:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 16, 2011 at 7:20 PM, Ming Lei <tom.leiming@gmail.com> wrote:
> Hi,
>
> On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>
>> [1], add static dependency
>
> Sorry for the mess, see attachment for the change.
>
Your patch is setting static dependency between ISS and l3_2.
It's not dynamic dep. Dynamic dep is managed through hardware and they
are not configurable. But with static dep. you can over-ride that behavior
as you have done.

This will impact power since l3_2 can't idle as long as iss clock
domain is active.

I need to check internal code-base but I don't remember this
issue observed so far.

Regards
Santosh

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-16 15:13     ` Shilimkar, Santosh
@ 2011-12-16 15:46       ` Ming Lei
  -1 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-16 15:46 UTC (permalink / raw)
  To: Shilimkar, Santosh
  Cc: linux-omap, linux-arm-kernel, Paul Walmsley, Rajendra Nayak

On Fri, Dec 16, 2011 at 11:13 PM, Shilimkar, Santosh
<santosh.shilimkar@ti.com> wrote:
> On Fri, Dec 16, 2011 at 7:20 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>> Hi,
>>
>> On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>>
>>> [1], add static dependency
>>
>> Sorry for the mess, see attachment for the change.
>>
> Your patch is setting static dependency between ISS and l3_2.
> It's not dynamic dep. Dynamic dep is managed through hardware and they

Yes, I see now,  L3_2_DYNDEP of CM_CAM_DYNAMICDEP is read only.

> are not configurable. But with static dep. you can over-ride that behavior
> as you have done.
>
> This will impact power since l3_2 can't idle as long as iss clock
> domain is active.
>
> I need to check internal code-base but I don't remember this
> issue observed so far.

In fact, I saw the issue on 3.2.0-rc5-next-20111216, and even
no such issue on 3.2.0-rc5.  After some bisecting, I found below
is the first commit on which the issue can be observed:

commit 3c50729b3fa1cd8ca1f347e6caf1081204cf1a7c
Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date:   Wed Jan 5 22:03:17 2011 +0530

    ARM: OMAP4: PM: Initialise all the clockdomains to supported states

    Initialise hardware supervised mode for all clockdomains if it's
    supported. Initiate sleep transition for other clockdomains,
    if they are not being used.


thanks,
-- 
Ming Lei

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-16 15:46       ` Ming Lei
  0 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-16 15:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 16, 2011 at 11:13 PM, Shilimkar, Santosh
<santosh.shilimkar@ti.com> wrote:
> On Fri, Dec 16, 2011 at 7:20 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>> Hi,
>>
>> On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>>
>>> [1], add static dependency
>>
>> Sorry for the mess, see attachment for the change.
>>
> Your patch is setting static dependency between ISS and l3_2.
> It's not dynamic dep. Dynamic dep is managed through hardware and they

Yes, I see now,  L3_2_DYNDEP of CM_CAM_DYNAMICDEP is read only.

> are not configurable. But with static dep. you can over-ride that behavior
> as you have done.
>
> This will impact power since l3_2 can't idle as long as iss clock
> domain is active.
>
> I need to check internal code-base but I don't remember this
> issue observed so far.

In fact, I saw the issue on 3.2.0-rc5-next-20111216, and even
no such issue on 3.2.0-rc5.  After some bisecting, I found below
is the first commit on which the issue can be observed:

commit 3c50729b3fa1cd8ca1f347e6caf1081204cf1a7c
Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
Date:   Wed Jan 5 22:03:17 2011 +0530

    ARM: OMAP4: PM: Initialise all the clockdomains to supported states

    Initialise hardware supervised mode for all clockdomains if it's
    supported. Initiate sleep transition for other clockdomains,
    if they are not being used.


thanks,
-- 
Ming Lei

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-16 15:46       ` Ming Lei
@ 2011-12-16 15:50         ` Shilimkar, Santosh
  -1 siblings, 0 replies; 28+ messages in thread
From: Shilimkar, Santosh @ 2011-12-16 15:50 UTC (permalink / raw)
  To: Ming Lei; +Cc: linux-omap, linux-arm-kernel, Paul Walmsley, Rajendra Nayak

On Fri, Dec 16, 2011 at 9:16 PM, Ming Lei <tom.leiming@gmail.com> wrote:
> On Fri, Dec 16, 2011 at 11:13 PM, Shilimkar, Santosh
> <santosh.shilimkar@ti.com> wrote:
>> On Fri, Dec 16, 2011 at 7:20 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>>> Hi,
>>>
>>> On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>>>
>>>> [1], add static dependency
>>>
>>> Sorry for the mess, see attachment for the change.
>>>
>> Your patch is setting static dependency between ISS and l3_2.
>> It's not dynamic dep. Dynamic dep is managed through hardware and they
>
> Yes, I see now,  L3_2_DYNDEP of CM_CAM_DYNAMICDEP is read only.
>
>> are not configurable. But with static dep. you can over-ride that behavior
>> as you have done.
>>
>> This will impact power since l3_2 can't idle as long as iss clock
>> domain is active.
>>
>> I need to check internal code-base but I don't remember this
>> issue observed so far.
>
> In fact, I saw the issue on 3.2.0-rc5-next-20111216, and even
> no such issue on 3.2.0-rc5.  After some bisecting, I found below
> is the first commit on which the issue can be observed:
>
> commit 3c50729b3fa1cd8ca1f347e6caf1081204cf1a7c
> Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Date:   Wed Jan 5 22:03:17 2011 +0530
>
>    ARM: OMAP4: PM: Initialise all the clockdomains to supported states
>
>    Initialise hardware supervised mode for all clockdomains if it's
>    supported. Initiate sleep transition for other clockdomains,
>    if they are not being used.
>
Before this patch all clock-domains were  put into SW forcewakeup
and hence the clock domains were not idling. With this patch now, hw
will take control of the clock-domain idle based on the domain
activities.

Regards
Santosh
--
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] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-16 15:50         ` Shilimkar, Santosh
  0 siblings, 0 replies; 28+ messages in thread
From: Shilimkar, Santosh @ 2011-12-16 15:50 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 16, 2011 at 9:16 PM, Ming Lei <tom.leiming@gmail.com> wrote:
> On Fri, Dec 16, 2011 at 11:13 PM, Shilimkar, Santosh
> <santosh.shilimkar@ti.com> wrote:
>> On Fri, Dec 16, 2011 at 7:20 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>>> Hi,
>>>
>>> On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>>>
>>>> [1], add static dependency
>>>
>>> Sorry for the mess, see attachment for the change.
>>>
>> Your patch is setting static dependency between ISS and l3_2.
>> It's not dynamic dep. Dynamic dep is managed through hardware and they
>
> Yes, I see now, ?L3_2_DYNDEP of CM_CAM_DYNAMICDEP is read only.
>
>> are not configurable. But with static dep. you can over-ride that behavior
>> as you have done.
>>
>> This will impact power since l3_2 can't idle as long as iss clock
>> domain is active.
>>
>> I need to check internal code-base but I don't remember this
>> issue observed so far.
>
> In fact, I saw the issue on 3.2.0-rc5-next-20111216, and even
> no such issue on 3.2.0-rc5. ?After some bisecting, I found below
> is the first commit on which the issue can be observed:
>
> commit 3c50729b3fa1cd8ca1f347e6caf1081204cf1a7c
> Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Date: ? Wed Jan 5 22:03:17 2011 +0530
>
> ? ?ARM: OMAP4: PM: Initialise all the clockdomains to supported states
>
> ? ?Initialise hardware supervised mode for all clockdomains if it's
> ? ?supported. Initiate sleep transition for other clockdomains,
> ? ?if they are not being used.
>
Before this patch all clock-domains were  put into SW forcewakeup
and hence the clock domains were not idling. With this patch now, hw
will take control of the clock-domain idle based on the domain
activities.

Regards
Santosh

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-16 13:24 ` Ming Lei
@ 2011-12-16 15:57   ` Ming Lei
  -1 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-16 15:57 UTC (permalink / raw)
  To: linux-omap, Santosh Shilimkar
  Cc: linux-arm-kernel, Paul Walmsley, Rajendra Nayak

Hi,

On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei <tom.leiming@gmail.com> wrote:

> Also I have tried to add 'l3_2_clkdm' into dependency table of iss_clkdm in [2],
> and it doesn't work.

Also, I still have the question why the static dependency isn't generated from
the table .wkdep_srcs of struct clockdomain? Seems the static dep info has been
put inside the tables.

thanks,
-- 
Ming Lei

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-16 15:57   ` Ming Lei
  0 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-16 15:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei <tom.leiming@gmail.com> wrote:

> Also I have tried to add 'l3_2_clkdm' into dependency table of iss_clkdm in [2],
> and it doesn't work.

Also, I still have the question why the static dependency isn't generated from
the table .wkdep_srcs of struct clockdomain? Seems the static dep info has been
put inside the tables.

thanks,
-- 
Ming Lei

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-16 15:57   ` Ming Lei
@ 2011-12-16 16:09     ` Shilimkar, Santosh
  -1 siblings, 0 replies; 28+ messages in thread
From: Shilimkar, Santosh @ 2011-12-16 16:09 UTC (permalink / raw)
  To: Ming Lei; +Cc: linux-omap, linux-arm-kernel, Paul Walmsley, Rajendra Nayak

On Fri, Dec 16, 2011 at 9:27 PM, Ming Lei <tom.leiming@gmail.com> wrote:
> Hi,
>
> On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>
>> Also I have tried to add 'l3_2_clkdm' into dependency table of iss_clkdm in [2],
>> and it doesn't work.
>
> Also, I still have the question why the static dependency isn't generated from
> the table .wkdep_srcs of struct clockdomain? Seems the static dep info has been
> put inside the tables.
>
No. The table reflects the actual possible combination on hardware. You can't
add anything there arbitrary if that combination is not supported.

But that makes me wonder how the patch worked. I will look at this in detail
next week.

Regards
Santosh

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-16 16:09     ` Shilimkar, Santosh
  0 siblings, 0 replies; 28+ messages in thread
From: Shilimkar, Santosh @ 2011-12-16 16:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 16, 2011 at 9:27 PM, Ming Lei <tom.leiming@gmail.com> wrote:
> Hi,
>
> On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>
>> Also I have tried to add 'l3_2_clkdm' into dependency table of iss_clkdm in [2],
>> and it doesn't work.
>
> Also, I still have the question why the static dependency isn't generated from
> the table .wkdep_srcs of struct clockdomain? Seems the static dep info has been
> put inside the tables.
>
No. The table reflects the actual possible combination on hardware. You can't
add anything there arbitrary if that combination is not supported.

But that makes me wonder how the patch worked. I will look at this in detail
next week.

Regards
Santosh

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-16 16:09     ` Shilimkar, Santosh
@ 2011-12-16 16:33       ` Ming Lei
  -1 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-16 16:33 UTC (permalink / raw)
  To: Shilimkar, Santosh
  Cc: linux-omap, linux-arm-kernel, Paul Walmsley, Rajendra Nayak,
	Cousson, Benoit

On Sat, Dec 17, 2011 at 12:09 AM, Shilimkar, Santosh
<santosh.shilimkar@ti.com> wrote:
> No. The table reflects the actual possible combination on hardware. You can't
> add anything there arbitrary if that combination is not supported.
>
> But that makes me wonder how the patch worked. I will look at this in detail
> next week.

Thanks, I use the below hwmod data patch[1] and omap device patch[2]
to bring up fdif module, and Benoit has ACKed on patch [1].


[1], http://marc.info/?l=linux-kernel&m=132387140703874&w=2
[2], http://marc.info/?l=linux-kernel&m=132387155403929&w=2

thanks,
-- 
Ming Lei

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-16 16:33       ` Ming Lei
  0 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-16 16:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Dec 17, 2011 at 12:09 AM, Shilimkar, Santosh
<santosh.shilimkar@ti.com> wrote:
> No. The table reflects the actual possible combination on hardware. You can't
> add anything there arbitrary if that combination is not supported.
>
> But that makes me wonder how the patch worked. I will look at this in detail
> next week.

Thanks, I use the below hwmod data patch[1] and omap device patch[2]
to bring up fdif module, and Benoit has ACKed on patch [1].


[1], http://marc.info/?l=linux-kernel&m=132387140703874&w=2
[2], http://marc.info/?l=linux-kernel&m=132387155403929&w=2

thanks,
-- 
Ming Lei

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-16 16:33       ` Ming Lei
@ 2011-12-19  6:17         ` Shilimkar, Santosh
  -1 siblings, 0 replies; 28+ messages in thread
From: Shilimkar, Santosh @ 2011-12-19  6:17 UTC (permalink / raw)
  To: Ming Lei
  Cc: linux-omap, linux-arm-kernel, Paul Walmsley, Rajendra Nayak,
	Cousson, Benoit

On Fri, Dec 16, 2011 at 10:03 PM, Ming Lei <tom.leiming@gmail.com> wrote:
> On Sat, Dec 17, 2011 at 12:09 AM, Shilimkar, Santosh
> <santosh.shilimkar@ti.com> wrote:
>> No. The table reflects the actual possible combination on hardware. You can't
>> add anything there arbitrary if that combination is not supported.
>>
>> But that makes me wonder how the patch worked. I will look at this in detail
>> next week.
>
> Thanks, I use the below hwmod data patch[1] and omap device patch[2]
> to bring up fdif module, and Benoit has ACKed on patch [1].
>
>
> [1], http://marc.info/?l=linux-kernel&m=132387140703874&w=2
> [2], http://marc.info/?l=linux-kernel&m=132387155403929&w=2
>
The patches are fine but I am surprised that 'dyndep.patch' is helping you.
L3_2 dependency is always enabled with ISS or Camera and it
should have worked.
clkdm_add_wkdep(iss_clkdm, l3_2_clkdm), shoudn't do anything since
the bit is read-only.

Can you check value of CM_CAM_STATICDEP [ 0x4A009004],
after your patch. I am suspecting that for some reason l3_1 dep.
is getting enabled which might be helping your case.

Regards
Santosh

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-19  6:17         ` Shilimkar, Santosh
  0 siblings, 0 replies; 28+ messages in thread
From: Shilimkar, Santosh @ 2011-12-19  6:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 16, 2011 at 10:03 PM, Ming Lei <tom.leiming@gmail.com> wrote:
> On Sat, Dec 17, 2011 at 12:09 AM, Shilimkar, Santosh
> <santosh.shilimkar@ti.com> wrote:
>> No. The table reflects the actual possible combination on hardware. You can't
>> add anything there arbitrary if that combination is not supported.
>>
>> But that makes me wonder how the patch worked. I will look at this in detail
>> next week.
>
> Thanks, I use the below hwmod data patch[1] and omap device patch[2]
> to bring up fdif module, and Benoit has ACKed on patch [1].
>
>
> [1], http://marc.info/?l=linux-kernel&m=132387140703874&w=2
> [2], http://marc.info/?l=linux-kernel&m=132387155403929&w=2
>
The patches are fine but I am surprised that 'dyndep.patch' is helping you.
L3_2 dependency is always enabled with ISS or Camera and it
should have worked.
clkdm_add_wkdep(iss_clkdm, l3_2_clkdm), shoudn't do anything since
the bit is read-only.

Can you check value of CM_CAM_STATICDEP [ 0x4A009004],
after your patch. I am suspecting that for some reason l3_1 dep.
is getting enabled which might be helping your case.

Regards
Santosh

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-19  6:17         ` Shilimkar, Santosh
@ 2011-12-23  8:30           ` Ming Lei
  -1 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-23  8:30 UTC (permalink / raw)
  To: Shilimkar, Santosh
  Cc: linux-omap, linux-arm-kernel, Paul Walmsley, Rajendra Nayak,
	Cousson, Benoit

Hi Shilimkar,

Sorry for the delay.

On Mon, Dec 19, 2011 at 2:17 PM, Shilimkar, Santosh
<santosh.shilimkar@ti.com> wrote:

> The patches are fine but I am surprised that 'dyndep.patch' is helping you.
> L3_2 dependency is always enabled with ISS or Camera and it
> should have worked.
> clkdm_add_wkdep(iss_clkdm, l3_2_clkdm), shoudn't do anything since
> the bit is read-only.

Yes, you are right. After some investigating, I found that
clkdm_add_wkdep(iss_clkdm, l3_2_clkdm) returns failure, so clkdms_setup
is bypassed and the issue is avoided.

>
> Can you check value of CM_CAM_STATICDEP [ 0x4A009004],

The value is 0x40 after and before the patch.

> after your patch. I am suspecting that for some reason l3_1 dep.
> is getting enabled which might be helping your case.

Seems no changes after adding clkdm_add_wkdep(iss_clkdm, l3_1_clkdm)
on the problem.

The only change on iss(CAM) clock domain setting in your commit[1] is to
configure CLKTRCTRL as HW_AUTO, instead of previous  SW_WKUP.
Once I change flags of iss to CLKDM_CAN_SWSUP [2], the issue can be
fixed, so I am wondering if something is wrong about HW_AUTO mode
of CAM clock domain.


-- Ming Lei

[1],  ARM: OMAP4: PM: Initialise all the clockdomains to supported states

[2],  diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c
b/arch/arm/mach-omap2/clockdomains44xx_data.c
index 9299ac2..1dfc7ce 100644
--- a/arch/arm/mach-omap2/clockdomains44xx_data.c
+++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
@@ -359,7 +359,7 @@ static struct clockdomain iss_44xx_clkdm = {
        .clkdm_offs       = OMAP4430_CM2_CAM_CAM_CDOFFS,
        .wkdep_srcs       = iss_wkup_sleep_deps,
        .sleepdep_srcs    = iss_wkup_sleep_deps,
-       .flags            = CLKDM_CAN_HWSUP_SWSUP,
+       .flags            = CLKDM_CAN_SWSUP,
 };
--
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 related	[flat|nested] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-23  8:30           ` Ming Lei
  0 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-23  8:30 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Shilimkar,

Sorry for the delay.

On Mon, Dec 19, 2011 at 2:17 PM, Shilimkar, Santosh
<santosh.shilimkar@ti.com> wrote:

> The patches are fine but I am surprised that 'dyndep.patch' is helping you.
> L3_2 dependency is always enabled with ISS or Camera and it
> should have worked.
> clkdm_add_wkdep(iss_clkdm, l3_2_clkdm), shoudn't do anything since
> the bit is read-only.

Yes, you are right. After some investigating, I found that
clkdm_add_wkdep(iss_clkdm, l3_2_clkdm) returns failure, so clkdms_setup
is bypassed and the issue is avoided.

>
> Can you check value of CM_CAM_STATICDEP [ 0x4A009004],

The value is 0x40 after and before the patch.

> after your patch. I am suspecting that for some reason l3_1 dep.
> is getting enabled which might be helping your case.

Seems no changes after adding clkdm_add_wkdep(iss_clkdm, l3_1_clkdm)
on the problem.

The only change on iss(CAM) clock domain setting in your commit[1] is to
configure CLKTRCTRL as HW_AUTO, instead of previous  SW_WKUP.
Once I change flags of iss to CLKDM_CAN_SWSUP [2], the issue can be
fixed, so I am wondering if something is wrong about HW_AUTO mode
of CAM clock domain.


--?Ming Lei

[1],  ARM: OMAP4: PM: Initialise all the clockdomains to supported states

[2],  diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c
b/arch/arm/mach-omap2/clockdomains44xx_data.c
index 9299ac2..1dfc7ce 100644
--- a/arch/arm/mach-omap2/clockdomains44xx_data.c
+++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
@@ -359,7 +359,7 @@ static struct clockdomain iss_44xx_clkdm = {
        .clkdm_offs       = OMAP4430_CM2_CAM_CAM_CDOFFS,
        .wkdep_srcs       = iss_wkup_sleep_deps,
        .sleepdep_srcs    = iss_wkup_sleep_deps,
-       .flags            = CLKDM_CAN_HWSUP_SWSUP,
+       .flags            = CLKDM_CAN_SWSUP,
 };

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-23  8:30           ` Ming Lei
@ 2011-12-23  8:45             ` Shilimkar, Santosh
  -1 siblings, 0 replies; 28+ messages in thread
From: Shilimkar, Santosh @ 2011-12-23  8:45 UTC (permalink / raw)
  To: Ming Lei, Miguel Vadillo, Benoit Cousson
  Cc: linux-omap, linux-arm-kernel, Paul Walmsley, Rajendra Nayak

[-- Attachment #1: Type: text/plain, Size: 3167 bytes --]

On Fri, Dec 23, 2011 at 2:00 PM, Ming Lei <tom.leiming@gmail.com> wrote:
> Hi Shilimkar,
>
> Sorry for the delay.
>
> On Mon, Dec 19, 2011 at 2:17 PM, Shilimkar, Santosh
> <santosh.shilimkar@ti.com> wrote:
>
>> The patches are fine but I am surprised that 'dyndep.patch' is helping you.
>> L3_2 dependency is always enabled with ISS or Camera and it
>> should have worked.
>> clkdm_add_wkdep(iss_clkdm, l3_2_clkdm), shoudn't do anything since
>> the bit is read-only.
>
> Yes, you are right. After some investigating, I found that
> clkdm_add_wkdep(iss_clkdm, l3_2_clkdm) returns failure, so clkdms_setup
> is bypassed and the issue is avoided.
>
Good.

>>
>> Can you check value of CM_CAM_STATICDEP [ 0x4A009004],
>
> The value is 0x40 after and before the patch.
>
>> after your patch. I am suspecting that for some reason l3_1 dep.
>> is getting enabled which might be helping your case.
>
> Seems no changes after adding clkdm_add_wkdep(iss_clkdm, l3_1_clkdm)
> on the problem.
>
> The only change on iss(CAM) clock domain setting in your commit[1] is to
> configure CLKTRCTRL as HW_AUTO, instead of previous  SW_WKUP.
> Once I change flags of iss to CLKDM_CAN_SWSUP [2], the issue can be
> fixed, so I am wondering if something is wrong about HW_AUTO mode
> of CAM clock domain.
>
Now I recollect the issue and also track a patch in the internal product tree.
Same is attached and also in the end of the email.

I am lopping Miguel who wrote the patch and Benoit who acked it.
This should sort out your issue as you have already verified it works.

Regards
Santosh

>From 972d7bb544d3197d7fc1a6c6eb0e2c9cc08d5e9d Mon Sep 17 00:00:00 2001
From: Miguel Vadillo <vadillo@ti.com>
Date: Tue, 21 Jun 2011 09:59:45 -0500
Subject: [PATCH 1/2] OMAP: clockdomain: set iss clk domain to just SWSUP

Since CAM domain(ISS) has no module wake-up dependency
with any other clock domain of the device and the dynamic
dependency from L3_main_2 is always disabled, the domain
needs to be in force wakeup in order to be able to access
it for configure(sysconfig) it or use it.

Also since there is no clock in the domain managed automatically
by the hardware, there is no use to configure automatic
clock domain transition. SW should keep the SW_WKUP domain
transition as long as a module in the domain is required to
be functional.

Signed-off-by: Miguel Vadillo <vadillo@ti.com>
Acked-by: Benoit Cousson<b-cousson@ti.com>
---
 arch/arm/mach-omap2/clockdomains44xx_data.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c
b/arch/arm/mach-omap2/clockdomains44xx_data.c
index 6ac8fe2..8d1a061 100644
--- a/arch/arm/mach-omap2/clockdomains44xx_data.c
+++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
@@ -605,7 +605,7 @@ static struct clockdomain iss_44xx_clkdm = {
 	.clkdm_offs	  = OMAP4430_CM2_CAM_CAM_CDOFFS,
 	.wkdep_srcs	  = iss_wkup_sleep_deps,
 	.sleepdep_srcs	  = iss_wkup_sleep_deps,
-	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
+	.flags		  = CLKDM_CAN_SWSUP,
 	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP44XX),
 };

-- 
1.7.4.1

[-- Attachment #2: 0001-OMAP-clockdomain-set-iss-clk-domain-to-just-SWSUP.patch --]
[-- Type: application/octet-stream, Size: 1512 bytes --]

From 972d7bb544d3197d7fc1a6c6eb0e2c9cc08d5e9d Mon Sep 17 00:00:00 2001
From: Miguel Vadillo <vadillo@ti.com>
Date: Tue, 21 Jun 2011 09:59:45 -0500
Subject: [PATCH 1/2] OMAP: clockdomain: set iss clk domain to just SWSUP

Since CAM domain(ISS) has no module wake-up dependency
with any other clock domain of the device and the dynamic
dependency from L3_main_2 is always disabled, the domain
needs to be in force wakeup in order to be able to access
it for configure(sysconfig) it or use it.

Also since there is no clock in the domain managed automatically
by the hardware, there is no use to configure automatic
clock domain transition. SW should keep the SW_WKUP domain
transition as long as a module in the domain is required to
be functional.

Signed-off-by: Miguel Vadillo <vadillo@ti.com>
Acked-by: Benoit Cousson<b-cousson@ti.com>
---
 arch/arm/mach-omap2/clockdomains44xx_data.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c
index 6ac8fe2..8d1a061 100644
--- a/arch/arm/mach-omap2/clockdomains44xx_data.c
+++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
@@ -605,7 +605,7 @@ static struct clockdomain iss_44xx_clkdm = {
 	.clkdm_offs	  = OMAP4430_CM2_CAM_CAM_CDOFFS,
 	.wkdep_srcs	  = iss_wkup_sleep_deps,
 	.sleepdep_srcs	  = iss_wkup_sleep_deps,
-	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
+	.flags		  = CLKDM_CAN_SWSUP,
 	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP44XX),
 };
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-23  8:45             ` Shilimkar, Santosh
  0 siblings, 0 replies; 28+ messages in thread
From: Shilimkar, Santosh @ 2011-12-23  8:45 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 23, 2011 at 2:00 PM, Ming Lei <tom.leiming@gmail.com> wrote:
> Hi Shilimkar,
>
> Sorry for the delay.
>
> On Mon, Dec 19, 2011 at 2:17 PM, Shilimkar, Santosh
> <santosh.shilimkar@ti.com> wrote:
>
>> The patches are fine but I am surprised that 'dyndep.patch' is helping you.
>> L3_2 dependency is always enabled with ISS or Camera and it
>> should have worked.
>> clkdm_add_wkdep(iss_clkdm, l3_2_clkdm), shoudn't do anything since
>> the bit is read-only.
>
> Yes, you are right. After some investigating, I found that
> clkdm_add_wkdep(iss_clkdm, l3_2_clkdm) returns failure, so clkdms_setup
> is bypassed and the issue is avoided.
>
Good.

>>
>> Can you check value of CM_CAM_STATICDEP [ 0x4A009004],
>
> The value is 0x40 after and before the patch.
>
>> after your patch. I am suspecting that for some reason l3_1 dep.
>> is getting enabled which might be helping your case.
>
> Seems no changes after adding clkdm_add_wkdep(iss_clkdm, l3_1_clkdm)
> on the problem.
>
> The only change on iss(CAM) clock domain setting in your commit[1] is to
> configure CLKTRCTRL as HW_AUTO, instead of previous ?SW_WKUP.
> Once I change flags of iss to CLKDM_CAN_SWSUP [2], the issue can be
> fixed, so I am wondering if something is wrong about HW_AUTO mode
> of CAM clock domain.
>
Now I recollect the issue and also track a patch in the internal product tree.
Same is attached and also in the end of the email.

I am lopping Miguel who wrote the patch and Benoit who acked it.
This should sort out your issue as you have already verified it works.

Regards
Santosh

>From 972d7bb544d3197d7fc1a6c6eb0e2c9cc08d5e9d Mon Sep 17 00:00:00 2001
From: Miguel Vadillo <vadillo@ti.com>
Date: Tue, 21 Jun 2011 09:59:45 -0500
Subject: [PATCH 1/2] OMAP: clockdomain: set iss clk domain to just SWSUP

Since CAM domain(ISS) has no module wake-up dependency
with any other clock domain of the device and the dynamic
dependency from L3_main_2 is always disabled, the domain
needs to be in force wakeup in order to be able to access
it for configure(sysconfig) it or use it.

Also since there is no clock in the domain managed automatically
by the hardware, there is no use to configure automatic
clock domain transition. SW should keep the SW_WKUP domain
transition as long as a module in the domain is required to
be functional.

Signed-off-by: Miguel Vadillo <vadillo@ti.com>
Acked-by: Benoit Cousson<b-cousson@ti.com>
---
 arch/arm/mach-omap2/clockdomains44xx_data.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c
b/arch/arm/mach-omap2/clockdomains44xx_data.c
index 6ac8fe2..8d1a061 100644
--- a/arch/arm/mach-omap2/clockdomains44xx_data.c
+++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
@@ -605,7 +605,7 @@ static struct clockdomain iss_44xx_clkdm = {
 	.clkdm_offs	  = OMAP4430_CM2_CAM_CAM_CDOFFS,
 	.wkdep_srcs	  = iss_wkup_sleep_deps,
 	.sleepdep_srcs	  = iss_wkup_sleep_deps,
-	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
+	.flags		  = CLKDM_CAN_SWSUP,
 	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP44XX),
 };

-- 
1.7.4.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-OMAP-clockdomain-set-iss-clk-domain-to-just-SWSUP.patch
Type: application/octet-stream
Size: 1512 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111223/28f40b57/attachment.obj>

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-23  8:45             ` Shilimkar, Santosh
@ 2011-12-23  9:01               ` Cousson, Benoit
  -1 siblings, 0 replies; 28+ messages in thread
From: Cousson, Benoit @ 2011-12-23  9:01 UTC (permalink / raw)
  To: Shilimkar, Santosh, Paul Walmsley
  Cc: Ming Lei, Miguel Vadillo, linux-omap, linux-arm-kernel, Rajendra Nayak

Hi Santosh,

On 12/23/2011 9:45 AM, Shilimkar, Santosh wrote:
> On Fri, Dec 23, 2011 at 2:00 PM, Ming Lei<tom.leiming@gmail.com>  wrote:

[...]

>> The only change on iss(CAM) clock domain setting in your commit[1] is to
>> configure CLKTRCTRL as HW_AUTO, instead of previous  SW_WKUP.
>> Once I change flags of iss to CLKDM_CAN_SWSUP [2], the issue can be
>> fixed, so I am wondering if something is wrong about HW_AUTO mode
>> of CAM clock domain.
>>
> Now I recollect the issue and also track a patch in the internal product tree.
> Same is attached and also in the end of the email.
>
> I am lopping Miguel who wrote the patch and Benoit who acked it.
> This should sort out your issue as you have already verified it works.

Ooops, that remains me that I forgot to push it upstream:-(

Since this is a bug fix, if this is too late for 3.3, we can try to push 
it during rc phases.

Paul,

Is that fine for you?

Regards,
Benoit

> From 972d7bb544d3197d7fc1a6c6eb0e2c9cc08d5e9d Mon Sep 17 00:00:00 2001
> From: Miguel Vadillo<vadillo@ti.com>
> Date: Tue, 21 Jun 2011 09:59:45 -0500
> Subject: [PATCH 1/2] OMAP: clockdomain: set iss clk domain to just SWSUP
>
> Since CAM domain(ISS) has no module wake-up dependency
> with any other clock domain of the device and the dynamic
> dependency from L3_main_2 is always disabled, the domain
> needs to be in force wakeup in order to be able to access
> it for configure(sysconfig) it or use it.
>
> Also since there is no clock in the domain managed automatically
> by the hardware, there is no use to configure automatic
> clock domain transition. SW should keep the SW_WKUP domain
> transition as long as a module in the domain is required to
> be functional.
>
> Signed-off-by: Miguel Vadillo<vadillo@ti.com>
> Acked-by: Benoit Cousson<b-cousson@ti.com>
> ---
>   arch/arm/mach-omap2/clockdomains44xx_data.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c
> b/arch/arm/mach-omap2/clockdomains44xx_data.c
> index 6ac8fe2..8d1a061 100644
> --- a/arch/arm/mach-omap2/clockdomains44xx_data.c
> +++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
> @@ -605,7 +605,7 @@ static struct clockdomain iss_44xx_clkdm = {
>   	.clkdm_offs	  = OMAP4430_CM2_CAM_CAM_CDOFFS,
>   	.wkdep_srcs	  = iss_wkup_sleep_deps,
>   	.sleepdep_srcs	  = iss_wkup_sleep_deps,
> -	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
> +	.flags		  = CLKDM_CAN_SWSUP,
>   	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP44XX),
>   };
>


^ permalink raw reply	[flat|nested] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-23  9:01               ` Cousson, Benoit
  0 siblings, 0 replies; 28+ messages in thread
From: Cousson, Benoit @ 2011-12-23  9:01 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Santosh,

On 12/23/2011 9:45 AM, Shilimkar, Santosh wrote:
> On Fri, Dec 23, 2011 at 2:00 PM, Ming Lei<tom.leiming@gmail.com>  wrote:

[...]

>> The only change on iss(CAM) clock domain setting in your commit[1] is to
>> configure CLKTRCTRL as HW_AUTO, instead of previous  SW_WKUP.
>> Once I change flags of iss to CLKDM_CAN_SWSUP [2], the issue can be
>> fixed, so I am wondering if something is wrong about HW_AUTO mode
>> of CAM clock domain.
>>
> Now I recollect the issue and also track a patch in the internal product tree.
> Same is attached and also in the end of the email.
>
> I am lopping Miguel who wrote the patch and Benoit who acked it.
> This should sort out your issue as you have already verified it works.

Ooops, that remains me that I forgot to push it upstream:-(

Since this is a bug fix, if this is too late for 3.3, we can try to push 
it during rc phases.

Paul,

Is that fine for you?

Regards,
Benoit

> From 972d7bb544d3197d7fc1a6c6eb0e2c9cc08d5e9d Mon Sep 17 00:00:00 2001
> From: Miguel Vadillo<vadillo@ti.com>
> Date: Tue, 21 Jun 2011 09:59:45 -0500
> Subject: [PATCH 1/2] OMAP: clockdomain: set iss clk domain to just SWSUP
>
> Since CAM domain(ISS) has no module wake-up dependency
> with any other clock domain of the device and the dynamic
> dependency from L3_main_2 is always disabled, the domain
> needs to be in force wakeup in order to be able to access
> it for configure(sysconfig) it or use it.
>
> Also since there is no clock in the domain managed automatically
> by the hardware, there is no use to configure automatic
> clock domain transition. SW should keep the SW_WKUP domain
> transition as long as a module in the domain is required to
> be functional.
>
> Signed-off-by: Miguel Vadillo<vadillo@ti.com>
> Acked-by: Benoit Cousson<b-cousson@ti.com>
> ---
>   arch/arm/mach-omap2/clockdomains44xx_data.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c
> b/arch/arm/mach-omap2/clockdomains44xx_data.c
> index 6ac8fe2..8d1a061 100644
> --- a/arch/arm/mach-omap2/clockdomains44xx_data.c
> +++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
> @@ -605,7 +605,7 @@ static struct clockdomain iss_44xx_clkdm = {
>   	.clkdm_offs	  = OMAP4430_CM2_CAM_CAM_CDOFFS,
>   	.wkdep_srcs	  = iss_wkup_sleep_deps,
>   	.sleepdep_srcs	  = iss_wkup_sleep_deps,
> -	.flags		  = CLKDM_CAN_HWSUP_SWSUP,
> +	.flags		  = CLKDM_CAN_SWSUP,
>   	.omap_chip	  = OMAP_CHIP_INIT(CHIP_IS_OMAP44XX),
>   };
>

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-23  8:45             ` Shilimkar, Santosh
@ 2011-12-23  9:05               ` Ming Lei
  -1 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-23  9:05 UTC (permalink / raw)
  To: Shilimkar, Santosh
  Cc: Miguel Vadillo, Benoit Cousson, linux-omap, linux-arm-kernel,
	Paul Walmsley, Rajendra Nayak

On Fri, Dec 23, 2011 at 4:45 PM, Shilimkar, Santosh
<santosh.shilimkar@ti.com> wrote:
> On Fri, Dec 23, 2011 at 2:00 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>> Hi Shilimkar,
>>
>> Sorry for the delay.
>>
>> On Mon, Dec 19, 2011 at 2:17 PM, Shilimkar, Santosh
>> <santosh.shilimkar@ti.com> wrote:
>>
>>> The patches are fine but I am surprised that 'dyndep.patch' is helping you.
>>> L3_2 dependency is always enabled with ISS or Camera and it
>>> should have worked.
>>> clkdm_add_wkdep(iss_clkdm, l3_2_clkdm), shoudn't do anything since
>>> the bit is read-only.
>>
>> Yes, you are right. After some investigating, I found that
>> clkdm_add_wkdep(iss_clkdm, l3_2_clkdm) returns failure, so clkdms_setup
>> is bypassed and the issue is avoided.
>>
> Good.
>
>>>
>>> Can you check value of CM_CAM_STATICDEP [ 0x4A009004],
>>
>> The value is 0x40 after and before the patch.
>>
>>> after your patch. I am suspecting that for some reason l3_1 dep.
>>> is getting enabled which might be helping your case.
>>
>> Seems no changes after adding clkdm_add_wkdep(iss_clkdm, l3_1_clkdm)
>> on the problem.
>>
>> The only change on iss(CAM) clock domain setting in your commit[1] is to
>> configure CLKTRCTRL as HW_AUTO, instead of previous  SW_WKUP.
>> Once I change flags of iss to CLKDM_CAN_SWSUP [2], the issue can be
>> fixed, so I am wondering if something is wrong about HW_AUTO mode
>> of CAM clock domain.
>>
> Now I recollect the issue and also track a patch in the internal product tree.
> Same is attached and also in the end of the email.
>
> I am lopping Miguel who wrote the patch and Benoit who acked it.
> This should sort out your issue as you have already verified it works.

Yes, I am sure.

> Regards
> Santosh
>
> From 972d7bb544d3197d7fc1a6c6eb0e2c9cc08d5e9d Mon Sep 17 00:00:00 2001
> From: Miguel Vadillo <vadillo@ti.com>
> Date: Tue, 21 Jun 2011 09:59:45 -0500
> Subject: [PATCH 1/2] OMAP: clockdomain: set iss clk domain to just SWSUP
>
> Since CAM domain(ISS) has no module wake-up dependency
> with any other clock domain of the device and the dynamic
> dependency from L3_main_2 is always disabled, the domain
> needs to be in force wakeup in order to be able to access
> it for configure(sysconfig) it or use it.
>
> Also since there is no clock in the domain managed automatically
> by the hardware, there is no use to configure automatic
> clock domain transition. SW should keep the SW_WKUP domain
> transition as long as a module in the domain is required to
> be functional.
>
> Signed-off-by: Miguel Vadillo <vadillo@ti.com>
> Acked-by: Benoit Cousson<b-cousson@ti.com>

Please feel free to add:

       Reported-and-tested-by: Ming Lei <ming.lei@canonical.com>

> ---
>  arch/arm/mach-omap2/clockdomains44xx_data.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c
> b/arch/arm/mach-omap2/clockdomains44xx_data.c
> index 6ac8fe2..8d1a061 100644
> --- a/arch/arm/mach-omap2/clockdomains44xx_data.c
> +++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
> @@ -605,7 +605,7 @@ static struct clockdomain iss_44xx_clkdm = {
>        .clkdm_offs       = OMAP4430_CM2_CAM_CAM_CDOFFS,
>        .wkdep_srcs       = iss_wkup_sleep_deps,
>        .sleepdep_srcs    = iss_wkup_sleep_deps,
> -       .flags            = CLKDM_CAN_HWSUP_SWSUP,
> +       .flags            = CLKDM_CAN_SWSUP,
>        .omap_chip        = OMAP_CHIP_INIT(CHIP_IS_OMAP44XX),
>  };
>
> --
> 1.7.4.1


thanks,
-- 
Ming Lei
--
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] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-23  9:05               ` Ming Lei
  0 siblings, 0 replies; 28+ messages in thread
From: Ming Lei @ 2011-12-23  9:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 23, 2011 at 4:45 PM, Shilimkar, Santosh
<santosh.shilimkar@ti.com> wrote:
> On Fri, Dec 23, 2011 at 2:00 PM, Ming Lei <tom.leiming@gmail.com> wrote:
>> Hi Shilimkar,
>>
>> Sorry for the delay.
>>
>> On Mon, Dec 19, 2011 at 2:17 PM, Shilimkar, Santosh
>> <santosh.shilimkar@ti.com> wrote:
>>
>>> The patches are fine but I am surprised that 'dyndep.patch' is helping you.
>>> L3_2 dependency is always enabled with ISS or Camera and it
>>> should have worked.
>>> clkdm_add_wkdep(iss_clkdm, l3_2_clkdm), shoudn't do anything since
>>> the bit is read-only.
>>
>> Yes, you are right. After some investigating, I found that
>> clkdm_add_wkdep(iss_clkdm, l3_2_clkdm) returns failure, so clkdms_setup
>> is bypassed and the issue is avoided.
>>
> Good.
>
>>>
>>> Can you check value of CM_CAM_STATICDEP [ 0x4A009004],
>>
>> The value is 0x40 after and before the patch.
>>
>>> after your patch. I am suspecting that for some reason l3_1 dep.
>>> is getting enabled which might be helping your case.
>>
>> Seems no changes after adding clkdm_add_wkdep(iss_clkdm, l3_1_clkdm)
>> on the problem.
>>
>> The only change on iss(CAM) clock domain setting in your commit[1] is to
>> configure CLKTRCTRL as HW_AUTO, instead of previous ?SW_WKUP.
>> Once I change flags of iss to CLKDM_CAN_SWSUP [2], the issue can be
>> fixed, so I am wondering if something is wrong about HW_AUTO mode
>> of CAM clock domain.
>>
> Now I recollect the issue and also track a patch in the internal product tree.
> Same is attached and also in the end of the email.
>
> I am lopping Miguel who wrote the patch and Benoit who acked it.
> This should sort out your issue as you have already verified it works.

Yes, I am sure.

> Regards
> Santosh
>
> From 972d7bb544d3197d7fc1a6c6eb0e2c9cc08d5e9d Mon Sep 17 00:00:00 2001
> From: Miguel Vadillo <vadillo@ti.com>
> Date: Tue, 21 Jun 2011 09:59:45 -0500
> Subject: [PATCH 1/2] OMAP: clockdomain: set iss clk domain to just SWSUP
>
> Since CAM domain(ISS) has no module wake-up dependency
> with any other clock domain of the device and the dynamic
> dependency from L3_main_2 is always disabled, the domain
> needs to be in force wakeup in order to be able to access
> it for configure(sysconfig) it or use it.
>
> Also since there is no clock in the domain managed automatically
> by the hardware, there is no use to configure automatic
> clock domain transition. SW should keep the SW_WKUP domain
> transition as long as a module in the domain is required to
> be functional.
>
> Signed-off-by: Miguel Vadillo <vadillo@ti.com>
> Acked-by: Benoit Cousson<b-cousson@ti.com>

Please feel free to add:

       Reported-and-tested-by: Ming Lei <ming.lei@canonical.com>

> ---
> ?arch/arm/mach-omap2/clockdomains44xx_data.c | ? ?2 +-
> ?1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c
> b/arch/arm/mach-omap2/clockdomains44xx_data.c
> index 6ac8fe2..8d1a061 100644
> --- a/arch/arm/mach-omap2/clockdomains44xx_data.c
> +++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
> @@ -605,7 +605,7 @@ static struct clockdomain iss_44xx_clkdm = {
> ? ? ? ?.clkdm_offs ? ? ? = OMAP4430_CM2_CAM_CAM_CDOFFS,
> ? ? ? ?.wkdep_srcs ? ? ? = iss_wkup_sleep_deps,
> ? ? ? ?.sleepdep_srcs ? ?= iss_wkup_sleep_deps,
> - ? ? ? .flags ? ? ? ? ? ?= CLKDM_CAN_HWSUP_SWSUP,
> + ? ? ? .flags ? ? ? ? ? ?= CLKDM_CAN_SWSUP,
> ? ? ? ?.omap_chip ? ? ? ?= OMAP_CHIP_INIT(CHIP_IS_OMAP44XX),
> ?};
>
> --
> 1.7.4.1


thanks,
-- 
Ming Lei

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [QUESTION] How to set static/dynamic dependency between clock domains
  2011-12-23  9:01               ` Cousson, Benoit
@ 2011-12-23  9:37                 ` Shilimkar, Santosh
  -1 siblings, 0 replies; 28+ messages in thread
From: Shilimkar, Santosh @ 2011-12-23  9:37 UTC (permalink / raw)
  To: Cousson, Benoit
  Cc: Paul Walmsley, Ming Lei, Miguel Vadillo, linux-omap,
	linux-arm-kernel, Rajendra Nayak

On Fri, Dec 23, 2011 at 2:31 PM, Cousson, Benoit <b-cousson@ti.com> wrote:
> Hi Santosh,
>
>
> On 12/23/2011 9:45 AM, Shilimkar, Santosh wrote:
>>
>> On Fri, Dec 23, 2011 at 2:00 PM, Ming Lei<tom.leiming@gmail.com>  wrote:
>
>
> [...]
>
>
>>> The only change on iss(CAM) clock domain setting in your commit[1] is to
>>> configure CLKTRCTRL as HW_AUTO, instead of previous  SW_WKUP.
>>> Once I change flags of iss to CLKDM_CAN_SWSUP [2], the issue can be
>>> fixed, so I am wondering if something is wrong about HW_AUTO mode
>>> of CAM clock domain.
>>>
>> Now I recollect the issue and also track a patch in the internal product
>> tree.
>> Same is attached and also in the end of the email.
>>
>> I am lopping Miguel who wrote the patch and Benoit who acked it.
>> This should sort out your issue as you have already verified it works.
>
>
> Ooops, that remains me that I forgot to push it upstream:-(
>
> Since this is a bug fix, if this is too late for 3.3, we can try to push it
> during rc phases.
>
Cool. Thanks for picking it up

Regards
Santosh
--
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] 28+ messages in thread

* [QUESTION] How to set static/dynamic dependency between clock domains
@ 2011-12-23  9:37                 ` Shilimkar, Santosh
  0 siblings, 0 replies; 28+ messages in thread
From: Shilimkar, Santosh @ 2011-12-23  9:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 23, 2011 at 2:31 PM, Cousson, Benoit <b-cousson@ti.com> wrote:
> Hi Santosh,
>
>
> On 12/23/2011 9:45 AM, Shilimkar, Santosh wrote:
>>
>> On Fri, Dec 23, 2011 at 2:00 PM, Ming Lei<tom.leiming@gmail.com> ?wrote:
>
>
> [...]
>
>
>>> The only change on iss(CAM) clock domain setting in your commit[1] is to
>>> configure CLKTRCTRL as HW_AUTO, instead of previous ?SW_WKUP.
>>> Once I change flags of iss to CLKDM_CAN_SWSUP [2], the issue can be
>>> fixed, so I am wondering if something is wrong about HW_AUTO mode
>>> of CAM clock domain.
>>>
>> Now I recollect the issue and also track a patch in the internal product
>> tree.
>> Same is attached and also in the end of the email.
>>
>> I am lopping Miguel who wrote the patch and Benoit who acked it.
>> This should sort out your issue as you have already verified it works.
>
>
> Ooops, that remains me that I forgot to push it upstream:-(
>
> Since this is a bug fix, if this is too late for 3.3, we can try to push it
> during rc phases.
>
Cool. Thanks for picking it up

Regards
Santosh

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2011-12-23  9:37 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-16 13:24 [QUESTION] How to set static/dynamic dependency between clock domains Ming Lei
2011-12-16 13:24 ` Ming Lei
2011-12-16 13:50 ` Ming Lei
2011-12-16 13:50   ` Ming Lei
2011-12-16 15:13   ` Shilimkar, Santosh
2011-12-16 15:13     ` Shilimkar, Santosh
2011-12-16 15:46     ` Ming Lei
2011-12-16 15:46       ` Ming Lei
2011-12-16 15:50       ` Shilimkar, Santosh
2011-12-16 15:50         ` Shilimkar, Santosh
2011-12-16 15:57 ` Ming Lei
2011-12-16 15:57   ` Ming Lei
2011-12-16 16:09   ` Shilimkar, Santosh
2011-12-16 16:09     ` Shilimkar, Santosh
2011-12-16 16:33     ` Ming Lei
2011-12-16 16:33       ` Ming Lei
2011-12-19  6:17       ` Shilimkar, Santosh
2011-12-19  6:17         ` Shilimkar, Santosh
2011-12-23  8:30         ` Ming Lei
2011-12-23  8:30           ` Ming Lei
2011-12-23  8:45           ` Shilimkar, Santosh
2011-12-23  8:45             ` Shilimkar, Santosh
2011-12-23  9:01             ` Cousson, Benoit
2011-12-23  9:01               ` Cousson, Benoit
2011-12-23  9:37               ` Shilimkar, Santosh
2011-12-23  9:37                 ` Shilimkar, Santosh
2011-12-23  9:05             ` Ming Lei
2011-12-23  9:05               ` Ming Lei

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.