On Thu, Oct 27, 2011 at 10:12:18AM +0900, Jongpill Lee wrote:
> +static int exynos4210_asv_pre_clock_init(void)
> +{
> +     struct clk *clk_hpm;
> +     struct clk *clk_copy;
> +     struct clk *clk_parent;
> +
> +     /* PWI clock setting */
> +     clk_copy = clk_get(NULL, "sclk_pwi");
> +     if (IS_ERR(clk_copy)) {
> +             pr_info("EXYNOS4210: ASV : SCLK_PWI clock get error\n");
> +             return -EINVAL;
> +     } else {
> +             clk_parent = clk_get(NULL, "xusbxti");
> +
> +             if (IS_ERR(clk_parent)) {
> +                     pr_info("EXYNOS4210: ASV: MOUT_APLL clock get error\n");
> +                     clk_put(clk_copy);
> +                     return -EINVAL;
> +             }
> +             if (clk_set_parent(clk_copy, clk_parent))
> +                     pr_info("EXYNOS4210: ASV: Unable to set parent %s of 
> clock %s.\n",
> +                                     clk_parent->name, clk_copy->name);
> +
> +             clk_put(clk_parent);
> +     }
> +     clk_set_rate(clk_copy, 4800000);
> +
> +     clk_put(clk_copy);

This looks really weird - if something is using a clock, the reference
to the struct clk is supposed to be held all the time that the clock is
being used.  Plus there's nothing to enable the clock itself (so it's
probably disabled).
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to