Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1243750 > unrolled thread

Re: [PATCH 05/10] clk: iproc: Add PLL base write function

Started byStephen Boyd <sboyd@codeaurora.org>
First post2015-10-10 02:30 +0200
Last post2015-10-12 19:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 05/10] clk: iproc: Add PLL base write function Stephen Boyd <sboyd@codeaurora.org> - 2015-10-10 02:30 +0200
    Re: [PATCH 05/10] clk: iproc: Add PLL base write function Jon Mason <jonmason@broadcom.com> - 2015-10-12 19:50 +0200

#1243750 — Re: [PATCH 05/10] clk: iproc: Add PLL base write function

FromStephen Boyd <sboyd@codeaurora.org>
Date2015-10-10 02:30 +0200
SubjectRe: [PATCH 05/10] clk: iproc: Add PLL base write function
Message-ID<qhQcV-1ik-3@gated-at.bofh.it>
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?

-- 
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 linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1244959

FromJon Mason <jonmason@broadcom.com>
Date2015-10-12 19:50 +0200
Message-ID<qiPov-64e-27@gated-at.bofh.it>
In reply to#1243750
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 linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web