diff options
author | Domen Puncer <domen.puncer@telargo.com> | 2007-09-20 10:00:11 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-10-02 19:11:56 -0400 |
commit | 6f6682809b994fd9a61081fa0410df31481d5f7f (patch) | |
tree | b70e568099380de0671e50362dce8e7c77c9443d /include/asm-powerpc/clk_interface.h | |
parent | 21ccdd31e9c70f42b00d9ea152f6c4e0ff3f536e (diff) |
[POWERPC] clk.h interface for platforms
This provides an implementation of the <linux/clk.h> interface for
arch/powerpc using a set of function pointers in clk_functions.
Platforms that want to support this interface should fill
clk_functions and select CONFIG_PPC_CLOCK in Kconfig.
Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/clk_interface.h')
-rw-r--r-- | include/asm-powerpc/clk_interface.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/asm-powerpc/clk_interface.h b/include/asm-powerpc/clk_interface.h new file mode 100644 index 000000000000..ab1882c1e176 --- /dev/null +++ b/include/asm-powerpc/clk_interface.h | |||
@@ -0,0 +1,20 @@ | |||
1 | #ifndef __ASM_POWERPC_CLK_INTERFACE_H | ||
2 | #define __ASM_POWERPC_CLK_INTERFACE_H | ||
3 | |||
4 | #include <linux/clk.h> | ||
5 | |||
6 | struct clk_interface { | ||
7 | struct clk* (*clk_get) (struct device *dev, const char *id); | ||
8 | int (*clk_enable) (struct clk *clk); | ||
9 | void (*clk_disable) (struct clk *clk); | ||
10 | unsigned long (*clk_get_rate) (struct clk *clk); | ||
11 | void (*clk_put) (struct clk *clk); | ||
12 | long (*clk_round_rate) (struct clk *clk, unsigned long rate); | ||
13 | int (*clk_set_rate) (struct clk *clk, unsigned long rate); | ||
14 | int (*clk_set_parent) (struct clk *clk, struct clk *parent); | ||
15 | struct clk* (*clk_get_parent) (struct clk *clk); | ||
16 | }; | ||
17 | |||
18 | extern struct clk_interface clk_functions; | ||
19 | |||
20 | #endif /* __ASM_POWERPC_CLK_INTERFACE_H */ | ||