diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-11-20 23:01:04 +0100 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2012-11-21 11:02:20 -0800 |
commit | 7a9ad671ac0a0ec2fc86887a9416f837c0cfb801 (patch) | |
tree | e95cc3a618fad12634532f028363f85aeb5e4b57 /drivers/clk/versatile/clk-icst.h | |
parent | 401301ccdf516fa4b3b90216414a2a15fb826208 (diff) |
clk: make ICST driver handle the VCO registers
It turns out that all platforms using the ICST VCO are really
just touching two registers, and in the same way as well: one
register with the VCO configuration as such, and one lock register
that makes it possible to write to the VCO.
Factor this register read/write into the ICST driver so we can
reuse it in the IM-PD1 driver.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/versatile/clk-icst.h')
-rw-r--r-- | drivers/clk/versatile/clk-icst.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/clk/versatile/clk-icst.h b/drivers/clk/versatile/clk-icst.h index 71b4c56c1410..dad51b6ffd00 100644 --- a/drivers/clk/versatile/clk-icst.h +++ b/drivers/clk/versatile/clk-icst.h @@ -1,10 +1,18 @@ #include <asm/hardware/icst.h> +/** + * struct clk_icst_desc - descriptor for the ICST VCO + * @params: ICST parameters + * @vco_offset: offset to the ICST VCO from the provided memory base + * @lock_offset: offset to the ICST VCO locking register from the provided + * memory base + */ struct clk_icst_desc { const struct icst_params *params; - struct icst_vco (*getvco)(void); - void (*setvco)(struct icst_vco); + u32 vco_offset; + u32 lock_offset; }; struct clk *icst_clk_register(struct device *dev, - const struct clk_icst_desc *desc); + const struct clk_icst_desc *desc, + void __iomem *base); |