Re: [QUESTION] How to set static/dynamic dependency between clock domains
Hi Shilimkar, Sorry for the delay. On Mon, Dec 19, 2011 at 2:17 PM, Shilimkar, Santosh santosh.shilim...@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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [QUESTION] How to set static/dynamic dependency between clock domains
On Fri, Dec 23, 2011 at 2:00 PM, Ming Lei tom.leim...@gmail.com wrote: Hi Shilimkar, Sorry for the delay. On Mon, Dec 19, 2011 at 2:17 PM, Shilimkar, Santosh santosh.shilim...@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 vadi...@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 vadi...@ti.com Acked-by: Benoit Coussonb-cous...@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 0001-OMAP-clockdomain-set-iss-clk-domain-to-just-SWSUP.patch Description: Binary data
Re: [QUESTION] How to set static/dynamic dependency between clock domains
Hi Santosh, On 12/23/2011 9:45 AM, Shilimkar, Santosh wrote: On Fri, Dec 23, 2011 at 2:00 PM, Ming Leitom.leim...@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 Vadillovadi...@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 Vadillovadi...@ti.com Acked-by: Benoit Coussonb-cous...@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), }; -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [QUESTION] How to set static/dynamic dependency between clock domains
On Fri, Dec 23, 2011 at 4:45 PM, Shilimkar, Santosh santosh.shilim...@ti.com wrote: On Fri, Dec 23, 2011 at 2:00 PM, Ming Lei tom.leim...@gmail.com wrote: Hi Shilimkar, Sorry for the delay. On Mon, Dec 19, 2011 at 2:17 PM, Shilimkar, Santosh santosh.shilim...@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 vadi...@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 vadi...@ti.com Acked-by: Benoit Coussonb-cous...@ti.com Please feel free to add: Reported-and-tested-by: Ming Lei ming@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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [QUESTION] How to set static/dynamic dependency between clock domains
On Fri, Dec 23, 2011 at 2:31 PM, Cousson, Benoit b-cous...@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 Leitom.leim...@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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [QUESTION] How to set static/dynamic dependency between clock domains
On Fri, Dec 16, 2011 at 10:03 PM, Ming Lei tom.leim...@gmail.com wrote: On Sat, Dec 17, 2011 at 12:09 AM, Shilimkar, Santosh santosh.shilim...@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-kernelm=132387140703874w=2 [2], http://marc.info/?l=linux-kernelm=132387155403929w=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 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [QUESTION] How to set static/dynamic dependency between clock domains
Hi, On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei tom.leim...@gmail.com wrote: [1], add static dependency Sorry for the mess, see attachment for the change. thanks, -- Ming Lei 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);
Re: [QUESTION] How to set static/dynamic dependency between clock domains
On Fri, Dec 16, 2011 at 7:20 PM, Ming Lei tom.leim...@gmail.com wrote: Hi, On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei tom.leim...@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 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [QUESTION] How to set static/dynamic dependency between clock domains
On Fri, Dec 16, 2011 at 11:13 PM, Shilimkar, Santosh santosh.shilim...@ti.com wrote: On Fri, Dec 16, 2011 at 7:20 PM, Ming Lei tom.leim...@gmail.com wrote: Hi, On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei tom.leim...@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.shilim...@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 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [QUESTION] How to set static/dynamic dependency between clock domains
On Fri, Dec 16, 2011 at 9:16 PM, Ming Lei tom.leim...@gmail.com wrote: On Fri, Dec 16, 2011 at 11:13 PM, Shilimkar, Santosh santosh.shilim...@ti.com wrote: On Fri, Dec 16, 2011 at 7:20 PM, Ming Lei tom.leim...@gmail.com wrote: Hi, On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei tom.leim...@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.shilim...@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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [QUESTION] How to set static/dynamic dependency between clock domains
Hi, On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei tom.leim...@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 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [QUESTION] How to set static/dynamic dependency between clock domains
On Fri, Dec 16, 2011 at 9:27 PM, Ming Lei tom.leim...@gmail.com wrote: Hi, On Fri, Dec 16, 2011 at 9:24 PM, Ming Lei tom.leim...@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 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [QUESTION] How to set static/dynamic dependency between clock domains
On Sat, Dec 17, 2011 at 12:09 AM, Shilimkar, Santosh santosh.shilim...@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-kernelm=132387140703874w=2 [2], http://marc.info/?l=linux-kernelm=132387155403929w=2 thanks, -- Ming Lei -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html