Thread (27 messages) 27 messages, 3 authors, 2015-10-13

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

From: Jon Mason <hidden>
Date: 2015-10-12 17:49:02
Also in: linux-clk, linux-devicetree, lkml

On Fri, Oct 09, 2015 at 05:21:06PM -0700, Stephen Boyd wrote:
On 10/02, Jon Mason wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help