ARM: Indirect round/set_rate operations through clk structure
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
@@ -71,6 +71,12 @@ static void impd1_setvco(struct clk *clk, struct icst_vco vco)
|
||||
#endif
|
||||
}
|
||||
|
||||
static const struct clk_ops impd1_clk_ops = {
|
||||
.round = icst_clk_round,
|
||||
.set = icst_clk_set,
|
||||
.setvco = impd1_setvco,
|
||||
};
|
||||
|
||||
void impd1_tweak_control(struct device *dev, u32 mask, u32 val)
|
||||
{
|
||||
struct impd1_module *impd1 = dev_get_drvdata(dev);
|
||||
@@ -366,10 +372,10 @@ static int impd1_probe(struct lm_device *dev)
|
||||
(unsigned long)dev->resource.start);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) {
|
||||
impd1->vcos[i].ops = &impd1_clk_ops,
|
||||
impd1->vcos[i].owner = THIS_MODULE,
|
||||
impd1->vcos[i].params = &impd1_vco_params,
|
||||
impd1->vcos[i].data = impd1,
|
||||
impd1->vcos[i].setvco = impd1_setvco;
|
||||
impd1->vcos[i].data = impd1;
|
||||
}
|
||||
impd1->vcos[0].vcoreg = impd1->base + IMPD1_OSC1;
|
||||
impd1->vcos[1].vcoreg = impd1->base + IMPD1_OSC2;
|
||||
|
@@ -2,14 +2,14 @@
|
||||
#define __ASM_MACH_CLKDEV_H
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <asm/hardware/icst.h>
|
||||
#include <plat/clock.h>
|
||||
|
||||
struct clk {
|
||||
unsigned long rate;
|
||||
const struct clk_ops *ops;
|
||||
struct module *owner;
|
||||
const struct icst_params *params;
|
||||
void __iomem *vcoreg;
|
||||
void (*setvco)(struct clk *, struct icst_vco vco);
|
||||
void *data;
|
||||
};
|
||||
|
||||
|
@@ -293,10 +293,16 @@ static void cp_auxvco_set(struct clk *clk, struct icst_vco vco)
|
||||
writel(0, CM_LOCK);
|
||||
}
|
||||
|
||||
static const struct clk_ops cp_auxclk_ops = {
|
||||
.round = icst_clk_round,
|
||||
.set = icst_clk_set,
|
||||
.setvco = cp_auxvco_set,
|
||||
};
|
||||
|
||||
static struct clk cp_auxclk = {
|
||||
.ops = &cp_auxclk_ops,
|
||||
.params = &cp_auxvco_params,
|
||||
.vcoreg = CM_AUXOSC,
|
||||
.setvco = cp_auxvco_set,
|
||||
};
|
||||
|
||||
static struct clk_lookup cp_lookups[] = {
|
||||
|
Reference in New Issue
Block a user