RFC ARM LPC32xx AMBA apb_pclk changes

Kevin Wells kevin.wells at nxp.com
Thu Aug 5 19:02:46 EDT 2010


> 
> diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c
> index afe21e6..1c2c683 100644
> --- a/drivers/video/amba-clcd.c
> +++ b/drivers/video/amba-clcd.c
> @@ -80,7 +80,10 @@ static void clcdfb_disable(struct clcd_fb *fb)
>  	/*
>  	 * Disable CLCD clock source.
>  	 */
> -	clk_disable(fb->clk);
> +	if (fb->clk_enabled) {
> +		fb->clk_enabled = false;
> +		clk_disable(fb->clk);
> +	}
>  }
> 
>  static void clcdfb_enable(struct clcd_fb *fb, u32 cntl)
> @@ -88,7 +91,10 @@ static void clcdfb_enable(struct clcd_fb *fb, u32
> cntl)
>  	/*
>  	 * Enable the CLCD clock source.
>  	 */
> -	clk_enable(fb->clk);
> +	if (!fb->clk_enabled) {
> +		fb->clk_enabled = true;
> +		clk_enable(fb->clk);
> +	}
> 
>  	/*
>  	 * Bring up by first enabling..
> diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h
> index ca16c38..be33b3a 100644
> --- a/include/linux/amba/clcd.h
> +++ b/include/linux/amba/clcd.h
> @@ -150,6 +150,7 @@ struct clcd_fb {
>  	u16			off_cntl;
>  	u32			clcd_cntl;
>  	u32			cmap[16];
> +	bool			clk_enabled;
>  };
> 
>  static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs
> *regs)
> 

This should fix the unbalanced clock calls to the arch clock driver. Do
you want to submit this patch or want me to include it in with the
pl11x amba pclk register access patch?




More information about the linux-arm-kernel mailing list