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:
Russell King
2010-03-01 16:18:39 +00:00
parent 3081e43b97
commit 9bf5b2ef67
9 changed files with 77 additions and 24 deletions

View File

@@ -381,11 +381,17 @@ static void versatile_oscvco_set(struct clk *clk, struct icst_vco vco)
writel(0, sys_lock);
}
static struct clk osc4_clk = {
.params = &versatile_oscvco_params,
static const struct clk_ops osc4_clk_ops = {
.round = icst_clk_round,
.set = icst_clk_set,
.setvco = versatile_oscvco_set,
};
static struct clk osc4_clk = {
.ops = &osc4_clk_ops,
.params = &versatile_oscvco_params,
};
/*
* These are fixed clocks.
*/

View File

@@ -1,13 +1,13 @@
#ifndef __ASM_MACH_CLKDEV_H
#define __ASM_MACH_CLKDEV_H
#include <asm/hardware/icst.h>
#include <plat/clock.h>
struct clk {
unsigned long rate;
const struct clk_ops *ops;
const struct icst_params *params;
void __iomem *vcoreg;
void (*setvco)(struct clk *, struct icst_vco vco);
};
#define __clk_get(clk) ({ 1; })