All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Mason <jonmason@broadcom.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Hauke Mehrtens <hauke@hauke-m.de>, Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	<linux-clk@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	<bcm-kernel-feedback-list@broadcom.com>
Subject: Re: [PATCH 05/10] clk: iproc: Add PLL base write function
Date: Mon, 12 Oct 2015 13:48:53 -0400	[thread overview]
Message-ID: <20151012174853.GD20867@broadcom.com> (raw)
In-Reply-To: <20151010002106.GZ26883@codeaurora.org>

On Fri, Oct 09, 2015 at 05:21:06PM -0700, Stephen Boyd wrote:
> On 10/02, Jon Mason wrote:
> > diff --git a/drivers/clk/bcm/clk-iproc-pll.c b/drivers/clk/bcm/clk-iproc-pll.c
> > index e029ab3..a4602aa 100644
> > --- a/drivers/clk/bcm/clk-iproc-pll.c
> > +++ b/drivers/clk/bcm/clk-iproc-pll.c
> > @@ -137,6 +137,18 @@ static int pll_wait_for_lock(struct iproc_pll *pll)
> >  	return -EIO;
> >  }
> >  
> > +static void iproc_pll_write(struct iproc_pll *pll, void __iomem *base,
> > +			    u32 offset, u32 val)
> > +{
> > +	const struct iproc_pll_ctrl *ctrl = pll->ctrl;
> > +
> > +	writel(val, base + offset);
> > +
> > +	if (unlikely(ctrl->flags & IPROC_CLK_NEEDS_READ_BACK &&
> > +		     base == pll->pll_base))
> > +		val = readl(base + offset);
> 
> Is there any point to assign val here?

It is a flush.  The val assignment could be excluded (and thus made
const) if so desired.

Thanks,
Jon

> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project

WARNING: multiple messages have this Message-ID (diff)
From: jonmason@broadcom.com (Jon Mason)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/10] clk: iproc: Add PLL base write function
Date: Mon, 12 Oct 2015 13:48:53 -0400	[thread overview]
Message-ID: <20151012174853.GD20867@broadcom.com> (raw)
In-Reply-To: <20151010002106.GZ26883@codeaurora.org>

On Fri, Oct 09, 2015 at 05:21:06PM -0700, Stephen Boyd wrote:
> On 10/02, Jon Mason wrote:
> > diff --git a/drivers/clk/bcm/clk-iproc-pll.c b/drivers/clk/bcm/clk-iproc-pll.c
> > index e029ab3..a4602aa 100644
> > --- a/drivers/clk/bcm/clk-iproc-pll.c
> > +++ b/drivers/clk/bcm/clk-iproc-pll.c
> > @@ -137,6 +137,18 @@ static int pll_wait_for_lock(struct iproc_pll *pll)
> >  	return -EIO;
> >  }
> >  
> > +static void iproc_pll_write(struct iproc_pll *pll, void __iomem *base,
> > +			    u32 offset, u32 val)
> > +{
> > +	const struct iproc_pll_ctrl *ctrl = pll->ctrl;
> > +
> > +	writel(val, base + offset);
> > +
> > +	if (unlikely(ctrl->flags & IPROC_CLK_NEEDS_READ_BACK &&
> > +		     base == pll->pll_base))
> > +		val = readl(base + offset);
> 
> Is there any point to assign val here?

It is a flush.  The val assignment could be excluded (and thus made
const) if so desired.

Thanks,
Jon

> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project

WARNING: multiple messages have this Message-ID (diff)
From: Jon Mason <jonmason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
To: Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: Michael Turquette
	<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	Florian Fainelli
	<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>,
	Ray Jui <rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	Scott Branden <sbranden-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH 05/10] clk: iproc: Add PLL base write function
Date: Mon, 12 Oct 2015 13:48:53 -0400	[thread overview]
Message-ID: <20151012174853.GD20867@broadcom.com> (raw)
In-Reply-To: <20151010002106.GZ26883-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

On Fri, Oct 09, 2015 at 05:21:06PM -0700, Stephen Boyd wrote:
> On 10/02, Jon Mason wrote:
> > diff --git a/drivers/clk/bcm/clk-iproc-pll.c b/drivers/clk/bcm/clk-iproc-pll.c
> > index e029ab3..a4602aa 100644
> > --- a/drivers/clk/bcm/clk-iproc-pll.c
> > +++ b/drivers/clk/bcm/clk-iproc-pll.c
> > @@ -137,6 +137,18 @@ static int pll_wait_for_lock(struct iproc_pll *pll)
> >  	return -EIO;
> >  }
> >  
> > +static void iproc_pll_write(struct iproc_pll *pll, void __iomem *base,
> > +			    u32 offset, u32 val)
> > +{
> > +	const struct iproc_pll_ctrl *ctrl = pll->ctrl;
> > +
> > +	writel(val, base + offset);
> > +
> > +	if (unlikely(ctrl->flags & IPROC_CLK_NEEDS_READ_BACK &&
> > +		     base == pll->pll_base))
> > +		val = readl(base + offset);
> 
> Is there any point to assign val here?

It is a flush.  The val assignment could be excluded (and thus made
const) if so desired.

Thanks,
Jon

> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-10-12 17:48 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 22:57 [PATCH 0/10] clk: iproc: add support for BCM NS, NSP, and NS2 Jon Mason
2015-10-02 22:57 ` Jon Mason
2015-10-02 22:57 ` Jon Mason
2015-10-02 22:57 ` [PATCH 01/10] clk: iproc: Add PWRCTRL support Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57 ` [PATCH 02/10] clk: nsp: add clock support for Broadcom Northstar Plus SoC Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-09  7:37   ` Stephen Boyd
2015-10-09  7:37     ` Stephen Boyd
2015-10-09 17:59     ` Jon Mason
2015-10-09 17:59       ` Jon Mason
2015-10-09 17:59       ` Jon Mason
2015-10-02 22:57 ` [PATCH 03/10] clk: iproc: define Broadcom NSP iProc clock binding Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57 ` [PATCH 04/10] ARM: dts: enable clock support for BCM5301X Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-09  7:35   ` Stephen Boyd
2015-10-09  7:35     ` Stephen Boyd
2015-10-09 18:27     ` Jon Mason
2015-10-09 18:27       ` Jon Mason
2015-10-09 18:27       ` Jon Mason
2015-10-10  0:14       ` Stephen Boyd
2015-10-10  0:14         ` Stephen Boyd
2015-10-12 17:57         ` Jon Mason
2015-10-12 17:57           ` Jon Mason
2015-10-12 17:57           ` Jon Mason
2015-10-02 22:57 ` [PATCH 05/10] clk: iproc: Add PLL base write function Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-09  7:03   ` Stephen Boyd
2015-10-09  7:03     ` Stephen Boyd
2015-10-09 18:01     ` Jon Mason
2015-10-09 18:01       ` Jon Mason
2015-10-09 18:01       ` Jon Mason
2015-10-10  0:21   ` Stephen Boyd
2015-10-10  0:21     ` Stephen Boyd
2015-10-12 17:48     ` Jon Mason [this message]
2015-10-12 17:48       ` Jon Mason
2015-10-12 17:48       ` Jon Mason
2015-10-02 22:57 ` [PATCH 06/10] clk: iproc: Split off dig_filter Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57 ` [PATCH 07/10] clk: iproc: Separate status and control variables Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57 ` [PATCH 08/10] clk: iproc: define Broadcom NS2 iProc clock binding Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57 ` [PATCH 09/10] clk: ns2: add clock support for Broadcom Northstar 2 SoC Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-10  0:19   ` Stephen Boyd
2015-10-10  0:19     ` Stephen Boyd
2015-10-12 17:52     ` Jon Mason
2015-10-12 17:52       ` Jon Mason
2015-10-12 17:52       ` Jon Mason
2015-10-10  0:33   ` Stephen Boyd
2015-10-10  0:33     ` Stephen Boyd
2015-10-10  0:33     ` Stephen Boyd
2015-10-12 18:19     ` Jon Mason
2015-10-12 18:19       ` Jon Mason
2015-10-12 18:19       ` Jon Mason
2015-10-13 16:51       ` Scott Branden
2015-10-13 16:51         ` Scott Branden
2015-10-13 16:51         ` Scott Branden
2015-10-13 18:39         ` Stephen Boyd
2015-10-13 18:39           ` Stephen Boyd
2015-10-02 22:57 ` [PATCH 10/10] ARM: dts: enable clock support for Broadcom NS2 Jon Mason
2015-10-02 22:57   ` Jon Mason
2015-10-02 22:57   ` Jon Mason

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=20151012174853.GD20867@broadcom.com \
    --to=jonmason@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=rjui@broadcom.com \
    --cc=sboyd@codeaurora.org \
    --cc=sbranden@broadcom.com \
    /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.