Thread (90 messages) flat view 90 messages, 6 authors, 2011-01-19
STALE5713d

[PATCH V4 04/62] ST SPEAr: Making clock functions more generic

From: viresh kumar <hidden>
Date: 2011-01-19 04:03:01

On 01/18/2011 09:26 PM, Russell King - ARM Linux wrote:
On Tue, Jan 18, 2011 at 12:41:32PM +0530, Viresh Kumar wrote:
quoted
 /* pll1 configuration structure */
 static struct pll_clk_config pll1_config = {
 	.mode_reg = PLL1_CTR,
 	.cfg_reg = PLL1_FRQ,
+	.masks = &pll1_masks,
 };
 
 /* PLL1 clock */
...
quoted
-	mode = (readl(config->mode_reg) >> PLL_MODE_SHIFT) &
-		PLL_MODE_MASK;
+	mode = (readl(config->mode_reg) >> config->masks->mode_shift) &
+		config->masks->mode_mask;
 
...
quoted
 struct pll_clk_config {
-	unsigned int *mode_reg;
-	unsigned int *cfg_reg;
+	u32 *mode_reg;
+	u32 *cfg_reg;
+	struct pll_clk_masks *masks;
 };
Registers should have an __iomem attribute on them.  Preferably, but
not absolutely necessary, should be void to prevent any direct
dereferencing.
.
Yes, it should be void __iomem *

-- 
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help