ARM: OMAP2PLUS: DSS hwmod fixes
Subsystems (4)
cover ARM: OMAP2PLUS: DSS hwmod fixes
This set makes changes related to the OCPIF_SWSUP_IDLE flag for DSS slave interfaces. This is required since the clocks of these interfaces were changed recently with the patches below for OMAP2, OMAP3 and OMAP4 respectively:
b8ac10d8b75843c9ddd6aadf70a0cdf8aa783659
ARM: OMAP2xxx: HWMOD: fix DSS clock data
6c3d7e34d68ffae888d33bf364f447e0b415591f
ARM: OMAP3: HWMOD: fix DSS clock data
da7cdfac1b0c58d6863532dd3b432c3fbc034978
OMAP4: hwmod data: Change DSS main_clk scheme
Tested on beagle and OMAP4 SDP over 3.4-rc2 kernel.
Archit Taneja (2):
ARM: OMAP2/3: VENC hwmods: Remove OCPIF_SWSUP_IDLE flag from VENC
slave interface
ARM: OMAP4: DSS hwmods: Add OCPIF_SWSUP_IDLE to all DSS L3 slave
interfaces
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 | 7 +++++++ 4 files changed, 7 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/2 ARM: OMAP2/3: VENC hwmods: Remove OCPIF_SWSUP_IDLE flag from VENC slave interface
The clocks for all DSS slave interfaces were recently changed to "dss_ick" on OMAP2 and OMAP3, this clock can be autoidled by PRCM. The VENC interface previously had "dss_54m_fck" as it's clock which couldn't be autoidled, and hence the OCPIF_SWSUP_IDLE flag was needed.
Remove the OCPIF_SWSUP_IDLE flag from VENC interfaces as it's clock is now "dss_ick".
--- 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 - 3 files changed, 0 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/omap_hwmod_2420_data.c +0 -1
@@ -1000,7 +1000,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { .flags = OMAP_FIREWALL_L4, } }, - .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_MPU | OCP_USER_SDMA, };
arch/arm/mach-omap2/omap_hwmod_2430_data.c +0 -1
@@ -1049,7 +1049,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { .slave = &omap2430_dss_venc_hwmod, .clk = "dss_ick", .addr = omap2_dss_venc_addrs, - .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_MPU | OCP_USER_SDMA, };
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0 -1
@@ -1676,7 +1676,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { .flags = OMAP_FIREWALL_L4, } }, - .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_MPU | OCP_USER_SDMA, };
Signature · 1 line
1.7.5.4
Paul Walmsley
maintainerPATCH 1/2 ARM: OMAP2/3: VENC hwmods: Remove OCPIF_SWSUP_IDLE flag from VENC slave interface
Quoted 9 lines · Archit Taneja
The clocks for all DSS slave interfaces were recently changed to "
dss_ick" on OMAP2 and OMAP3, this clock can be autoidled by PRCM. The VENC interface previously had "dss_54m_fck" as it's clock which couldn't be autoidled, and hence theOCPIF_SWSUP_IDLEflag was needed.Remove the
OCPIF_SWSUP_IDLEflag from VENC interfaces as it's clock is now "dss_ick".Signed-off-by Archit Taneja <[email protected]>
Thanks, queued for 3.4-rc.
- Paul
Paul Walmsley
maintainerPATCH 1/2 ARM: OMAP2/3: VENC hwmods: Remove OCPIF_SWSUP_IDLE flag from VENC slave interface
Quoted 7 lines · Paul Walmsley
Quoted 5 lines · Archit Taneja
The clocks for all DSS slave interfaces were recently changed to "
dss_ick" on OMAP2 and OMAP3, this clock can be autoidled by PRCM. The VENC interface previously had "dss_54m_fck" as it's clock which couldn't be autoidled, and hence theOCPIF_SWSUP_IDLEflag was needed.
Quoted 6 lines
Quoted 4 lines
Remove the
OCPIF_SWSUP_IDLEflag from VENC interfaces as it's clock is now "dss_ick".Signed-off-by Archit Taneja <[email protected]>Thanks, queued for 3.4-rc.
By the way, I added another sentence to the commit log to describe what is being fixed. Please let me know if you have any comments.
- Paul
From: Archit Taneja <[email protected]>
Date: Fri, 13 Apr 2012 13:31:55 +0530
Subject: [PATCH 3/3] ARM: OMAP2/3: VENC hwmods: Remove OCPIF_SWSUP_IDLE flag
from VENC slave interface
The clocks for all DSS slave interfaces were recently changed to "dss_ick" on OMAP2 and OMAP3, this clock can be autoidled by PRCM. The VENC interface previously had "dss_54m_fck" as it's clock which couldn't be autoidled, and hence the OCPIF_SWSUP_IDLE flag was needed.
Remove the OCPIF_SWSUP_IDLE flag from VENC interfaces as it's clock is now "dss_ick". This allows the PRCM hardware to autoidle the VENC interface clocks when they are not active, rather than relying on the software to do it, which can keep the interface clocks active unnecessarily.
--- 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 - 3 files changed, 3 deletions(-)
arch/arm/mach-omap2/omap_hwmod_2420_data.c +0 -1
@@ -1000,7 +1000,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { .flags = OMAP_FIREWALL_L4, } }, - .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_MPU | OCP_USER_SDMA, };
arch/arm/mach-omap2/omap_hwmod_2430_data.c +0 -1
@@ -1049,7 +1049,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { .slave = &omap2430_dss_venc_hwmod, .clk = "dss_ick", .addr = omap2_dss_venc_addrs, - .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_MPU | OCP_USER_SDMA, };
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0 -1
@@ -1676,7 +1676,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { .flags = OMAP_FIREWALL_L4, } }, - .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_MPU | OCP_USER_SDMA, };
Signature · 1 line
1.7.10
PATCH 1/2 ARM: OMAP2/3: VENC hwmods: Remove OCPIF_SWSUP_IDLE flag from VENC slave interface
Hi,
Quoted 12 lines · Paul Walmsley
Quoted 10 lines · Paul Walmsley
Quoted 8 lines · Archit Taneja
The clocks for all DSS slave interfaces were recently changed to "
dss_ick" on OMAP2 and OMAP3, this clock can be autoidled by PRCM. The VENC interface previously had "dss_54m_fck" as it's clock which couldn't be autoidled, and hence theOCPIF_SWSUP_IDLEflag was needed.Remove the
OCPIF_SWSUP_IDLEflag from VENC interfaces as it's clock is now "dss_ick".
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Archit Taneja<[email protected]>Thanks, queued for 3.4-rc.
By the way, I added another sentence to the commit log to describe what is being fixed. Please let me know if you have any comments.
Thanks for improving the commit. It looks good to me.
Archit
Quoted 65 lines
- Paul
From: Archit Taneja<[email protected]>
Date: Fri, 13 Apr 2012 13:31:55 +0530
Subject: [PATCH 3/3] ARM: OMAP2/3: VENC hwmods: RemoveOCPIF_SWSUP_IDLEflag
from VENC slave interfaceThe clocks for all DSS slave interfaces were recently changed to "
dss_ick" on OMAP2 and OMAP3, this clock can be autoidled by PRCM. The VENC interface previously had "dss_54m_fck" as it's clock which couldn't be autoidled, and hence theOCPIF_SWSUP_IDLEflag was needed.Remove the
OCPIF_SWSUP_IDLEflag from VENC interfaces as it's clock is now "dss_ick". This allows the PRCM hardware to autoidle the VENC interface clocks when they are not active, rather than relying on the software to do it, which can keep the interface clocks active unnecessarily.Signed-off-by Archit Taneja<[email protected]>[paul at pwsan.com: add a short description of the fix to the commit log]Signed-off-by Paul Walmsley<[email protected]>--- 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 - 3 files changed, 3 deletions(-)arch/arm/mach-omap2/omap_hwmod_2420_data.c +0
-1@@ -1000,7 +1000,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { .flags = OMAP_FIREWALL_L4, } }, - .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_MPU | OCP_USER_SDMA, };arch/arm/mach-omap2/omap_hwmod_2430_data.c +0
-1@@ -1049,7 +1049,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { .slave =&omap2430_dss_venc_hwmod, .clk = "dss_ick", .addr = omap2_dss_venc_addrs, - .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_MPU | OCP_USER_SDMA, };arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0
-1@@ -1676,7 +1676,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { .flags = OMAP_FIREWALL_L4, } }, - .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_MPU | OCP_USER_SDMA, };
PATCH 2/2 ARM: OMAP4: DSS hwmods: Add OCPIF_SWSUP_IDLE to all DSS L3 slave interfaces
In reply to Archit TanejaThe clock for all DSS L3 slave interfaces had been recently changed to "dss_fck" from "l3_div_ck". "dss_fck" is an optional clock in DSS clock domain which can't autoidle when enabled.
Add OCPIF_SWSUP_IDLE flag to all the L3 slave interfaces used by DSS hwmods so that clock is explicitly enabled and disabled by software. Without this, "dss_fck" would be left as enabled and the OMAP4 device won't idle even when DSS is not in use.
--- arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +7 -0
@@ -1216,6 +1216,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = { .slave = &omap44xx_dss_hwmod, .clk = "dss_fck", .addr = omap44xx_dss_dma_addrs, + .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_SDMA, };
@@ -1319,6 +1320,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = { .slave = &omap44xx_dss_dispc_hwmod, .clk = "dss_fck", .addr = omap44xx_dss_dispc_dma_addrs, + .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_SDMA, };
@@ -1417,6 +1419,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = { .slave = &omap44xx_dss_dsi1_hwmod, .clk = "dss_fck", .addr = omap44xx_dss_dsi1_dma_addrs, + .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_SDMA, };
@@ -1494,6 +1497,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = { .slave = &omap44xx_dss_dsi2_hwmod, .clk = "dss_fck", .addr = omap44xx_dss_dsi2_dma_addrs, + .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_SDMA, };
@@ -1591,6 +1595,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = { .slave = &omap44xx_dss_hdmi_hwmod, .clk = "dss_fck", .addr = omap44xx_dss_hdmi_dma_addrs, + .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_SDMA, };
@@ -1683,6 +1688,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = { .slave = &omap44xx_dss_rfbi_hwmod, .clk = "dss_fck", .addr = omap44xx_dss_rfbi_dma_addrs, + .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_SDMA, };
@@ -1758,6 +1764,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = { .slave = &omap44xx_dss_venc_hwmod, .clk = "dss_fck", .addr = omap44xx_dss_venc_dma_addrs, + .flags = OCPIF_SWSUP_IDLE, .user = OCP_USER_SDMA, };
Signature · 1 line
1.7.5.4
PATCH 2/2 ARM: OMAP4: DSS hwmods: Add OCPIF_SWSUP_IDLE to all DSS L3 slave interfaces
Quoted 8 lines · Archit Taneja
The clock for all DSS L3 slave interfaces had been recently changed to "
dss_fck" from "l3_div_ck". "dss_fck" is an optional clock in DSS clock domain which can't autoidle when enabled.Add
OCPIF_SWSUP_IDLEflag to all the L3 slave interfaces used by DSS hwmods so that clock is explicitly enabled and disabled by software. Without this, "dss_fck" would be left as enabled and the OMAP4 device won't idle even when DSS is not in use.
Yeah, that was done on purpose with Tomi knowning well that limitation.
The issue was mainly due to the lack of proper parent / child relationship between the DSS (the whole subsystem) and the DSS children at that time.
I think that Tomi posted a series to fix that for 3.4. So if we ensure that every DSS IPs are children of the DSS, then pm_runtime will always ensure that the DSS will be enabled each time a submodule is used.
So the right fix is to put back the proper iclk (l3_div) to the DSS instead of the dss_fck.
The current OMAP4 DSS clock setup is clearly a hack that should be fixed.
Regards,
Benoit
PATCH 2/2 ARM: OMAP4: DSS hwmods: Add OCPIF_SWSUP_IDLE to all DSS L3 slave interfaces
Quoted 19 lines · Benoit
Quoted 11 lines · Archit Taneja
The clock for all DSS L3 slave interfaces had been recently changed to "
dss_fck" from "l3_div_ck". "dss_fck" is an optional clock in DSS clock domain
which can't autoidle when enabled.Add
OCPIF_SWSUP_IDLEflag to all the L3 slave interfaces used by DSS hwmods so
that clock is explicitly enabled and disabled by software. Without this, "dss_fck" would be left as enabled and the OMAP4 device won't idle even when
DSS is not in use.Yeah, that was done on purpose with Tomi knowning well that limitation.
The issue was mainly due to the lack of proper parent / child relationship between the DSS (the whole subsystem) and the DSS children at that time.
Quoted 6 lines
I think that Tomi posted a series to fix that for 3.4. So if we ensure that every DSS IPs are children of the DSS, then
pm_runtimewill always ensure that the DSS will be enabled each time a submodule is used.So the right fix is to put back the proper iclk (
l3_div) to the DSS instead of thedss_fck.
Ok, I get it now. Tomi's patch series ensured the parent-child dependency, but they didn't switch the iclks back to l3_div, I guess that should be a part of the series too.
Thanks,
Archit
Quoted 6 lines
The current OMAP4 DSS clock setup is clearly a hack that should be fixed.
Regards,
Benoit
Paul Walmsley
maintainerPATCH 2/2 ARM: OMAP4: DSS hwmods: Add OCPIF_SWSUP_IDLE to all DSS L3 slave interfaces
Hi Archit,
Quoted 24 lines · Archit Taneja
Quoted 23 lines · Benoit
Quoted 11 lines · Archit Taneja
The clock for all DSS L3 slave interfaces had been recently changed to "
dss_fck" from "l3_div_ck". "dss_fck" is an optional clock in DSS clock domain
which can't autoidle when enabled.Add
OCPIF_SWSUP_IDLEflag to all the L3 slave interfaces used by DSS hwmods so
that clock is explicitly enabled and disabled by software. Without this, "dss_fck" would be left as enabled and the OMAP4 device won't idle even when
DSS is not in use.Yeah, that was done on purpose with Tomi knowning well that limitation.
The issue was mainly due to the lack of proper parent / child relationship between the DSS (the whole subsystem) and the DSS children at that time.
I think that Tomi posted a series to fix that for 3.4. So if we ensure that every DSS IPs are children of the DSS, then
pm_runtimewill always ensure that the DSS will be enabled each time a submodule is used.
Quoted 6 lines
Quoted 2 lines
So the right fix is to put back the proper iclk (
l3_div) to the DSS instead of thedss_fck.Ok, I get it now. Tomi's patch series ensured the parent-child dependency, but they didn't switch the iclks back to
l3_div, I guess that should be a part of the series too.
Just checking on this one. Does this patch need to be updated ?
- Paul
PATCH 2/2 ARM: OMAP4: DSS hwmods: Add OCPIF_SWSUP_IDLE to all DSS L3 slave interfaces
Hi Paul,
Quoted 28 lines · Paul Walmsley
Hi Archit,
Quoted 24 lines · Archit Taneja
Quoted 23 lines · Benoit
Quoted 11 lines · Archit Taneja
The clock for all DSS L3 slave interfaces had been recently changed to "
dss_fck" from "l3_div_ck". "dss_fck" is an optional clock in DSS clock domain
which can't autoidle when enabled.Add
OCPIF_SWSUP_IDLEflag to all the L3 slave interfaces used by DSS hwmods so
that clock is explicitly enabled and disabled by software. Without this, "dss_fck" would be left as enabled and the OMAP4 device won't idle even when
DSS is not in use.Yeah, that was done on purpose with Tomi knowning well that limitation.
The issue was mainly due to the lack of proper parent / child relationship between the DSS (the whole subsystem) and the DSS children at that time.
I think that Tomi posted a series to fix that for 3.4. So if we ensure that every DSS IPs are children of the DSS, then
pm_runtimewill always ensure that the DSS will be enabled each time a submodule is used.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
So the right fix is to put back the proper iclk (
l3_div) to the DSS instead of thedss_fck.Ok, I get it now. Tomi's patch series ensured the parent-child dependency, but they didn't switch the iclks back to
l3_div, I guess that should be a part of the series too.Just checking on this one. Does this patch need to be updated ?
We were working on this, but we realised that only having a parent-child relation in dss platform devices won't be sufficient to remove "the use of dss_fck(or MODULEMODE bits) as a slave clock" hack.
The issue is that during bootup(when omap_hwmod_setup_all() is called), all hwmods are enabled independently, so all dss hwmods need to enable the MODULEMODE bits for them to be setup correctly.
With the parent-child relation in platform devices in DSS, only the parent platform device's hwmod("dss_core" in our case) should enable and disable the MODULEMODE bits. If the children also become capable of enabling/disabling it, then things wouldn't work.
Hence, to go ahead with this approach, the hwmod's themselves need to have some sort of parent child relationship, or atleast some sort of use counting for MODULEMODE bits. Benoit and Tomi could comment more on this.
Hence we are sort of stuck :)
Archit
Quoted 3 lines
- Paul
PATCH 2/2 ARM: OMAP4: DSS hwmods: Add OCPIF_SWSUP_IDLE to all DSS L3 slave interfaces
Quoted 54 lines · Archit Taneja
Hi Paul,
Quoted 28 lines · Paul Walmsley
Hi Archit,
Quoted 24 lines · Archit Taneja
Quoted 23 lines · Benoit
Quoted 11 lines · Archit Taneja
The clock for all DSS L3 slave interfaces had been recently changed to "
dss_fck" from "l3_div_ck". "dss_fck" is an optional clock in DSS clock domain
which can't autoidle when enabled.Add
OCPIF_SWSUP_IDLEflag to all the L3 slave interfaces used by DSS hwmods so
that clock is explicitly enabled and disabled by software. Without this, "dss_fck" would be left as enabled and the OMAP4 device won't idle even when
DSS is not in use.Yeah, that was done on purpose with Tomi knowning well that limitation.
The issue was mainly due to the lack of proper parent / child relationship between the DSS (the whole subsystem) and the DSS children at that time.
I think that Tomi posted a series to fix that for 3.4. So if we ensure that every DSS IPs are children of the DSS, then
pm_runtimewill always ensure that the DSS will be enabled each time a submodule is used.Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
So the right fix is to put back the proper iclk (
l3_div) to the DSS instead of thedss_fck.Ok, I get it now. Tomi's patch series ensured the parent-child dependency, but they didn't switch the iclks back to
l3_div, I guess that should be a part of the series too.Just checking on this one. Does this patch need to be updated ?
We were working on this, but we realised that only having a parent-child relation in dss platform devices won't be sufficient to remove "the use of
dss_fck(or MODULEMODE bits)as a slave clock" hack.The issue is that during
bootup(when omap_hwmod_setup_all() is called), all hwmods are enabled independently, so all dss hwmods need to enable the MODULEMODE bits for them to be setup correctly.With the parent-child relation in platform devices in DSS, only the parent platform device's
hwmod("dss_core" in our case)should enable and disable the MODULEMODE bits. If the children also become capable of enabling/disabling it, then things wouldn't work.
Quoted 5 lines
Hence, to go ahead with this approach, the hwmod's themselves need to have some sort of parent child relationship, or atleast some sort of use counting for MODULEMODE bits. Benoit and Tomi could comment more on this.
Hence we are sort of stuck :)
Yes, this is my understanding also. I got the impression from Benoit that adding such a parent-child relationship is not trivial.
Tomi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120504/c2262ca4/attachment-0001.sig>