diff mbox

omap2-clk: Add missing lcdc clock definition

Message ID 1351698962-3923-1-git-send-email-panto@antoniou-consulting.com (mailing list archive)
State New, archived
Headers show

Commit Message

Pantelis Antoniou Oct. 31, 2012, 3:56 p.m. UTC
Looks like the lcdc clock definition got dropped.
It is required for the LCD controller to work. Reintroduce.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
---
 arch/arm/mach-omap2/clock33xx_data.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Tony Lindgren Oct. 30, 2012, 6:18 p.m. UTC | #1
* Pantelis Antoniou <panto@antoniou-consulting.com> [121030 11:04]:
> Looks like the lcdc clock definition got dropped.
> It is required for the LCD controller to work. Reintroduce.

This looks like a regression, can you also add the commit
causing it?

Regards,

Tony
 
> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
> ---
>  arch/arm/mach-omap2/clock33xx_data.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c
> index 1a45d6b..b7b7995 100644
> --- a/arch/arm/mach-omap2/clock33xx_data.c
> +++ b/arch/arm/mach-omap2/clock33xx_data.c
> @@ -867,6 +867,16 @@ static struct clk lcd_gclk = {
>  	.recalc		= &followparent_recalc,
>  };
>  
> +static struct clk lcdc_fck = {
> +	.name           = "lcdc_fck",
> +	.clkdm_name     = "lcdc_clkdm",
> +	.parent         = &lcd_gclk,
> +	.enable_reg     = AM33XX_CM_PER_LCDC_CLKCTRL,
> +	.enable_bit     = AM33XX_MODULEMODE_SWCTRL,
> +	.ops            = &clkops_omap2_dflt,
> +	.recalc         = &followparent_recalc,
> +};
> +
>  static struct clk mmc_clk = {
>  	.name		= "mmc_clk",
>  	.clkdm_name	= "l4ls_clkdm",
> @@ -1075,6 +1085,7 @@ static struct omap_clk am33xx_clks[] = {
>  	CLK(NULL,	"clkout2_ck",		&clkout2_ck,	CK_AM33XX),
>  	CLK(NULL,	"timer_32k_ck",		&clkdiv32k_ick,	CK_AM33XX),
>  	CLK(NULL,	"timer_sys_ck",		&sys_clkin_ck,	CK_AM33XX),
> +	CLK("da8xx_lcdc.0",     NULL,           &lcdc_fck,      CK_AM33XX),
>  };
>  
>  int __init am33xx_clk_init(void)
> -- 
> 1.7.12
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Walmsley Oct. 30, 2012, 11:26 p.m. UTC | #2
+ Vaibhav Hiremath

On Tue, 30 Oct 2012, Tony Lindgren wrote:

> * Pantelis Antoniou <panto@antoniou-consulting.com> [121030 11:04]:
> > Looks like the lcdc clock definition got dropped.
> > It is required for the LCD controller to work. Reintroduce.
> 
> This looks like a regression, can you also add the commit
> causing it?

Looks like probably a new "feature," in that this clock didn't exist in 
the original check-in.  Would be good to get Vaibhav's opinion on this; 
also the common clock patches will need to be updated.


- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vaibhav Hiremath Oct. 31, 2012, 5:09 a.m. UTC | #3
On Wed, Oct 31, 2012 at 04:56:40, Paul Walmsley wrote:
> + Vaibhav Hiremath
> 
> On Tue, 30 Oct 2012, Tony Lindgren wrote:
> 
> > * Pantelis Antoniou <panto@antoniou-consulting.com> [121030 11:04]:
> > > Looks like the lcdc clock definition got dropped.
> > > It is required for the LCD controller to work. Reintroduce.
> > 
> > This looks like a regression, can you also add the commit
> > causing it?
> 
> Looks like probably a new "feature," in that this clock didn't exist in 
> the original check-in.  Would be good to get Vaibhav's opinion on this; 
> also the common clock patches will need to be updated.
> 

Thanks Paul for looping me in, something went wrong with my l-o subscription, 
so I didn't receive these Patches. 

As far as lck clock node is concerned, we had deliberately dropped all leaf-
node clocks from the clock tree, please refer to the description mentioned 
in -
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-May/101987.html


From LCDC driver perspective, driver is using,

fb_clk = clk_get(&device->dev, NULL);

This I feel needs to be corrected for valid name as per Spec (mostly I would 
vote for "fck") and then every platform should make sure that it returns 
valid clock-node for it.

Change in Driver would be,

fb_clk = clk_get(&device->dev, "fck");


Thanks,
Vaibhav

> 
> - Paul
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Walmsley Oct. 31, 2012, 5:49 a.m. UTC | #4
On Wed, 31 Oct 2012, Hiremath, Vaibhav wrote:

> As far as lck clock node is concerned, we had deliberately dropped all leaf-
> node clocks from the clock tree, please refer to the description mentioned 
> in -
> http://lists.infradead.org/pipermail/linux-arm-kernel/2012-May/101987.html

Ach, should have remembered that :-(  Indeed there is an LCDC hwmod:

static struct omap_hwmod am33xx_lcdc_hwmod = {
	.name		= "lcdc",
	.class		= &am33xx_lcdc_hwmod_class,
	.clkdm_name	= "lcdc_clkdm",
	.mpu_irqs	= am33xx_lcdc_irqs,
	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
	.main_clk	= "lcd_gclk",
	.prcm		= {
		.omap4	= {
			.clkctrl_offs	= AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
			.modulemode	= MODULEMODE_SWCTRL,
		},
	},
};

> >From LCDC driver perspective, driver is using,
> 
> fb_clk = clk_get(&device->dev, NULL);
> 
> This I feel needs to be corrected for valid name as per Spec (mostly I would 
> vote for "fck") and then every platform should make sure that it returns 
> valid clock-node for it.
> 
> Change in Driver would be,
> 
> fb_clk = clk_get(&device->dev, "fck");

Indeed.


- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vaibhav Hiremath Oct. 31, 2012, 6:38 a.m. UTC | #5
On Wed, Oct 31, 2012 at 11:19:44, Paul Walmsley wrote:
> On Wed, 31 Oct 2012, Hiremath, Vaibhav wrote:
> 
> > As far as lck clock node is concerned, we had deliberately dropped all leaf-
> > node clocks from the clock tree, please refer to the description mentioned 
> > in -
> > http://lists.infradead.org/pipermail/linux-arm-kernel/2012-May/101987.html
> 
> Ach, should have remembered that :-(  Indeed there is an LCDC hwmod:
> 
> static struct omap_hwmod am33xx_lcdc_hwmod = {
> 	.name		= "lcdc",
> 	.class		= &am33xx_lcdc_hwmod_class,
> 	.clkdm_name	= "lcdc_clkdm",
> 	.mpu_irqs	= am33xx_lcdc_irqs,
> 	.flags		= HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
> 	.main_clk	= "lcd_gclk",
> 	.prcm		= {
> 		.omap4	= {
> 			.clkctrl_offs	= AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
> 			.modulemode	= MODULEMODE_SWCTRL,
> 		},
> 	},
> };
> 
> > >From LCDC driver perspective, driver is using,
> > 
> > fb_clk = clk_get(&device->dev, NULL);
> > 
> > This I feel needs to be corrected for valid name as per Spec (mostly I would 
> > vote for "fck") and then every platform should make sure that it returns 
> > valid clock-node for it.
> > 
> > Change in Driver would be,
> > 
> > fb_clk = clk_get(&device->dev, "fck");
> 

Ok, thanks. Let me submit patch for this.

Thanks,
Vaibhav

> Indeed.
> 
> 
> - Paul
> 

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

Patch

diff --git a/arch/arm/mach-omap2/clock33xx_data.c b/arch/arm/mach-omap2/clock33xx_data.c
index 1a45d6b..b7b7995 100644
--- a/arch/arm/mach-omap2/clock33xx_data.c
+++ b/arch/arm/mach-omap2/clock33xx_data.c
@@ -867,6 +867,16 @@  static struct clk lcd_gclk = {
 	.recalc		= &followparent_recalc,
 };
 
+static struct clk lcdc_fck = {
+	.name           = "lcdc_fck",
+	.clkdm_name     = "lcdc_clkdm",
+	.parent         = &lcd_gclk,
+	.enable_reg     = AM33XX_CM_PER_LCDC_CLKCTRL,
+	.enable_bit     = AM33XX_MODULEMODE_SWCTRL,
+	.ops            = &clkops_omap2_dflt,
+	.recalc         = &followparent_recalc,
+};
+
 static struct clk mmc_clk = {
 	.name		= "mmc_clk",
 	.clkdm_name	= "l4ls_clkdm",
@@ -1075,6 +1085,7 @@  static struct omap_clk am33xx_clks[] = {
 	CLK(NULL,	"clkout2_ck",		&clkout2_ck,	CK_AM33XX),
 	CLK(NULL,	"timer_32k_ck",		&clkdiv32k_ick,	CK_AM33XX),
 	CLK(NULL,	"timer_sys_ck",		&sys_clkin_ck,	CK_AM33XX),
+	CLK("da8xx_lcdc.0",     NULL,           &lcdc_fck,      CK_AM33XX),
 };
 
 int __init am33xx_clk_init(void)