linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [RFC][PATCH] sh: setup clock parent from current register value
Date: Thu, 24 Nov 2011 07:41:13 +0000	[thread overview]
Message-ID: <20111124074113.GC32112@linux-sh.org> (raw)
In-Reply-To: <87ty5wyb51.wl%kuninori.morimoto.gx@renesas.com>

On Mon, Nov 21, 2011 at 09:33:18PM -0800, Kuninori Morimoto wrote:
> Some clocks can select its parent clock by CPG register.
> But it might have been modified by boot-loader or something.
> This patch removed fixed initial parent clock,
> and setup it from their current register settings.
> It works on div6 reparent clocks for now.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Looks good to me, however..

> @@ -190,6 +222,9 @@ static int __init sh_clk_div6_register_ops(struct clk *clks, int nr,
>  		clkp->ops = ops;
>  		clkp->freq_table = freq_table + (k * freq_table_size);
>  		clkp->freq_table[nr_divs].frequency = CPUFREQ_TABLE_END;
> +		ret = sh_clk_init_parent(clkp);
> +		if (ret < 0)
> +			break;
>  
>  		ret = clk_register(clkp);

We are however suffering from some pretty sad looking error path handling
here, but that's not your fault.

I'll apply it to the clkfwk topic branch and then we can start layering
proper error path fixes on top after that. At the moment, almost anything
that's dealing with batched registration fails to clean up after itself.

      reply	other threads:[~2011-11-24  7:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22  5:33 [RFC][PATCH] sh: setup clock parent from current register value Kuninori Morimoto
2011-11-24  7:41 ` Paul Mundt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111124074113.GC32112@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).