aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator/include
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-11-08 15:08:08 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-11-27 07:38:22 -0500
commitd72fbdf01fc77628c0b837d0dd2fd564fa26ede6 (patch)
tree5ea1ba4f2771cfaf454621f8a2f6bdd616aa8e88 /arch/arm/mach-integrator/include
parentcf30fb4a4f2d261a6527a654a7fdc8636f1e5b16 (diff)
[ARM] integrator: convert to clkdev and lookup clocks by device name
People often point to the Integrator/Versatile/Realview implementations to justify using the consumer name as the sole selector for clocks. Eliminate this excuse by changing the Integrator implementation, so it provides a better example of how it should be done. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-integrator/include')
-rw-r--r--arch/arm/mach-integrator/include/mach/clkdev.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-integrator/include/mach/clkdev.h b/arch/arm/mach-integrator/include/mach/clkdev.h
new file mode 100644
index 000000000000..9293e410832a
--- /dev/null
+++ b/arch/arm/mach-integrator/include/mach/clkdev.h
@@ -0,0 +1,25 @@
1#ifndef __ASM_MACH_CLKDEV_H
2#define __ASM_MACH_CLKDEV_H
3
4#include <linux/module.h>
5#include <asm/hardware/icst525.h>
6
7struct clk {
8 unsigned long rate;
9 struct module *owner;
10 const struct icst525_params *params;
11 void *data;
12 void (*setvco)(struct clk *, struct icst525_vco vco);
13};
14
15static inline int __clk_get(struct clk *clk)
16{
17 return try_module_get(clk->owner);
18}
19
20static inline void __clk_put(struct clk *clk)
21{
22 module_put(clk->owner);
23}
24
25#endif