aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clock.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/clock.h')
-rw-r--r--arch/arm/mach-omap2/clock.h50
1 files changed, 46 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index 93c48df3b5b1..ad8a1f7c1afc 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -47,7 +47,10 @@
47#define DPLL_LOW_POWER_BYPASS 0x5 47#define DPLL_LOW_POWER_BYPASS 0x5
48#define DPLL_LOCKED 0x7 48#define DPLL_LOCKED 0x7
49 49
50int omap2_clk_init(void); 50/* DPLL Type and DCO Selection Flags */
51#define DPLL_J_TYPE 0x1
52#define DPLL_NO_DCO_SEL 0x2
53
51int omap2_clk_enable(struct clk *clk); 54int omap2_clk_enable(struct clk *clk);
52void omap2_clk_disable(struct clk *clk); 55void omap2_clk_disable(struct clk *clk);
53long omap2_clk_round_rate(struct clk *clk, unsigned long rate); 56long omap2_clk_round_rate(struct clk *clk, unsigned long rate);
@@ -78,23 +81,53 @@ u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,
78 u32 *new_div); 81 u32 *new_div);
79u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val); 82u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val);
80u32 omap2_divisor_to_clksel(struct clk *clk, u32 div); 83u32 omap2_divisor_to_clksel(struct clk *clk, u32 div);
81unsigned long omap2_fixed_divisor_recalc(struct clk *clk);
82long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate); 84long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate);
83int omap2_clksel_set_rate(struct clk *clk, unsigned long rate); 85int omap2_clksel_set_rate(struct clk *clk, unsigned long rate);
86int omap2_clksel_set_parent(struct clk *clk, struct clk *new_parent);
84u32 omap2_get_dpll_rate(struct clk *clk); 87u32 omap2_get_dpll_rate(struct clk *clk);
85void omap2_init_dpll_parent(struct clk *clk); 88void omap2_init_dpll_parent(struct clk *clk);
86int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name); 89int omap2_wait_clock_ready(void __iomem *reg, u32 cval, const char *name);
87void omap2_clk_prepare_for_reboot(void); 90
91
92#ifdef CONFIG_ARCH_OMAP2
93void omap2xxx_clk_prepare_for_reboot(void);
94#else
95static inline void omap2xxx_clk_prepare_for_reboot(void)
96{
97}
98#endif
99
100#ifdef CONFIG_ARCH_OMAP3
101void omap3_clk_prepare_for_reboot(void);
102#else
103static inline void omap3_clk_prepare_for_reboot(void)
104{
105}
106#endif
107
108#ifdef CONFIG_ARCH_OMAP4
109void omap4_clk_prepare_for_reboot(void);
110#else
111static inline void omap4_clk_prepare_for_reboot(void)
112{
113}
114#endif
115
88int omap2_dflt_clk_enable(struct clk *clk); 116int omap2_dflt_clk_enable(struct clk *clk);
89void omap2_dflt_clk_disable(struct clk *clk); 117void omap2_dflt_clk_disable(struct clk *clk);
90void omap2_clk_dflt_find_companion(struct clk *clk, void __iomem **other_reg, 118void omap2_clk_dflt_find_companion(struct clk *clk, void __iomem **other_reg,
91 u8 *other_bit); 119 u8 *other_bit);
92void omap2_clk_dflt_find_idlest(struct clk *clk, void __iomem **idlest_reg, 120void omap2_clk_dflt_find_idlest(struct clk *clk, void __iomem **idlest_reg,
93 u8 *idlest_bit); 121 u8 *idlest_bit, u8 *idlest_val);
122int omap2_clk_switch_mpurate_at_boot(const char *mpurate_ck_name);
123void omap2_clk_print_new_rates(const char *hfclkin_ck_name,
124 const char *core_ck_name,
125 const char *mpu_ck_name);
94 126
95extern u8 cpu_mask; 127extern u8 cpu_mask;
96 128
97extern const struct clkops clkops_omap2_dflt_wait; 129extern const struct clkops clkops_omap2_dflt_wait;
130extern const struct clkops clkops_dummy;
98extern const struct clkops clkops_omap2_dflt; 131extern const struct clkops clkops_omap2_dflt;
99 132
100extern struct clk_functions omap2_clk_functions; 133extern struct clk_functions omap2_clk_functions;
@@ -104,5 +137,14 @@ extern const struct clksel_rate gpt_32k_rates[];
104extern const struct clksel_rate gpt_sys_rates[]; 137extern const struct clksel_rate gpt_sys_rates[];
105extern const struct clksel_rate gfx_l3_rates[]; 138extern const struct clksel_rate gfx_l3_rates[];
106 139
140#if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_CPU_FREQ)
141extern void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
142extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table);
143#else
144#define omap2_clk_init_cpufreq_table 0
145#define omap2_clk_exit_cpufreq_table 0
146#endif
147
148extern const struct clkops clkops_omap3_noncore_dpll_ops;
107 149
108#endif 150#endif