All of lore.kernel.org
 help / color / mirror / Atom feed
From: mturquette@linaro.org (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: ux500: clk-sysctrl: handle clocks with no parents
Date: Tue, 14 May 2013 12:06:41 -0700	[thread overview]
Message-ID: <20130514190641.10068.14584@quantum> (raw)
In-Reply-To: <20130503090305.GA17733@balto.lan>

Quoting Fabio Baltieri (2013-05-03 02:03:05)
> On Fri, May 03, 2013 at 10:54:09AM +0200, Ulf Hansson wrote:
> > On 3 May 2013 10:51, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> > > On 30 April 2013 14:45, Fabio Baltieri <fabio.baltieri@linaro.org> wrote:
> > >> Fix clk_reg_sysctrl() to set main clock registers of new struct
> > >> clk_sysctrl even if the registered clock has no parents.
> > >>
> > >> This fixes an issue where "ulpclk" was registered with all clk->reg_*
> > >> fields uninitialized, causing a -EINVAL error from clk_prepare().
> > >>
> > >> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> > >> Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
> > >> ---
> > >>  drivers/clk/ux500/clk-sysctrl.c | 8 +++++++-
> > >>  1 file changed, 7 insertions(+), 1 deletion(-)
> > >>
> > >> diff --git a/drivers/clk/ux500/clk-sysctrl.c b/drivers/clk/ux500/clk-sysctrl.c
> > >> index bc7e9bd..e364c9d 100644
> > >> --- a/drivers/clk/ux500/clk-sysctrl.c
> > >> +++ b/drivers/clk/ux500/clk-sysctrl.c
> > >> @@ -145,7 +145,13 @@ static struct clk *clk_reg_sysctrl(struct device *dev,
> > >>                 return ERR_PTR(-ENOMEM);
> > >>         }
> > >>
> > >> -       for (i = 0; i < num_parents; i++) {
> > >> +       /* set main clock registers */
> > >> +       clk->reg_sel[0] = reg_sel[0];
> > >> +       clk->reg_bits[0] = reg_bits[0];
> > >> +       clk->reg_mask[0] = reg_mask[0];
> > >> +
> > >> +       /* handle clocks with more than one parent */
> > >> +       for (i = 1; i < num_parents; i++) {
> > >>                 clk->reg_sel[i] = reg_sel[i];
> > >>                 clk->reg_bits[i] = reg_bits[i];
> > >>                 clk->reg_mask[i] = reg_mask[i];
> > >> --
> > >> 1.8.2
> > >>
> > >
> > > Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
> > >
> > > This is bugfix, should go "stable" as well?
> > 
> > Stable means 3.10 rcs, since the abx500 clk tree was added for 3.10.
> 
> Thanks!  Yes, it would be great if this could be queued up for an -rc.
> 

Taken into clk-fixes.

Thanks!
Mike

> Fabio
> 
> -- 
> Fabio Baltieri

WARNING: multiple messages have this Message-ID (diff)
From: Mike Turquette <mturquette@linaro.org>
To: Fabio Baltieri <fabio.baltieri@linaro.org>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH] clk: ux500: clk-sysctrl: handle clocks with no parents
Date: Tue, 14 May 2013 12:06:41 -0700	[thread overview]
Message-ID: <20130514190641.10068.14584@quantum> (raw)
In-Reply-To: <20130503090305.GA17733@balto.lan>

Quoting Fabio Baltieri (2013-05-03 02:03:05)
> On Fri, May 03, 2013 at 10:54:09AM +0200, Ulf Hansson wrote:
> > On 3 May 2013 10:51, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> > > On 30 April 2013 14:45, Fabio Baltieri <fabio.baltieri@linaro.org> wrote:
> > >> Fix clk_reg_sysctrl() to set main clock registers of new struct
> > >> clk_sysctrl even if the registered clock has no parents.
> > >>
> > >> This fixes an issue where "ulpclk" was registered with all clk->reg_*
> > >> fields uninitialized, causing a -EINVAL error from clk_prepare().
> > >>
> > >> Cc: Ulf Hansson <ulf.hansson@linaro.org>
> > >> Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
> > >> ---
> > >>  drivers/clk/ux500/clk-sysctrl.c | 8 +++++++-
> > >>  1 file changed, 7 insertions(+), 1 deletion(-)
> > >>
> > >> diff --git a/drivers/clk/ux500/clk-sysctrl.c b/drivers/clk/ux500/clk-sysctrl.c
> > >> index bc7e9bd..e364c9d 100644
> > >> --- a/drivers/clk/ux500/clk-sysctrl.c
> > >> +++ b/drivers/clk/ux500/clk-sysctrl.c
> > >> @@ -145,7 +145,13 @@ static struct clk *clk_reg_sysctrl(struct device *dev,
> > >>                 return ERR_PTR(-ENOMEM);
> > >>         }
> > >>
> > >> -       for (i = 0; i < num_parents; i++) {
> > >> +       /* set main clock registers */
> > >> +       clk->reg_sel[0] = reg_sel[0];
> > >> +       clk->reg_bits[0] = reg_bits[0];
> > >> +       clk->reg_mask[0] = reg_mask[0];
> > >> +
> > >> +       /* handle clocks with more than one parent */
> > >> +       for (i = 1; i < num_parents; i++) {
> > >>                 clk->reg_sel[i] = reg_sel[i];
> > >>                 clk->reg_bits[i] = reg_bits[i];
> > >>                 clk->reg_mask[i] = reg_mask[i];
> > >> --
> > >> 1.8.2
> > >>
> > >
> > > Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
> > >
> > > This is bugfix, should go "stable" as well?
> > 
> > Stable means 3.10 rcs, since the abx500 clk tree was added for 3.10.
> 
> Thanks!  Yes, it would be great if this could be queued up for an -rc.
> 

Taken into clk-fixes.

Thanks!
Mike

> Fabio
> 
> -- 
> Fabio Baltieri

  reply	other threads:[~2013-05-14 19:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-30 12:45 [PATCH] clk: ux500: clk-sysctrl: handle clocks with no parents Fabio Baltieri
2013-04-30 12:45 ` Fabio Baltieri
2013-05-03  8:51 ` Ulf Hansson
2013-05-03  8:51   ` Ulf Hansson
2013-05-03  8:54   ` Ulf Hansson
2013-05-03  8:54     ` Ulf Hansson
2013-05-03  9:03     ` Fabio Baltieri
2013-05-03  9:03       ` Fabio Baltieri
2013-05-14 19:06       ` Mike Turquette [this message]
2013-05-14 19:06         ` Mike Turquette

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=20130514190641.10068.14584@quantum \
    --to=mturquette@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.