2 * Low level clock header file for Telechips TCC architecture
3 * (C) 2010 Hans J. Koch <hjk@linutronix.de>
5 * Licensed under the GPL v2.
8 #ifndef __ASM_ARCH_TCC_CLOCK_H__
9 #define __ASM_ARCH_TCC_CLOCK_H__
15 /* id number of a root clock, 0 for normal clocks */
17 /* Reference count of clock enable/disable */
19 /* Address of associated BCLKCTRx register. Must be set. */
20 void __iomem
*bclkctr
;
21 /* Bit position for BCLKCTRx. Must be set. */
23 /* Address of ACLKxxx register, if any. */
24 void __iomem
*aclkreg
;
25 /* get the current clock rate (always a fresh value) */
26 unsigned long (*get_rate
) (struct clk
*);
27 /* Function ptr to set the clock to a new rate. The rate must match a
28 supported rate returned from round_rate. Leave blank if clock is not
30 int (*set_rate
) (struct clk
*, unsigned long);
31 /* Function ptr to round the requested clock rate to the nearest
32 supported rate that is less than or equal to the requested rate. */
33 unsigned long (*round_rate
) (struct clk
*, unsigned long);
34 /* Function ptr to enable the clock. Leave blank if clock can not
36 int (*enable
) (struct clk
*);
37 /* Function ptr to disable the clock. Leave blank if clock can not
39 void (*disable
) (struct clk
*);
40 /* Function ptr to set the parent clock of the clock. */
41 int (*set_parent
) (struct clk
*, struct clk
*);
44 int clk_register(struct clk
*clk
);
45 void clk_unregister(struct clk
*clk
);
47 #endif /* __ASSEMBLY__ */
48 #endif /* __ASM_ARCH_MXC_CLOCK_H__ */