1#ifndef __ASM_MACH_CLKDEV_H 2#define __ASM_MACH_CLKDEV_H __FILE__ 3 4#include <asm/atomic.h> 5#include <plat/clock.h> 6 7struct clk { 8 const struct clk_ops * ops; 9 const char * name; 10 atomic_t ena_cnt; 11 atomic_t use_cnt; 12 unsigned long rate; 13 unsigned gated :1; 14 unsigned fixed :1; 15 unsigned chan :6; 16 void __iomem * regs_base; 17 struct clk * parent; 18 /* TBD: could it have multiple parents to select from ? */ 19 enum { 20 CLK_XTAL, CLK_GATE, CLK_PLL, CLK_DIV, CLK_PHA 21 } type; 22}; 23 24extern int __clk_get(struct clk *clk); 25extern void __clk_put(struct clk *clk); 26 27#endif 28