mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Marek Vasut <marex@denx.de>
Cc: linux-kernel@vger.kernel.org, festevam@gmail.com,
	shawn.guo@linaro.org, mturquette@linaro.org, harald@ccbib.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] clk: mxs: Fix invalid 32-bit access to frac registers
Date: Mon, 22 Dec 2014 01:30:11 +0100 (CET)	[thread overview]
Message-ID: <1033288193.576178.1419208211101.JavaMail.open-xchange@oxbaltgw03.schlund.de> (raw)
In-Reply-To: <201412212250.16007.marex@denx.de>

Hi Marek,

> Marek Vasut <marex@denx.de> hat am 21. Dezember 2014 um 22:50 geschrieben:
>
>
> On Sunday, December 21, 2014 at 02:46:39 PM, Stefan Wahren wrote:
>
> Hi!
>
> [...]
>
> > diff --git a/drivers/clk/mxs/clk-ref.c b/drivers/clk/mxs/clk-ref.c
> > index 4adeed6..bdecec1 100644
> > --- a/drivers/clk/mxs/clk-ref.c
> > +++ b/drivers/clk/mxs/clk-ref.c
> > @@ -16,6 +16,8 @@
> > #include <linux/slab.h>
> > #include "clk.h"
> >
> > +#define BF_CLKGATE BIT(7)
> > +
> > /**
> > * struct clk_ref - mxs reference clock
> > * @hw: clk_hw for the reference clock
> > @@ -39,7 +41,7 @@ static int clk_ref_enable(struct clk_hw *hw)
> > {
> > struct clk_ref *ref = to_clk_ref(hw);
> >
> > - writel_relaxed(1 << ((ref->idx + 1) * 8 - 1), ref->reg + CLR);
> > + writeb(BF_CLKGATE, ref->reg + ref->idx + CLR);
>
> Should this be writeb_relaxed() maybe ?
>
> > return 0;
> > }
> > @@ -48,7 +50,7 @@ static void clk_ref_disable(struct clk_hw *hw)
> > {
> > struct clk_ref *ref = to_clk_ref(hw);
> >
> > - writel_relaxed(1 << ((ref->idx + 1) * 8 - 1), ref->reg + SET);
> > + writeb(BF_CLKGATE, ref->reg + ref->idx + SET);
>
> Same here and all around the place ?

okay, i will fix it in V2.

>
> Other than that, it looks pretty OK :)

Fine

>
> Best regards,
> Marek Vasut

Best regards
Stefan

      reply	other threads:[~2014-12-22  0:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-21 13:46 Stefan Wahren
2014-12-21 21:50 ` Marek Vasut
2014-12-22  0:30   ` Stefan Wahren [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=1033288193.576178.1419208211101.JavaMail.open-xchange@oxbaltgw03.schlund.de \
    --to=stefan.wahren@i2se.com \
    --cc=festevam@gmail.com \
    --cc=harald@ccbib.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=mturquette@linaro.org \
    --cc=shawn.guo@linaro.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

all inboxes | Powered by JetHome®