diff options
Diffstat (limited to 'arch/arm/mach-omap2/clock.h')
-rw-r--r-- | arch/arm/mach-omap2/clock.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 1fb330e0847d..2679ddfa6424 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h | |||
@@ -21,13 +21,28 @@ | |||
21 | /* The maximum error between a target DPLL rate and the rounded rate in Hz */ | 21 | /* The maximum error between a target DPLL rate and the rounded rate in Hz */ |
22 | #define DEFAULT_DPLL_RATE_TOLERANCE 50000 | 22 | #define DEFAULT_DPLL_RATE_TOLERANCE 50000 |
23 | 23 | ||
24 | /* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */ | ||
25 | #define CORE_CLK_SRC_32K 0x0 | ||
26 | #define CORE_CLK_SRC_DPLL 0x1 | ||
27 | #define CORE_CLK_SRC_DPLL_X2 0x2 | ||
28 | |||
29 | /* OMAP2xxx CM_CLKEN_PLL.EN_DPLL bits - for omap2_get_dpll_rate() */ | ||
30 | #define OMAP2XXX_EN_DPLL_LPBYPASS 0x1 | ||
31 | #define OMAP2XXX_EN_DPLL_FRBYPASS 0x2 | ||
32 | #define OMAP2XXX_EN_DPLL_LOCKED 0x3 | ||
33 | |||
34 | /* OMAP3xxx CM_CLKEN_PLL*.EN_*_DPLL bits - for omap2_get_dpll_rate() */ | ||
35 | #define OMAP3XXX_EN_DPLL_LPBYPASS 0x5 | ||
36 | #define OMAP3XXX_EN_DPLL_FRBYPASS 0x6 | ||
37 | #define OMAP3XXX_EN_DPLL_LOCKED 0x7 | ||
38 | |||
24 | int omap2_clk_init(void); | 39 | int omap2_clk_init(void); |
25 | int omap2_clk_enable(struct clk *clk); | 40 | int omap2_clk_enable(struct clk *clk); |
26 | void omap2_clk_disable(struct clk *clk); | 41 | void omap2_clk_disable(struct clk *clk); |
27 | long omap2_clk_round_rate(struct clk *clk, unsigned long rate); | 42 | long omap2_clk_round_rate(struct clk *clk, unsigned long rate); |
28 | int omap2_clk_set_rate(struct clk *clk, unsigned long rate); | 43 | int omap2_clk_set_rate(struct clk *clk, unsigned long rate); |
29 | int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent); | 44 | int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent); |
30 | int omap2_dpll_rate_tolerance_set(struct clk *clk, unsigned int tolerance); | 45 | int omap2_dpll_set_rate_tolerance(struct clk *clk, unsigned int tolerance); |
31 | long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate); | 46 | long omap2_dpll_round_rate(struct clk *clk, unsigned long target_rate); |
32 | 47 | ||
33 | #ifdef CONFIG_OMAP_RESET_CLOCKS | 48 | #ifdef CONFIG_OMAP_RESET_CLOCKS |
@@ -36,7 +51,7 @@ void omap2_clk_disable_unused(struct clk *clk); | |||
36 | #define omap2_clk_disable_unused NULL | 51 | #define omap2_clk_disable_unused NULL |
37 | #endif | 52 | #endif |
38 | 53 | ||
39 | void omap2_clksel_recalc(struct clk *clk); | 54 | unsigned long omap2_clksel_recalc(struct clk *clk); |
40 | void omap2_init_clk_clkdm(struct clk *clk); | 55 | void omap2_init_clk_clkdm(struct clk *clk); |
41 | void omap2_init_clksel_parent(struct clk *clk); | 56 | void omap2_init_clksel_parent(struct clk *clk); |
42 | u32 omap2_clksel_get_divisor(struct clk *clk); | 57 | u32 omap2_clksel_get_divisor(struct clk *clk); |
@@ -44,13 +59,16 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate, | |||
44 | u32 *new_div); | 59 | u32 *new_div); |
45 | u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val); | 60 | u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val); |
46 | u32 omap2_divisor_to_clksel(struct clk *clk, u32 div); | 61 | u32 omap2_divisor_to_clksel(struct clk *clk, u32 div); |
47 | void omap2_fixed_divisor_recalc(struct clk *clk); | 62 | unsigned long omap2_fixed_divisor_recalc(struct clk *clk); |
48 | long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate); | 63 | long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate); |
49 | int omap2_clksel_set_rate(struct clk *clk, unsigned long rate); | 64 | int omap2_clksel_set_rate(struct clk *clk, unsigned long rate); |
50 | u32 omap2_get_dpll_rate(struct clk *clk); | 65 | u32 omap2_get_dpll_rate(struct clk *clk); |
51 | int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name); | 66 | int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name); |
52 | void omap2_clk_prepare_for_reboot(void); | 67 | void omap2_clk_prepare_for_reboot(void); |
53 | 68 | ||
69 | extern const struct clkops clkops_omap2_dflt_wait; | ||
70 | extern const struct clkops clkops_omap2_dflt; | ||
71 | |||
54 | extern u8 cpu_mask; | 72 | extern u8 cpu_mask; |
55 | 73 | ||
56 | /* clksel_rate data common to 24xx/343x */ | 74 | /* clksel_rate data common to 24xx/343x */ |