Re: [RESUBMIT][PATCH 6/7] OMAP4: Clock stubs since clock management framework not in.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 07, 2009 at 11:59:15AM +0530, Santosh Shilimkar wrote:
> This patch update the cooomon clock.c file for OMAP4. The clk_get() and

Spelling - "common".

> +/* This functions is moved to arch/arm/common/clkdev.c. For OMAP4 since
> + * clock framework is not up , it is defined here to avoid rework in
> + * every driver */
> +
> +/* Dummy hooks only for OMAP4.For rest OMAPs, common clkdev is used */
> +#if defined(CONFIG_ARCH_OMAP4)
> +struct clk *clk_get(struct device *dev, const char *id)
> +{
> +	return NULL;

Okay, so all clk's are NULL pointers on OMAP4 currently.

> +}
> +EXPORT_SYMBOL(clk_get);
> +
> +void clk_put(struct clk *clk)
> +{
> +}
> +EXPORT_SYMBOL(clk_put);
> +void omap2_clk_prepare_for_reboot(void)
> +{
> +}
> +EXPORT_SYMBOL(omap2_clk_prepare_for_reboot);
> +#endif
>  int clk_enable(struct clk *clk)
>  {
>  	unsigned long flags;
>  	int ret = 0;
> +	if (cpu_is_omap44xx())
> +		/* OMAP4 clk framework not supported yet */
> +		return 0;

And this enables things to work.

>  
>  	if (clk == NULL || IS_ERR(clk))
>  		return -EINVAL;
> @@ -56,6 +80,9 @@ EXPORT_SYMBOL(clk_enable);
>  void clk_disable(struct clk *clk)
>  {
>  	unsigned long flags;
> +	if (cpu_is_omap44xx())
> +		/* OMAP4 clk framework not supported yet */
> +		return ;
>  
>  	if (clk == NULL || IS_ERR(clk))
>  		return;

If a NULL pointer is passed to clk_disable() then we return, so I think
the additional protection you've added is not required.

> @@ -80,6 +107,9 @@ unsigned long clk_get_rate(struct clk *clk)
>  {
>  	unsigned long flags;
>  	unsigned long ret = 0;
> +	if (cpu_is_omap44xx())
> +		/* OMAP4 clk framework not supported yet */
> +		return 0;
>  
>  	if (clk == NULL || IS_ERR(clk))
>  		return 0;

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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux