Skip to contentSkip to conversation

OMAP2/3: VENC hwmod: add OCPIF_SWSUP_IDLE flag to interface

PATCH New Paul Walmsley 2 participants 2 messages Mar 4, 2011

Subsystems (4)
lore
Share & tools
lore

Paul Walmsley

author maintainer
#0 lore raw

PATCH 1/1 OMAP2/3: VENC hwmod: add OCPIF_SWSUP_IDLE flag to interface

According to the hwmod interface data, the DSS submodule "VENC" uses a clock, "dss_54m_fck"/"dss_tv_fck", which the PRCM cannot autoidle. By default, the hwmod code assumes that interface clocks can be autoidled by the PRCM. When the interface clock can't be autoidled by the PRCM, those interfaces must be marked with the OCPIF_SWSUP_IDLE flag. Otherwise, the "interface clock" will always have a non-zero use count, and the device won't enter idle. This problem was observed on N8x0.

Fix the immediate problem by marking the VENC interface with the OCPIF_SWSUP_IDLE flag. But it's not clear that "dss_54m_fck"/"dss_tv_fck" is really the correct interface clock for VENC. It may be that the VENC interface should use a hardware-autoidling interface clock. This is the situation on OMAP4, which uses "l3_div_ck" as the VENC interface clock, which can be autoidled by the PRCM. Clarification from TI is needed.

Problem found and patch tested on N8x0 by Tony Lindgren <[email protected]>.

Cc Tony Lindgren <[email protected]>
Cc Senthilvadivu Guruswamy <[email protected]>
Cc Sumit Semwal <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc Beno?t Cousson <[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 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/omap_hwmod_2420_data.c +1 -0
index e0bc2c7..61e58bd 100644
@@ -1410,6 +1410,7 @@ 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 +1 -0
index 4aa74d7..490789a 100644
@@ -1485,6 +1485,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
 	.clk		= "dss_54m_fck",
 	.addr		= omap2430_dss_venc_addrs,
 	.addr_cnt	= ARRAY_SIZE(omap2430_dss_venc_addrs),
+	.flags		= OCPIF_SWSUP_IDLE,
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };
 
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1 -0
index e2792cf..eb48b8c 100644
@@ -1844,6 +1844,7 @@ 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.2.3
#1 lore raw

PATCH 1/1 OMAP2/3: VENC hwmod: add OCPIF_SWSUP_IDLE flag to interface

+ Tomi

Hi Paul,

Quoted 10 lines · Paul Walmsley

According to the hwmod interface data, the DSS submodule "VENC" uses a clock, "dss_54m_fck"/"dss_tv_fck", which the PRCM cannot autoidle. By default, the hwmod code assumes that interface clocks can be autoidled by the PRCM. When the interface clock can't be autoidled by the PRCM, those interfaces must be marked with the OCPIF_SWSUP_IDLE flag. Otherwise, the "interface clock" will always have a non-zero use count, and the device won't enter idle. This problem was observed on N8x0.

Quoted 7 lines

Fix the immediate problem by marking the VENC interface with the OCPIF_SWSUP_IDLE flag. But it's not clear that "dss_54m_fck"/"dss_tv_fck" is really the correct interface clock for VENC. It may be that the VENC interface should use a hardware-autoidling interface clock. This is the situation on OMAP4, which uses "l3_div_ck" as the VENC interface clock, which can be autoidled by the PRCM. Clarification from TI is needed.

Yep, this is clearly wrong, all DSS modules are using the same interconnect port from the L4, thus they should all use the dss_ick as interface clock and not the functional clock dss_tv_fck.

There is something strange with that module because the main_clk is attached to dss1_alwon_fck instead of dss_tv_fck.

I'm quite sure that both are needed to make that module work and that's why it was added as an interface clock.
In theory, one of them should be an optional clock like on OMAP4.

Sumit,

Could you explain the rational behind the usage of dss_tv_fck as an iclk and dss1_alwon_fck as a fclk?

Thanks,
Benoit