2008-11-09 04:08:08 +08:00
|
|
|
#ifndef __ASM_MACH_CLKDEV_H
|
|
|
|
#define __ASM_MACH_CLKDEV_H
|
|
|
|
|
|
|
|
#include <linux/module.h>
|
2010-01-17 00:27:28 +08:00
|
|
|
#include <asm/hardware/icst.h>
|
2008-11-09 04:08:08 +08:00
|
|
|
|
|
|
|
struct clk {
|
|
|
|
unsigned long rate;
|
|
|
|
struct module *owner;
|
2010-01-17 00:27:28 +08:00
|
|
|
const struct icst_params *params;
|
2008-11-09 04:08:08 +08:00
|
|
|
void *data;
|
2010-01-17 00:27:28 +08:00
|
|
|
void (*setvco)(struct clk *, struct icst_vco vco);
|
2008-11-09 04:08:08 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static inline int __clk_get(struct clk *clk)
|
|
|
|
{
|
|
|
|
return try_module_get(clk->owner);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void __clk_put(struct clk *clk)
|
|
|
|
{
|
|
|
|
module_put(clk->owner);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|