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