Skip to contentSkip to conversation

OMAP2PLUS: DSS: Generalize clock names

PATCH Superseded Sumit Semwal 3 participants 9 messages Jan 25, 2011 – Jan 28, 2011

Subsystems (6)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover OMAP2PLUS: DSS: Generalize clock names

This patch series changes dss clock names to generic role names for all DSS clocks across clk APIs, hwmod data, dss driver.

It also changes the enums used within DSS framework to refer to the clocks to make them generic and related to functionality than value.
eg. DSS_CLK_TVFCK replaces DSS_CLK_54M,
dss_tv_fck replaces dss_54m_fck

This serves as the base for common hwmod DSS opt-clock roles across all OMAP platforms, and increases extendability.

In addition, since ick doesn't exist on OMAP4, the last patch adds a dummy clk for the same in clock44xx_data.c.

===
Note: This is interim change set to enable DSS on OMAP2/3/4 platforms; there is an ongoing design discussion for de-centralizing the DSS clock framework handling in favour of using pm_runtime APIs directly in each DSS IP.

Once a consensus is reached on that, much of this code will become cleaner, as each DSS IP block handles its own clocks using the common clocks framework.

Patch Base:
===========
Patch-set rebased and tested w/ Zoom3 (OMAP3630) on top of:
url = git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
branch "master"
commit e8883f8057c0f7c9950fa9f20568f37bfa62f34a
Description: Add linux-next specific files for 20110115
+
Patch mentioned in http://www.mail-archive.com/[email protected]/msg42384.html
[PATCH] OMAP: counter_32k: init clocksource as part of machine timer init (This patch is required for OMAP bootup w/ 20110115 linux-next)
+
DSS hwmod patch series: http://www.mail-archive.com/[email protected]/msg42914.html

changes since v1:
added dummy clk patch for OMAP4.
---------------------------------------------------------------------------

Archit Taneja (2):
OMAP2PLUS: DSS2: Generalize naming of PRCM related clock enums in DSS
driver
OMAP2PLUS: DSS2: Generalize external clock names in struct dss of
dss.c

Sumit Semwal (2):
OMAP2PLUS: opt-clocks: align dss clock roles and names
OMAP4: DSS2: clocks: Add ick as dummy clock

 arch/arm/mach-omap2/clock2420_data.c       |   10 ++-
 arch/arm/mach-omap2/clock2430_data.c       |   10 ++-
 arch/arm/mach-omap2/clock3xxx_data.c       |   22 +++--
 arch/arm/mach-omap2/clock44xx_data.c       |    9 ++-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    2 +-
 drivers/video/omap2/dss/core.c             |    4 +-
 drivers/video/omap2/dss/dispc.c            |   10 +-
 drivers/video/omap2/dss/dpi.c              |   16 ++--
 drivers/video/omap2/dss/dsi.c              |   18 ++--
 drivers/video/omap2/dss/dss.c              |  144 ++++++++++++++--------------
 drivers/video/omap2/dss/dss.h              |   10 +-
 drivers/video/omap2/dss/manager.c          |    4 +-
 drivers/video/omap2/dss/overlay.c          |    4 +-
 drivers/video/omap2/dss/rfbi.c             |   10 +-
 drivers/video/omap2/dss/sdi.c              |    8 +-
 drivers/video/omap2/dss/venc.c             |    8 +-
 16 files changed, 156 insertions(+), 133 deletions(-)
#1 lore raw

PATCH v2 1/4 OMAP2PLUS: opt-clocks: align dss clock roles and names

opt clocks require (NULL, act-clock-name) as entries in clock database, so that hwmod can replace it with (dev, role) tuple during hwmod data init.

These role names are aligned to be same across OMAP2420, 2430, 3xxx, 44xx platforms, and also with dss clk handling code, so clk_get/put/enable/disable APIs in dss can use uniform role names.

---
 arch/arm/mach-omap2/clock2420_data.c       |   10 +++++++---
 arch/arm/mach-omap2/clock2430_data.c       |   10 +++++++---
 arch/arm/mach-omap2/clock3xxx_data.c       |   22 +++++++++++++++-------
 arch/arm/mach-omap2/clock44xx_data.c       |    7 ++++++-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    2 +-
 drivers/video/omap2/dss/dss.c              |    8 ++++----
 6 files changed, 40 insertions(+), 19 deletions(-)
arch/arm/mach-omap2/clock2420_data.c +7 -3
index d2abc2f..72a1872 100644
@@ -1787,9 +1787,13 @@ static struct omap_clk omap2420_clks[] = {
 	CLK(NULL,	"gfx_ick",	&gfx_ick,	CK_242X),
 	/* DSS domain clocks */
 	CLK("omap_dss",	"ick",		&dss_ick,	CK_242X),
-	CLK("omap_dss",	"dss1_fck",	&dss1_fck,	CK_242X),
-	CLK("omap_dss",	"dss2_fck",	&dss2_fck,	CK_242X),
-	CLK("omap_dss",	"tv_fck",	&dss_54m_fck,	CK_242X),
+	CLK("omap_dss",	"fck",		&dss1_fck,	CK_242X),
+	/*
+	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
+	 * con=clock name as per actual clk structure, NOT role
+	 */
+	CLK(NULL,	"dss2_fck",	&dss2_fck,	CK_242X),
+	CLK(NULL,	"dss_54m_fck",	&dss_54m_fck,	CK_242X),
 	/* L3 domain clocks */
 	CLK(NULL,	"core_l3_ck",	&core_l3_ck,	CK_242X),
 	CLK(NULL,	"ssi_fck",	&ssi_ssr_sst_fck, CK_242X),
arch/arm/mach-omap2/clock2430_data.c +7 -3
index 663f298..b99f881 100644
@@ -1891,9 +1891,13 @@ static struct omap_clk omap2430_clks[] = {
 	CLK(NULL,	"mdm_osc_ck",	&mdm_osc_ck,	CK_243X),
 	/* DSS domain clocks */
 	CLK("omap_dss",	"ick",		&dss_ick,	CK_243X),
-	CLK("omap_dss",	"dss1_fck",	&dss1_fck,	CK_243X),
-	CLK("omap_dss",	"dss2_fck",	&dss2_fck,	CK_243X),
-	CLK("omap_dss",	"tv_fck",	&dss_54m_fck,	CK_243X),
+	CLK("omap_dss",	"fck",		&dss1_fck,	CK_243X),
+	/*
+	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
+	 * con=clock name as per actual clk structure, NOT role
+	 */
+	CLK(NULL,	"dss2_fck",	&dss2_fck,	CK_243X),
+	CLK(NULL,	"dss_54m_fck",	&dss_54m_fck,	CK_243X),
 	/* L3 domain clocks */
 	CLK(NULL,	"core_l3_ck",	&core_l3_ck,	CK_243X),
 	CLK(NULL,	"ssi_fck",	&ssi_ssr_sst_fck, CK_243X),
arch/arm/mach-omap2/clock3xxx_data.c +15 -7
index 5c97b93..c32df5d 100644
@@ -3357,13 +3357,21 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK("omap_rng",	"ick",		&rng_ick,	CK_34XX | CK_36XX),
 	CLK(NULL,	"sha11_ick",	&sha11_ick,	CK_34XX | CK_36XX),
 	CLK(NULL,	"des1_ick",	&des1_ick,	CK_34XX | CK_36XX),
-	CLK("omap_dss",	"dss1_fck",	&dss1_alwon_fck_3430es1, CK_3430ES1),
-	CLK("omap_dss",	"dss1_fck",	&dss1_alwon_fck_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
-	CLK("omap_dss",	"tv_fck",	&dss_tv_fck,	CK_3XXX),
-	CLK("omap_dss",	"video_fck",	&dss_96m_fck,	CK_3XXX),
-	CLK("omap_dss",	"dss2_fck",	&dss2_alwon_fck, CK_3XXX),
-	CLK("omap_dss",	"ick",		&dss_ick_3430es1,	CK_3430ES1),
-	CLK("omap_dss",	"ick",		&dss_ick_3430es2,	CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
+	/* DSS clocks */
+	CLK("omap_dss",	"fck",		&dss1_alwon_fck_3430es1, CK_3430ES1),
+	CLK("omap_dss",	"fck",		&dss1_alwon_fck_3430es2, CK_3430ES2PLUS
+								| CK_AM35XX),
+	CLK("omap_dss",	"ick",		&dss_ick_3430es1, CK_3430ES1),
+	CLK("omap_dss",	"ick",		&dss_ick_3430es2, CK_3430ES2PLUS
+								| CK_AM35XX),
+	/*
+	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
+	 * con=clock name as per actual clk structure, NOT role
+	 */
+	CLK(NULL,       "dss_tv_fck",   &dss_tv_fck,    CK_3XXX),
+	CLK(NULL,       "dss_96m_fck",  &dss_96m_fck,   CK_3XXX),
+	CLK(NULL,       "dss2_alwon_fck",       &dss2_alwon_fck,  CK_3XXX),
+
 	CLK(NULL,	"cam_mclk",	&cam_mclk,	CK_34XX | CK_36XX),
 	CLK(NULL,	"cam_ick",	&cam_ick,	CK_34XX | CK_36XX),
 	CLK(NULL,	"csi2_96m_fck",	&csi2_96m_fck,	CK_34XX | CK_36XX),
arch/arm/mach-omap2/clock44xx_data.c +6 -1
index e8cb32f..74db324 100644
@@ -3107,11 +3107,16 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK(NULL,	"dmic_sync_mux_ck",		&dmic_sync_mux_ck,	CK_443X),
 	CLK(NULL,	"dmic_fck",			&dmic_fck,	CK_443X),
 	CLK(NULL,	"dsp_fck",			&dsp_fck,	CK_443X),
+	/* dss clocks */
+	CLK(NULL,	"fck",				&dss_fck,	CK_443X),
+	/*
+	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
+	 * con=clock name as per actual clk structure, NOT role
+	 */
 	CLK(NULL,	"dss_sys_clk",			&dss_sys_clk,	CK_443X),
 	CLK(NULL,	"dss_tv_clk",			&dss_tv_clk,	CK_443X),
 	CLK(NULL,	"dss_dss_clk",			&dss_dss_clk,	CK_443X),
 	CLK(NULL,	"dss_48mhz_clk",		&dss_48mhz_clk,	CK_443X),
-	CLK(NULL,	"dss_fck",			&dss_fck,	CK_443X),
 	CLK(NULL,	"efuse_ctrl_cust_fck",		&efuse_ctrl_cust_fck,	CK_443X),
 	CLK(NULL,	"emif1_fck",			&emif1_fck,	CK_443X),
 	CLK(NULL,	"emif2_fck",			&emif2_fck,	CK_443X),
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1 -1
index 713165d..cb0c624 100644
@@ -770,7 +770,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = {
 
 static struct omap_hwmod_opt_clk dss_opt_clks[] = {
 	{ .role = "tv_clk", .clk = "dss_tv_fck" },
-	{ .role = "dssclk", .clk = "dss_96m_fck" },
+	{ .role = "video_clk", .clk = "dss_96m_fck" },
 	{ .role = "sys_clk", .clk = "dss2_alwon_fck" },
 };
 
drivers/video/omap2/dss/dss.c +4 -4
index f9390b4..91f8cf7 100644
@@ -758,19 +758,19 @@ static int dss_get_clocks(void)
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss1_fck, "dss1_fck");
+	r = dss_get_clock(&dss.dss1_fck, "fck");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss2_fck, "dss2_fck");
+	r = dss_get_clock(&dss.dss2_fck, "sys_clk");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss_54m_fck, "tv_fck");
+	r = dss_get_clock(&dss.dss_54m_fck, "tv_clk");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss_96m_fck, "video_fck");
+	r = dss_get_clock(&dss.dss_96m_fck, "video_clk");
 	if (r)
 		goto err;
 
Signature · 1 line
1.7.1
#4 lore raw

PATCH v2 2/4 OMAP2PLUS: DSS2: Generalize naming of PRCM related clock enums in DSS driver

In reply to Sumit Semwal

From: Archit Taneja <[email protected]>

enum dss_clock structure is replaced with generic names that could be used across OMAP2420, 2430, 3xxx, 44xx platforms.

---
 drivers/video/omap2/dss/core.c    |    4 +-
 drivers/video/omap2/dss/dispc.c   |   10 +++---
 drivers/video/omap2/dss/dpi.c     |   16 +++++-----
 drivers/video/omap2/dss/dsi.c     |   18 +++++-----
 drivers/video/omap2/dss/dss.c     |   62 ++++++++++++++++++------------------
 drivers/video/omap2/dss/dss.h     |   10 +++---
 drivers/video/omap2/dss/manager.c |    4 +-
 drivers/video/omap2/dss/overlay.c |    4 +-
 drivers/video/omap2/dss/rfbi.c    |   10 +++---
 drivers/video/omap2/dss/sdi.c     |    8 ++--
 drivers/video/omap2/dss/venc.c    |    8 ++--
 11 files changed, 77 insertions(+), 77 deletions(-)
drivers/video/omap2/dss/core.c +2 -2
index 85add9c..3c4ad3a 100644
@@ -184,7 +184,7 @@ static int omap_dss_probe(struct platform_device *pdev)
 	}
 
 	/* keep clocks enabled to prevent context saves/restores during init */
-	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 
 	r = rfbi_init_platform_driver();
 	if (r) {
@@ -251,7 +251,7 @@ static int omap_dss_probe(struct platform_device *pdev)
 			pdata->default_device = dssdev;
 	}
 
-	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 
 	return 0;
 
drivers/video/omap2/dss/dispc.c +5 -5
index 381942d..cc58208 100644
@@ -551,9 +551,9 @@ void dispc_restore_context(void)
 static inline void enable_clocks(bool enable)
 {
 	if (enable)
-		dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+		dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 	else
-		dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+		dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 }
 
 bool dispc_go_busy(enum omap_channel channel)
@@ -2311,7 +2311,7 @@ unsigned long dispc_fclk_rate(void)
 	unsigned long r = 0;
 
 	if (dss_get_dispc_clk_source() == DSS_SRC_DSS1_ALWON_FCLK)
-		r = dss_clk_get_rate(DSS_CLK_FCK1);
+		r = dss_clk_get_rate(DSS_CLK_FCK);
 	else
 #ifdef CONFIG_OMAP2_DSS_DSI
 		r = dsi_get_dsi1_pll_rate();
@@ -2439,7 +2439,7 @@ void dispc_dump_regs(struct seq_file *s)
 {
 #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, dispc_read_reg(r))
 
-	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 
 	DUMPREG(DISPC_REVISION);
 	DUMPREG(DISPC_SYSCONFIG);
@@ -2596,7 +2596,7 @@ void dispc_dump_regs(struct seq_file *s)
 	DUMPREG(DISPC_VID_PRELOAD(0));
 	DUMPREG(DISPC_VID_PRELOAD(1));
 
-	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 #undef DUMPREG
 }
 
drivers/video/omap2/dss/dpi.c +8 -8
index 75fb0a5..746f1b6 100644
@@ -107,7 +107,7 @@ static int dpi_set_mode(struct omap_dss_device *dssdev)
 	bool is_tft;
 	int r = 0;
 
-	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 
 	dispc_set_pol_freq(dssdev->manager->id, dssdev->panel.config,
 			dssdev->panel.acbi, dssdev->panel.acb);
@@ -137,7 +137,7 @@ static int dpi_set_mode(struct omap_dss_device *dssdev)
 	dispc_set_lcd_timings(dssdev->manager->id, t);
 
 err0:
-	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 	return r;
 }
 
@@ -173,14 +173,14 @@ int omapdss_dpi_display_enable(struct omap_dss_device *dssdev)
 			goto err1;
 	}
 
-	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 
 	r = dpi_basic_init(dssdev);
 	if (r)
 		goto err2;
 
 #ifdef CONFIG_OMAP2_DSS_USE_DSI_PLL
-	dss_clk_enable(DSS_CLK_FCK2);
+	dss_clk_enable(DSS_CLK_SYSCK);
 	r = dsi_pll_init(dssdev, 0, 1);
 	if (r)
 		goto err3;
@@ -199,10 +199,10 @@ err4:
 #ifdef CONFIG_OMAP2_DSS_USE_DSI_PLL
 	dsi_pll_uninit();
 err3:
-	dss_clk_disable(DSS_CLK_FCK2);
+	dss_clk_disable(DSS_CLK_SYSCK);
 #endif
 err2:
-	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 	if (cpu_is_omap34xx())
 		regulator_disable(dpi.vdds_dsi_reg);
 err1:
@@ -219,10 +219,10 @@ void omapdss_dpi_display_disable(struct omap_dss_device *dssdev)
 #ifdef CONFIG_OMAP2_DSS_USE_DSI_PLL
 	dss_select_dispc_clk_source(DSS_SRC_DSS1_ALWON_FCLK);
 	dsi_pll_uninit();
-	dss_clk_disable(DSS_CLK_FCK2);
+	dss_clk_disable(DSS_CLK_SYSCK);
 #endif
 
-	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 
 	if (cpu_is_omap34xx())
 		regulator_disable(dpi.vdds_dsi_reg);
drivers/video/omap2/dss/dsi.c +9 -9
index cab08cb..1802057 100644
@@ -654,18 +654,18 @@ static void dsi_vc_disable_bta_irq(int channel)
 static inline void enable_clocks(bool enable)
 {
 	if (enable)
-		dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+		dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 	else
-		dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+		dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 }
 
 /* source clock for DSI PLL. this could also be PCLKFREE */
 static inline void dsi_enable_pll_clock(bool enable)
 {
 	if (enable)
-		dss_clk_enable(DSS_CLK_FCK2);
+		dss_clk_enable(DSS_CLK_SYSCK);
 	else
-		dss_clk_disable(DSS_CLK_FCK2);
+		dss_clk_disable(DSS_CLK_SYSCK);
 
 	if (enable && dsi.pll_locked) {
 		if (wait_for_bit_change(DSI_PLL_STATUS, 1, 1) != 1)
@@ -741,7 +741,7 @@ static unsigned long dsi_fclk_rate(void)
 
 	if (dss_get_dsi_clk_source() == DSS_SRC_DSS1_ALWON_FCLK) {
 		/* DSI FCLK source is DSS1_ALWON_FCK, which is dss1_fck */
-		r = dss_clk_get_rate(DSS_CLK_FCK1);
+		r = dss_clk_get_rate(DSS_CLK_FCK);
 	} else {
 		/* DSI FCLK source is DSI2_PLL_FCLK */
 		r = dsi_get_dsi2_pll_rate();
@@ -821,7 +821,7 @@ static int dsi_calc_clock_rates(struct omap_dss_device *dssdev,
 		return -EINVAL;
 
 	if (cinfo->use_dss2_fck) {
-		cinfo->clkin = dss_clk_get_rate(DSS_CLK_FCK2);
+		cinfo->clkin = dss_clk_get_rate(DSS_CLK_SYSCK);
 		/* XXX it is unclear if highfreq should be used
 		 * with DSS2_FCK source also */
 		cinfo->highfreq = 0;
@@ -867,7 +867,7 @@ int dsi_pll_calc_clock_div_pck(bool is_tft, unsigned long req_pck,
 	int match = 0;
 	unsigned long dss_clk_fck2;
 
-	dss_clk_fck2 = dss_clk_get_rate(DSS_CLK_FCK2);
+	dss_clk_fck2 = dss_clk_get_rate(DSS_CLK_SYSCK);
 
 	if (req_pck == dsi.cache_req_pck &&
 			dsi.cache_cinfo.clkin == dss_clk_fck2) {
@@ -1319,7 +1319,7 @@ void dsi_dump_regs(struct seq_file *s)
 {
 #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, dsi_read_reg(r))
 
-	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 
 	DUMPREG(DSI_REVISION);
 	DUMPREG(DSI_SYSCONFIG);
@@ -1391,7 +1391,7 @@ void dsi_dump_regs(struct seq_file *s)
 	DUMPREG(DSI_PLL_CONFIGURATION1);
 	DUMPREG(DSI_PLL_CONFIGURATION2);
 
-	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 #undef DUMPREG
 }
 
drivers/video/omap2/dss/dss.c +31 -31

171 lines not on this page · raw message

drivers/video/omap2/dss/dss.h +5 -5
index 981d247..4b02e07 100644
@@ -112,11 +112,11 @@ enum omap_parallel_interface_mode {
 };
 
 enum dss_clock {
-	DSS_CLK_ICK	= 1 << 0,
-	DSS_CLK_FCK1	= 1 << 1,
-	DSS_CLK_FCK2	= 1 << 2,
-	DSS_CLK_54M	= 1 << 3,
-	DSS_CLK_96M	= 1 << 4,
+	DSS_CLK_ICK	= 1 << 0,	/* DSS_L3_ICLK and DSS_L4_ICLK */
+	DSS_CLK_FCK	= 1 << 1,	/* DSS1_ALWON_FCLK */
+	DSS_CLK_SYSCK	= 1 << 2,	/* DSS2_ALWON_FCLK */
+	DSS_CLK_TVFCK	= 1 << 3,	/* DSS_TV_FCLK */
+	DSS_CLK_VIDFCK	= 1 << 4,	/* DSS_96M_FCLK*/
 };
 
 enum dss_clk_source {
drivers/video/omap2/dss/manager.c +2 -2
index 172d4e6..1f53bf2 100644
@@ -1394,7 +1394,7 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
 	}
 
 	r = 0;
-	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 	if (!dss_cache.irq_enabled) {
 		u32 mask;
 
@@ -1407,7 +1407,7 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
 		dss_cache.irq_enabled = true;
 	}
 	configure_dispc();
-	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 
 	spin_unlock_irqrestore(&dss_cache.lock, flags);
 
drivers/video/omap2/dss/overlay.c +2 -2
index 456efef..996e9a4 100644
@@ -490,7 +490,7 @@ static int omap_dss_set_manager(struct omap_overlay *ovl,
 
 	ovl->manager = mgr;
 
-	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 	/* XXX: on manual update display, in auto update mode, a bug happens
 	 * here. When an overlay is first enabled on LCD, then it's disabled,
 	 * and the manager is changed to TV, we sometimes get SYNC_LOST_DIGIT
@@ -499,7 +499,7 @@ static int omap_dss_set_manager(struct omap_overlay *ovl,
 	 * but I don't understand how or why. */
 	msleep(40);
 	dispc_set_channel_out(ovl->id, mgr->id);
-	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 
 	return 0;
 }
drivers/video/omap2/dss/rfbi.c +5 -5
index fc665a7..9e0f196 100644
@@ -141,9 +141,9 @@ static inline u32 rfbi_read_reg(const struct rfbi_reg idx)
 static void rfbi_enable_clocks(bool enable)
 {
 	if (enable)
-		dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+		dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 	else
-		dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+		dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 }
 
 void omap_rfbi_write_command(const void *buf, u32 len)
@@ -496,7 +496,7 @@ unsigned long rfbi_get_max_tx_rate(void)
 	};
 
 	l4_rate = rfbi.l4_khz / 1000;
-	dss1_rate = dss_clk_get_rate(DSS_CLK_FCK1) / 1000000;
+	dss1_rate = dss_clk_get_rate(DSS_CLK_FCK) / 1000000;
 
 	for (i = 0; i < ARRAY_SIZE(ftab); i++) {
 		/* Use a window instead of an exact match, to account
@@ -921,7 +921,7 @@ void rfbi_dump_regs(struct seq_file *s)
 {
 #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", #r, rfbi_read_reg(r))
 
-	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 
 	DUMPREG(RFBI_REVISION);
 	DUMPREG(RFBI_SYSCONFIG);
@@ -952,7 +952,7 @@ void rfbi_dump_regs(struct seq_file *s)
 	DUMPREG(RFBI_VSYNC_WIDTH);
 	DUMPREG(RFBI_HSYNC_WIDTH);
 
-	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 #undef DUMPREG
 }
 
drivers/video/omap2/dss/sdi.c +4 -4
index b64adf7..8272fc1 100644
@@ -70,7 +70,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
 
 	/* In case of skip_init sdi_init has already enabled the clocks */
 	if (!sdi.skip_init)
-		dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+		dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 
 	sdi_basic_init(dssdev);
 
@@ -130,7 +130,7 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev)
 
 	return 0;
 err2:
-	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 	regulator_disable(sdi.vdds_sdi_reg);
 err1:
 	omap_dss_stop_device(dssdev);
@@ -145,7 +145,7 @@ void omapdss_sdi_display_disable(struct omap_dss_device *dssdev)
 
 	dss_sdi_disable();
 
-	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1);
+	dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
 
 	regulator_disable(sdi.vdds_sdi_reg);
 
@@ -175,7 +175,7 @@ int sdi_init(bool skip_init)
 	 * of them until sdi_display_enable is called.
 	 */
 	if (skip_init)
-		dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1);
+		dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK);
 	return 0;
 }
 
drivers/video/omap2/dss/venc.c +4 -4
index ea1c87b..2adae12 100644
@@ -391,11 +391,11 @@ static void venc_reset(void)
 static void venc_enable_clocks(int enable)
 {
 	if (enable)
-		dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M |
-				DSS_CLK_96M);
+		dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK | DSS_CLK_TVFCK |
+				DSS_CLK_VIDFCK);
 	else
-		dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1 | DSS_CLK_54M |
-				DSS_CLK_96M);
+		dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK | DSS_CLK_TVFCK |
+				DSS_CLK_VIDFCK);
 }
 
 static const struct venc_config *venc_timings_to_config(
Signature · 1 line
1.7.1
#5 lore raw

PATCH v2 3/4 OMAP2PLUS: DSS2: Generalize external clock names in struct dss of dss.c

In reply to Sumit Semwal

From: Archit Taneja <[email protected]>

The dss struct in dss.c has omap2/3 specific clock names. Making them generic, to increase readability and extendability.

---
 drivers/video/omap2/dss/dss.c |   82 ++++++++++++++++++++--------------------
 1 files changed, 41 insertions(+), 41 deletions(-)
drivers/video/omap2/dss/dss.c +41 -41
index 2873c30..c7cdbea 100644
@@ -64,10 +64,10 @@ static struct {
 
 	struct clk	*dpll4_m4_ck;
 	struct clk	*dss_ick;
-	struct clk	*dss1_fck;
-	struct clk	*dss2_fck;
-	struct clk	*dss_54m_fck;
-	struct clk	*dss_96m_fck;
+	struct clk	*dss_fck;
+	struct clk	*dss_sys_clk;
+	struct clk	*dss_tv_fck;
+	struct clk	*dss_video_fck;
 	unsigned	num_clks_enabled;
 
 	unsigned long	cache_req_pck;
@@ -749,28 +749,28 @@ static int dss_get_clocks(void)
 	int r;
 
 	dss.dss_ick = NULL;
-	dss.dss1_fck = NULL;
-	dss.dss2_fck = NULL;
-	dss.dss_54m_fck = NULL;
-	dss.dss_96m_fck = NULL;
+	dss.dss_fck = NULL;
+	dss.dss_sys_clk = NULL;
+	dss.dss_tv_fck = NULL;
+	dss.dss_video_fck = NULL;
 
 	r = dss_get_clock(&dss.dss_ick, "ick");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss1_fck, "fck");
+	r = dss_get_clock(&dss.dss_fck, "fck");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss2_fck, "sys_clk");
+	r = dss_get_clock(&dss.dss_sys_clk, "sys_clk");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss_54m_fck, "tv_clk");
+	r = dss_get_clock(&dss.dss_tv_fck, "tv_clk");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss_96m_fck, "video_clk");
+	r = dss_get_clock(&dss.dss_video_fck, "video_clk");
 	if (r)
 		goto err;
 
@@ -779,25 +779,25 @@ static int dss_get_clocks(void)
 err:
 	if (dss.dss_ick)
 		clk_put(dss.dss_ick);
-	if (dss.dss1_fck)
-		clk_put(dss.dss1_fck);
-	if (dss.dss2_fck)
-		clk_put(dss.dss2_fck);
-	if (dss.dss_54m_fck)
-		clk_put(dss.dss_54m_fck);
-	if (dss.dss_96m_fck)
-		clk_put(dss.dss_96m_fck);
+	if (dss.dss_fck)
+		clk_put(dss.dss_fck);
+	if (dss.dss_sys_clk)
+		clk_put(dss.dss_sys_clk);
+	if (dss.dss_tv_fck)
+		clk_put(dss.dss_tv_fck);
+	if (dss.dss_video_fck)
+		clk_put(dss.dss_video_fck);
 
 	return r;
 }
 
 static void dss_put_clocks(void)
 {
-	if (dss.dss_96m_fck)
-		clk_put(dss.dss_96m_fck);
-	clk_put(dss.dss_54m_fck);
-	clk_put(dss.dss1_fck);
-	clk_put(dss.dss2_fck);
+	if (dss.dss_video_fck)
+		clk_put(dss.dss_video_fck);
+	clk_put(dss.dss_tv_fck);
+	clk_put(dss.dss_fck);
+	clk_put(dss.dss_sys_clk);
 	clk_put(dss.dss_ick);
 }
 
@@ -807,13 +807,13 @@ unsigned long dss_clk_get_rate(enum dss_clock clk)
 	case DSS_CLK_ICK:
 		return clk_get_rate(dss.dss_ick);
 	case DSS_CLK_FCK:
-		return clk_get_rate(dss.dss1_fck);
+		return clk_get_rate(dss.dss_fck);
 	case DSS_CLK_SYSCK:
-		return clk_get_rate(dss.dss2_fck);
+		return clk_get_rate(dss.dss_sys_clk);
 	case DSS_CLK_TVFCK:
-		return clk_get_rate(dss.dss_54m_fck);
+		return clk_get_rate(dss.dss_tv_fck);
 	case DSS_CLK_VIDFCK:
-		return clk_get_rate(dss.dss_96m_fck);
+		return clk_get_rate(dss.dss_video_fck);
 	}
 
 	BUG();
@@ -845,13 +845,13 @@ static void dss_clk_enable_no_ctx(enum dss_clock clks)
 	if (clks & DSS_CLK_ICK)
 		clk_enable(dss.dss_ick);
 	if (clks & DSS_CLK_FCK)
-		clk_enable(dss.dss1_fck);
+		clk_enable(dss.dss_fck);
 	if (clks & DSS_CLK_SYSCK)
-		clk_enable(dss.dss2_fck);
+		clk_enable(dss.dss_sys_clk);
 	if (clks & DSS_CLK_TVFCK)
-		clk_enable(dss.dss_54m_fck);
+		clk_enable(dss.dss_tv_fck);
 	if (clks & DSS_CLK_VIDFCK)
-		clk_enable(dss.dss_96m_fck);
+		clk_enable(dss.dss_video_fck);
 
 	dss.num_clks_enabled += num_clks;
 }
@@ -873,13 +873,13 @@ static void dss_clk_disable_no_ctx(enum dss_clock clks)
 	if (clks & DSS_CLK_ICK)
 		clk_disable(dss.dss_ick);
 	if (clks & DSS_CLK_FCK)
-		clk_disable(dss.dss1_fck);
+		clk_disable(dss.dss_fck);
 	if (clks & DSS_CLK_SYSCK)
-		clk_disable(dss.dss2_fck);
+		clk_disable(dss.dss_sys_clk);
 	if (clks & DSS_CLK_TVFCK)
-		clk_disable(dss.dss_54m_fck);
+		clk_disable(dss.dss_tv_fck);
 	if (clks & DSS_CLK_VIDFCK)
-		clk_disable(dss.dss_96m_fck);
+		clk_disable(dss.dss_video_fck);
 
 	dss.num_clks_enabled -= num_clks;
 }
@@ -925,10 +925,10 @@ static void core_dump_clocks(struct seq_file *s)
 	int i;
 	struct clk *clocks[5] = {
 		dss.dss_ick,
-		dss.dss1_fck,
-		dss.dss2_fck,
-		dss.dss_54m_fck,
-		dss.dss_96m_fck
+		dss.dss_fck,
+		dss.dss_sys_clk,
+		dss.dss_tv_fck,
+		dss.dss_video_fck
 	};
 
 	seq_printf(s, "- CORE -\n");
Signature · 1 line
1.7.1
#6 lore raw

PATCH v2 4/4 OMAP4: DSS2: clocks: Add ick as dummy clock

In reply to Sumit Semwal

DSS code uses ick as one of the clocks in clk_get/clk_put. OMAP4 clock database doesn't have ick for DSS, so adding ick as dummy clock.

Once pm_runtime* APIs get introduced in DSS, this will be revisited.

---
 arch/arm/mach-omap2/clock44xx_data.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/clock44xx_data.c +2 -0
index 74db324..8603b1f 100644
@@ -3109,6 +3109,8 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK(NULL,	"dsp_fck",			&dsp_fck,	CK_443X),
 	/* dss clocks */
 	CLK(NULL,	"fck",				&dss_fck,	CK_443X),
+	CLK("omap_dss",	"ick",				&dummy_ck,	CK_443X),
+	/* on OMAP4, ick is a dummy clock */
 	/*
 	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
 	 * con=clock name as per actual clk structure, NOT role
Signature · 1 line
1.7.1
#2 lore raw

RE: [PATCH v2 1/4] OMAP2PLUS: opt-clocks: align dss clock roles and names

In reply to Sumit Semwal

Hi Sumit,

Quoted 2 lines

-----Original Message-----
From: [email protected]

[mailto:[email protected]] On Behalf Of Sumit Semwal

Quoted 2 lines

Sent: Tuesday, January 25, 2011 6:30 PM
To: [email protected]; [email protected]; [email protected];

[email protected]; [email protected]; b-

Quoted 3 lines

[email protected]
Cc: Sumit Semwal
Subject: [PATCH v2 1/4] OMAP2PLUS: opt-clocks: align dss clock roles and

names

Quoted 3 lines

opt clocks require (NULL, act-clock-name) as entries in clock database, so that hwmod can replace it with (dev, role) tuple during hwmod data

init.

Quoted 2 lines

These role names are aligned to be same across OMAP2420, 2430, 3xxx,

44xx

Quoted 1 line

platforms, and also with dss clk handling code, so

clk_get/put/enable/disable

Quoted 7 lines

APIs in dss can use uniform role names.

---
 arch/arm/mach-omap2/clock2420_data.c       |   10 +++++++---
 arch/arm/mach-omap2/clock2430_data.c       |   10 +++++++---
 arch/arm/mach-omap2/clock3xxx_data.c       |   22

+++++++++++++++-------

Review

Quoted 6 lines
 arch/arm/mach-omap2/clock44xx_data.c       |    7 ++++++-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    2 +-
 drivers/video/omap2/dss/dss.c              |    8 ++++----
 6 files changed, 40 insertions(+), 19 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-omap2/clock2420_data.c

Quoted 5 lines

index d2abc2f..72a1872 100644

arch/arm/mach-omap2/clock2420_data.c +0 -0
@@ -1787,9 +1787,13 @@ static struct omap_clk omap2420_clks[] = {
 	CLK(NULL,	"gfx_ick",	&gfx_ick,	CK_242X),

arch/arm/mach-omap2/clock2420_data.c static struct omap_clk omap2420_clks[] = { · line 1794

Quoted 10 lines
arch/arm/mach-omap2/clock2420_data.c +5 -3
 	/* DSS domain clocks */
 	CLK("omap_dss",	"ick",		&dss_ick,	CK_242X),
-	CLK("omap_dss",	"dss1_fck",	&dss1_fck,	CK_242X),
-	CLK("omap_dss",	"dss2_fck",	&dss2_fck,	CK_242X),
-	CLK("omap_dss",	"tv_fck",	&dss_54m_fck,	CK_242X),
+	CLK("omap_dss",	"fck",		&dss1_fck,	CK_242X),
+	/*
+	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
+	 * con=clock name as per actual clk structure, NOT role
+	 */

I don't think that's true. The hmmod framework uses the omap_clk_get_by_name api which does not look up the clkdev table at all. It just looks up the clk->name, so the clkdev entries need not be changed with role=clk->name. Same applies to all other such instances in this patch.

Regards,
Rajendra

Review

Quoted 6 lines
arch/arm/mach-omap2/clock2420_data.c +2 -0
+	CLK(NULL,	"dss2_fck",	&dss2_fck,	CK_242X),
+	CLK(NULL,	"dss_54m_fck",	&dss_54m_fck,	CK_242X),
 	/* L3 domain clocks */
 	CLK(NULL,	"core_l3_ck",	&core_l3_ck,	CK_242X),
 	CLK(NULL,	"ssi_fck",	&ssi_ssr_sst_fck, CK_242X),
(quoted diff) +0 -0

b/arch/arm/mach-omap2/clock2430_data.c

Review

Quoted 21 lines

index 663f298..b99f881 100644

arch/arm/mach-omap2/clock2430_data.c +7 -3
@@ -1891,9 +1891,13 @@ static struct omap_clk omap2430_clks[] = {
 	CLK(NULL,	"mdm_osc_ck",	&mdm_osc_ck,	CK_243X),
 	/* DSS domain clocks */
 	CLK("omap_dss",	"ick",		&dss_ick,	CK_243X),
-	CLK("omap_dss",	"dss1_fck",	&dss1_fck,	CK_243X),
-	CLK("omap_dss",	"dss2_fck",	&dss2_fck,	CK_243X),
-	CLK("omap_dss",	"tv_fck",	&dss_54m_fck,	CK_243X),
+	CLK("omap_dss",	"fck",		&dss1_fck,	CK_243X),
+	/*
+	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
+	 * con=clock name as per actual clk structure, NOT role
+	 */
+	CLK(NULL,	"dss2_fck",	&dss2_fck,	CK_243X),
+	CLK(NULL,	"dss_54m_fck",	&dss_54m_fck,	CK_243X),
 	/* L3 domain clocks */
 	CLK(NULL,	"core_l3_ck",	&core_l3_ck,	CK_243X),
 	CLK(NULL,	"ssi_fck",	&ssi_ssr_sst_fck, CK_243X),
(quoted diff) +0 -0

b/arch/arm/mach-omap2/clock3xxx_data.c

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3357

Quoted 5 lines

index 5c97b93..c32df5d 100644

arch/arm/mach-omap2/clock3xxx_data.c +0 -0
@@ -3357,13 +3357,21 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK("omap_rng",	"ick",		&rng_ick,	CK_34XX |

CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3358

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -0
 	CLK(NULL,	"sha11_ick",	&sha11_ick,	CK_34XX |

CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3359

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -0
 	CLK(NULL,	"des1_ick",	&des1_ick,	CK_34XX |

CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3360

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -1
-	CLK("omap_dss",	"dss1_fck",	&dss1_alwon_fck_3430es1,

CK_3430ES1),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3361

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -1
-	CLK("omap_dss",	"dss1_fck",	&dss1_alwon_fck_3430es2,

CK_3430ES2PLUS | CK_AM35XX | CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = {

Quoted 4 lines
arch/arm/mach-omap2/clock3xxx_data.c +0 -4
-	CLK("omap_dss",	"tv_fck",	&dss_tv_fck,	CK_3XXX),
-	CLK("omap_dss",	"video_fck",	&dss_96m_fck,	CK_3XXX),
-	CLK("omap_dss",	"dss2_fck",	&dss2_alwon_fck, CK_3XXX),
-	CLK("omap_dss",	"ick",		&dss_ick_3430es1,

CK_3430ES1),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3366

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -1
-	CLK("omap_dss",	"ick",		&dss_ick_3430es2,

CK_3430ES2PLUS | CK_AM35XX | CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3361

Quoted 2 lines
arch/arm/mach-omap2/clock3xxx_data.c +2 -0
+	/* DSS clocks */
+	CLK("omap_dss",	"fck",		&dss1_alwon_fck_3430es1,

CK_3430ES1),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3362

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +1 -0
+	CLK("omap_dss",	"fck",		&dss1_alwon_fck_3430es2,

CK_3430ES2PLUS

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3363

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +1 -0
+								|

CK_AM35XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = {

Quoted 3 lines
arch/arm/mach-omap2/clock3xxx_data.c +3 -0
+	CLK("omap_dss",	"ick",		&dss_ick_3430es1, CK_3430ES1),
+	CLK("omap_dss",	"ick",		&dss_ick_3430es2, CK_3430ES2PLUS
+								|

CK_AM35XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = {

Quoted 7 lines
arch/arm/mach-omap2/clock3xxx_data.c +7 -0
+	/*
+	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
+	 * con=clock name as per actual clk structure, NOT role
+	 */
+	CLK(NULL,       "dss_tv_fck",   &dss_tv_fck,    CK_3XXX),
+	CLK(NULL,       "dss_96m_fck",  &dss_96m_fck,   CK_3XXX),
+	CLK(NULL,       "dss2_alwon_fck",       &dss2_alwon_fck,

CK_3XXX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3375

Quoted 2 lines
arch/arm/mach-omap2/clock3xxx_data.c +1 -0
+
 	CLK(NULL,	"cam_mclk",	&cam_mclk,	CK_34XX |

CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3376

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -0
 	CLK(NULL,	"cam_ick",	&cam_ick,	CK_34XX |

CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3377

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -0
 	CLK(NULL,	"csi2_96m_fck",	&csi2_96m_fck,	CK_34XX |

CK_36XX),

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/mach-omap2/clock44xx_data.c

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3107

Quoted 5 lines

index e8cb32f..74db324 100644

arch/arm/mach-omap2/clock44xx_data.c +0 -0
@@ -3107,11 +3107,16 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK(NULL,	"dmic_sync_mux_ck",		&dmic_sync_mux_ck,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3108

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"dmic_fck",			&dmic_fck,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3109

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"dsp_fck",			&dsp_fck,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3111

Quoted 2 lines
arch/arm/mach-omap2/clock44xx_data.c +2 -0
+	/* dss clocks */
+	CLK(NULL,	"fck",				&dss_fck,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3116

Quoted 5 lines
arch/arm/mach-omap2/clock44xx_data.c +4 -0
+	/*
+	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
+	 * con=clock name as per actual clk structure, NOT role
+	 */
 	CLK(NULL,	"dss_sys_clk",			&dss_sys_clk,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3117

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"dss_tv_clk",			&dss_tv_clk,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3118

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"dss_dss_clk",			&dss_dss_clk,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3119

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"dss_48mhz_clk",		&dss_48mhz_clk,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3114

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -1
-	CLK(NULL,	"dss_fck",			&dss_fck,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3120

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"efuse_ctrl_cust_fck",

&efuse_ctrl_cust_fck, CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3121

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"emif1_fck",			&emif1_fck,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3122

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"emif2_fck",			&emif2_fck,

CK_443X),

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c

arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_ocp_if

Quoted 4 lines

index 713165d..cb0c624 100644

arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0 -0
@@ -770,7 +770,7 @@ static struct omap_hwmod_ocp_if

*omap3xxx_dss_slaves[] = {

Review

Quoted 9 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1 -1
 static struct omap_hwmod_opt_clk dss_opt_clks[] = {
 	{ .role = "tv_clk", .clk = "dss_tv_fck" },
-	{ .role = "dssclk", .clk = "dss_96m_fck" },
+	{ .role = "video_clk", .clk = "dss_96m_fck" },
 	{ .role = "sys_clk", .clk = "dss2_alwon_fck" },
 };
 
(quoted diff) +0 -0

b/drivers/video/omap2/dss/dss.c

Quoted 34 lines

index f9390b4..91f8cf7 100644

drivers/video/omap2/dss/dss.c +4 -5
@@ -758,19 +758,19 @@ static int dss_get_clocks(void)
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss1_fck, "dss1_fck");
+	r = dss_get_clock(&dss.dss1_fck, "fck");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss2_fck, "dss2_fck");
+	r = dss_get_clock(&dss.dss2_fck, "sys_clk");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss_54m_fck, "tv_fck");
+	r = dss_get_clock(&dss.dss_54m_fck, "tv_clk");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss_96m_fck, "video_fck");
+	r = dss_get_clock(&dss.dss_96m_fck, "video_clk");
 	if (r)
 		goto err;
 
--

1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

RE: [PATCH v2 1/4] OMAP2PLUS: opt-clocks: align dss clock roles and names

Quoted 4 lines

-----Original Message-----
From: Rajendra Nayak [mailto:[email protected]]
Sent: Thursday, January 27, 2011 11:24 AM
To: Sumit Semwal; [email protected]; [email protected]; Kevin

Hilman; Vaibhav Hiremath; linux-

Quoted 2 lines

[email protected]; Benoit Cousson
Subject: RE: [PATCH v2 1/4] OMAP2PLUS: opt-clocks: align dss clock roles

and names

Quoted 12 lines

Hi Sumit,

Quoted 2 lines

-----Original Message-----
From: [email protected]

[mailto:[email protected]] On Behalf Of Sumit Semwal

Quoted 2 lines

Sent: Tuesday, January 25, 2011 6:30 PM
To: [email protected]; [email protected]; [email protected];

[email protected]; [email protected]; b-

Quoted 3 lines

[email protected]
Cc: Sumit Semwal
Subject: [PATCH v2 1/4] OMAP2PLUS: opt-clocks: align dss clock roles

and

Quoted 3 lines

names

Quoted 2 lines

opt clocks require (NULL, act-clock-name) as entries in clock

database,

Quoted 35 lines
Quoted 1 line

so that hwmod can replace it with (dev, role) tuple during hwmod data

init.

Quoted 2 lines

These role names are aligned to be same across OMAP2420, 2430, 3xxx,

44xx

Quoted 1 line

platforms, and also with dss clk handling code, so

clk_get/put/enable/disable

Quoted 7 lines

APIs in dss can use uniform role names.

---
 arch/arm/mach-omap2/clock2420_data.c       |   10 +++++++---
 arch/arm/mach-omap2/clock2430_data.c       |   10 +++++++---
 arch/arm/mach-omap2/clock3xxx_data.c       |   22

+++++++++++++++-------

Review

Quoted 6 lines
 arch/arm/mach-omap2/clock44xx_data.c       |    7 ++++++-
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |    2 +-
 drivers/video/omap2/dss/dss.c              |    8 ++++----
 6 files changed, 40 insertions(+), 19 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-omap2/clock2420_data.c

Quoted 13 lines

index d2abc2f..72a1872 100644

arch/arm/mach-omap2/clock2420_data.c +3 -3
@@ -1787,9 +1787,13 @@ static struct omap_clk omap2420_clks[] = {
 	CLK(NULL,	"gfx_ick",	&gfx_ick,	CK_242X),
 	/* DSS domain clocks */
 	CLK("omap_dss",	"ick",		&dss_ick,	CK_242X),
-	CLK("omap_dss",	"dss1_fck",	&dss1_fck,	CK_242X),
-	CLK("omap_dss",	"dss2_fck",	&dss2_fck,	CK_242X),
-	CLK("omap_dss",	"tv_fck",	&dss_54m_fck,	CK_242X),
+	CLK("omap_dss",	"fck",		&dss1_fck,	CK_242X),
+	/*
+	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
Quoted 9 lines

arch/arm/mach-omap2/clock2420_data.c static struct omap_clk omap2420_clks[] = { · line 1794

Quoted 2 lines
arch/arm/mach-omap2/clock2420_data.c +2 -0
+	 * con=clock name as per actual clk structure, NOT role
+	 */

I don't think that's true. The hmmod framework uses the omap_clk_get_by_name api which does not look up the clkdev table at all. It just looks up the clk->name, so the clkdev entries need not be changed with role=clk->name. Same applies to all other such instances in this patch.

An offline chat with Sumit showed that the problem exists in the way clkdev aliases are added for optional clks in the omap device layer.
Have a patch to fix this, will post soon after some more testing.

Regards,
Rajendra

Quoted 158 lines

Regards,
Rajendra

Review

Quoted 6 lines
arch/arm/mach-omap2/clock2420_data.c +2 -0
+	CLK(NULL,	"dss2_fck",	&dss2_fck,	CK_242X),
+	CLK(NULL,	"dss_54m_fck",	&dss_54m_fck,	CK_242X),
 	/* L3 domain clocks */
 	CLK(NULL,	"core_l3_ck",	&core_l3_ck,	CK_242X),
 	CLK(NULL,	"ssi_fck",	&ssi_ssr_sst_fck, CK_242X),
(quoted diff) +0 -0

b/arch/arm/mach-omap2/clock2430_data.c

Review

Quoted 21 lines

index 663f298..b99f881 100644

arch/arm/mach-omap2/clock2430_data.c +7 -3
@@ -1891,9 +1891,13 @@ static struct omap_clk omap2430_clks[] = {
 	CLK(NULL,	"mdm_osc_ck",	&mdm_osc_ck,	CK_243X),
 	/* DSS domain clocks */
 	CLK("omap_dss",	"ick",		&dss_ick,	CK_243X),
-	CLK("omap_dss",	"dss1_fck",	&dss1_fck,	CK_243X),
-	CLK("omap_dss",	"dss2_fck",	&dss2_fck,	CK_243X),
-	CLK("omap_dss",	"tv_fck",	&dss_54m_fck,	CK_243X),
+	CLK("omap_dss",	"fck",		&dss1_fck,	CK_243X),
+	/*
+	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
+	 * con=clock name as per actual clk structure, NOT role
+	 */
+	CLK(NULL,	"dss2_fck",	&dss2_fck,	CK_243X),
+	CLK(NULL,	"dss_54m_fck",	&dss_54m_fck,	CK_243X),
 	/* L3 domain clocks */
 	CLK(NULL,	"core_l3_ck",	&core_l3_ck,	CK_243X),
 	CLK(NULL,	"ssi_fck",	&ssi_ssr_sst_fck, CK_243X),
(quoted diff) +0 -0

b/arch/arm/mach-omap2/clock3xxx_data.c

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3357

Quoted 5 lines

index 5c97b93..c32df5d 100644

arch/arm/mach-omap2/clock3xxx_data.c +0 -0
@@ -3357,13 +3357,21 @@ static struct omap_clk omap3xxx_clks[] = {
 	CLK("omap_rng",	"ick",		&rng_ick,	CK_34XX |

CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3358

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -0
 	CLK(NULL,	"sha11_ick",	&sha11_ick,	CK_34XX |

CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3359

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -0
 	CLK(NULL,	"des1_ick",	&des1_ick,	CK_34XX |

CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3360

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -1
-	CLK("omap_dss",	"dss1_fck",	&dss1_alwon_fck_3430es1,

CK_3430ES1),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3361

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -1
-	CLK("omap_dss",	"dss1_fck",	&dss1_alwon_fck_3430es2,

CK_3430ES2PLUS | CK_AM35XX | CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = {

Quoted 4 lines
arch/arm/mach-omap2/clock3xxx_data.c +0 -4
-	CLK("omap_dss",	"tv_fck",	&dss_tv_fck,	CK_3XXX),
-	CLK("omap_dss",	"video_fck",	&dss_96m_fck,	CK_3XXX),
-	CLK("omap_dss",	"dss2_fck",	&dss2_alwon_fck, CK_3XXX),
-	CLK("omap_dss",	"ick",		&dss_ick_3430es1,

CK_3430ES1),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3366

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -1
-	CLK("omap_dss",	"ick",		&dss_ick_3430es2,

CK_3430ES2PLUS | CK_AM35XX | CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3361

Quoted 2 lines
arch/arm/mach-omap2/clock3xxx_data.c +2 -0
+	/* DSS clocks */
+	CLK("omap_dss",	"fck",		&dss1_alwon_fck_3430es1,

CK_3430ES1),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3362

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +1 -0
+	CLK("omap_dss",	"fck",		&dss1_alwon_fck_3430es2,

CK_3430ES2PLUS

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3363

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +1 -0
+								|

CK_AM35XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = {

Quoted 3 lines
arch/arm/mach-omap2/clock3xxx_data.c +3 -0
+	CLK("omap_dss",	"ick",		&dss_ick_3430es1, CK_3430ES1),
+	CLK("omap_dss",	"ick",		&dss_ick_3430es2, CK_3430ES2PLUS
+								|

CK_AM35XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = {

Quoted 7 lines
arch/arm/mach-omap2/clock3xxx_data.c +7 -0
+	/*
+	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
+	 * con=clock name as per actual clk structure, NOT role
+	 */
+	CLK(NULL,       "dss_tv_fck",   &dss_tv_fck,    CK_3XXX),
+	CLK(NULL,       "dss_96m_fck",  &dss_96m_fck,   CK_3XXX),
+	CLK(NULL,       "dss2_alwon_fck",       &dss2_alwon_fck,

CK_3XXX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3375

Quoted 2 lines
arch/arm/mach-omap2/clock3xxx_data.c +1 -0
+
 	CLK(NULL,	"cam_mclk",	&cam_mclk,	CK_34XX |

CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3376

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -0
 	CLK(NULL,	"cam_ick",	&cam_ick,	CK_34XX |

CK_36XX),

arch/arm/mach-omap2/clock3xxx_data.c static struct omap_clk omap3xxx_clks[] = { · line 3377

Quoted 1 line
arch/arm/mach-omap2/clock3xxx_data.c +0 -0
 	CLK(NULL,	"csi2_96m_fck",	&csi2_96m_fck,	CK_34XX |

CK_36XX),

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/mach-omap2/clock44xx_data.c

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3107

Quoted 5 lines

index e8cb32f..74db324 100644

arch/arm/mach-omap2/clock44xx_data.c +0 -0
@@ -3107,11 +3107,16 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK(NULL,	"dmic_sync_mux_ck",		&dmic_sync_mux_ck,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3108

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"dmic_fck",			&dmic_fck,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3109

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"dsp_fck",			&dsp_fck,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3111

Quoted 2 lines
arch/arm/mach-omap2/clock44xx_data.c +2 -0
+	/* dss clocks */
+	CLK(NULL,	"fck",				&dss_fck,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3116

Quoted 5 lines
arch/arm/mach-omap2/clock44xx_data.c +4 -0
+	/*
+	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
+	 * con=clock name as per actual clk structure, NOT role
+	 */
 	CLK(NULL,	"dss_sys_clk",			&dss_sys_clk,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3117

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"dss_tv_clk",			&dss_tv_clk,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3118

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"dss_dss_clk",			&dss_dss_clk,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3119

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"dss_48mhz_clk",		&dss_48mhz_clk,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3114

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -1
-	CLK(NULL,	"dss_fck",			&dss_fck,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3120

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"efuse_ctrl_cust_fck",

&efuse_ctrl_cust_fck, CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3121

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"emif1_fck",			&emif1_fck,

CK_443X),

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3122

Quoted 1 line
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	CLK(NULL,	"emif2_fck",			&emif2_fck,

CK_443X),

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c

arch/arm/mach-omap2/omap_hwmod_3xxx_data.c static struct omap_hwmod_ocp_if

Quoted 4 lines

index 713165d..cb0c624 100644

arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +0 -0
@@ -770,7 +770,7 @@ static struct omap_hwmod_ocp_if

*omap3xxx_dss_slaves[] = {

Review

Quoted 9 lines
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +1 -1
 static struct omap_hwmod_opt_clk dss_opt_clks[] = {
 	{ .role = "tv_clk", .clk = "dss_tv_fck" },
-	{ .role = "dssclk", .clk = "dss_96m_fck" },
+	{ .role = "video_clk", .clk = "dss_96m_fck" },
 	{ .role = "sys_clk", .clk = "dss2_alwon_fck" },
 };
 
(quoted diff) +0 -0

b/drivers/video/omap2/dss/dss.c

Quoted 27 lines

index f9390b4..91f8cf7 100644

drivers/video/omap2/dss/dss.c +4 -4
@@ -758,19 +758,19 @@ static int dss_get_clocks(void)
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss1_fck, "dss1_fck");
+	r = dss_get_clock(&dss.dss1_fck, "fck");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss2_fck, "dss2_fck");
+	r = dss_get_clock(&dss.dss2_fck, "sys_clk");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss_54m_fck, "tv_fck");
+	r = dss_get_clock(&dss.dss_54m_fck, "tv_clk");
 	if (r)
 		goto err;
 
-	r = dss_get_clock(&dss.dss_96m_fck, "video_fck");
+	r = dss_get_clock(&dss.dss_96m_fck, "video_clk");
 	if (r)
 		goto err;
 
Quoted 5 lines
Quoted 5 lines

--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap"

in

Quoted 2 lines
Quoted 2 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw

Re: [PATCH v2 4/4] OMAP4: DSS2: clocks: Add ick as dummy clock

In reply to Sumit Semwal
Quoted 15 lines · Sumit Semwal

DSS code uses ick as one of the clocks in clk_get/clk_put. OMAP4 clock database doesn't have ick for DSS, so adding ick as dummy clock.

Once pm_runtime* APIs get introduced in DSS, this will be revisited.

---
 arch/arm/mach-omap2/clock44xx_data.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/clock44xx_data.c +0 -0
index 74db324..8603b1f 100644

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3113

Quoted 5 lines
arch/arm/mach-omap2/clock44xx_data.c +2 -0
@@ -3109,6 +3109,8 @@ static struct omap_clk omap44xx_clks[] = {
 	CLK(NULL,	"dsp_fck",			&dsp_fck,	CK_443X),
 	/* dss clocks */
 	CLK(NULL,	"fck",				&dss_fck,	CK_443X),
+	CLK("omap_dss",	"ick",				&dummy_ck,	CK_443X),
+	/* on OMAP4, ick is a dummy clock */

minor nit: the comment should go above the code, and should also state it's needed for OMAP2/3 compatibility.

Kevin

Quoted 3 lines
arch/arm/mach-omap2/clock44xx_data.c +0 -0
 	/*
 	 * clocks handled via hwmod opt_clk mechanism need dev=NULL,
 	 * con=clock name as per actual clk structure, NOT role
#8 lore raw

Re: [PATCH v2 4/4] OMAP4: DSS2: clocks: Add ick as dummy clock

Quoted 12 lines · Kevin Hilman
Quoted 10 lines · Sumit Semwal

DSS code uses ick as one of the clocks in clk_get/clk_put. OMAP4 clock database doesn't have ick for DSS, so adding ick as dummy clock.

Once pm_runtime* APIs get introduced in DSS, this will be revisited.

---
 arch/arm/mach-omap2/clock44xx_data.c |    2 ++

 1 files changed, 2 insertions(+), 0 deletions(-)
Quoted 13 lines

arch/arm/mach-omap2/clock44xx_data.c static struct omap_clk omap44xx_clks[] = { · line 3113

Quoted 10 lines
arch/arm/mach-omap2/clock44xx_data.c +2 -0
index 74db324..8603b1f 100644
@@ -3109,6 +3109,8 @@ static struct omap_clk omap44xx_clks[] = {
       CLK(NULL,       "dsp_fck",                      &dsp_fck,       CK_443X),
       /* dss clocks */
       CLK(NULL,       "fck",                          &dss_fck,       CK_443X),
+     CLK("omap_dss", "ick",                          &dummy_ck,      CK_443X),
+     /* on OMAP4, ick is a dummy clock */

minor nit: the comment should go above the code, and should also state it's needed for OMAP2/3 compatibility.

Sure, thanks! Will update in next version.
~Sumit.

Quoted 7 lines

Kevin

Quoted 3 lines
arch/arm/mach-omap2/clock44xx_data.c +0 -0
       /*
        * clocks handled via hwmod opt_clk mechanism need dev=NULL,
        * con=clock name as per actual clk structure, NOT role

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html