Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux/fpc-iii.git] / arch / arm / mach-omap2 / clock2xxx.h
blob539dc08afbbaf3cb93536f600a5bb930b35d7d55
1 /*
2 * OMAP2 clock function prototypes and macros
4 * Copyright (C) 2005-2010 Texas Instruments, Inc.
5 * Copyright (C) 2004-2010 Nokia Corporation
6 */
8 #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK2XXX_H
9 #define __ARCH_ARM_MACH_OMAP2_CLOCK2XXX_H
11 #include <linux/clk-provider.h>
12 #include "clock.h"
14 unsigned long omap2_table_mpu_recalc(struct clk_hw *clk,
15 unsigned long parent_rate);
16 int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate,
17 unsigned long parent_rate);
18 long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate,
19 unsigned long *parent_rate);
20 unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk,
21 unsigned long parent_rate);
22 unsigned long omap2_osc_clk_recalc(struct clk_hw *clk,
23 unsigned long parent_rate);
24 unsigned long omap2_dpllcore_recalc(struct clk_hw *hw,
25 unsigned long parent_rate);
26 int omap2_reprogram_dpllcore(struct clk_hw *clk, unsigned long rate,
27 unsigned long parent_rate);
28 void omap2xxx_clkt_dpllcore_init(struct clk_hw *hw);
29 unsigned long omap2_clk_apll54_recalc(struct clk_hw *hw,
30 unsigned long parent_rate);
31 unsigned long omap2_clk_apll96_recalc(struct clk_hw *hw,
32 unsigned long parent_rate);
33 unsigned long omap2xxx_clk_get_core_rate(void);
34 u32 omap2xxx_get_apll_clkin(void);
35 u32 omap2xxx_get_sysclkdiv(void);
36 void omap2xxx_clk_prepare_for_reboot(void);
37 void omap2xxx_clkt_vps_check_bootloader_rates(void);
38 void omap2xxx_clkt_vps_late_init(void);
40 #ifdef CONFIG_SOC_OMAP2420
41 int omap2420_clk_init(void);
42 #else
43 #define omap2420_clk_init() do { } while(0)
44 #endif
46 #ifdef CONFIG_SOC_OMAP2430
47 int omap2430_clk_init(void);
48 #else
49 #define omap2430_clk_init() do { } while(0)
50 #endif
52 extern void __iomem *prcm_clksrc_ctrl;
54 extern struct clk_hw *dclk_hw;
55 int omap2_enable_osc_ck(struct clk_hw *hw);
56 void omap2_disable_osc_ck(struct clk_hw *hw);
57 int omap2_clk_apll96_enable(struct clk_hw *hw);
58 int omap2_clk_apll54_enable(struct clk_hw *hw);
59 void omap2_clk_apll96_disable(struct clk_hw *hw);
60 void omap2_clk_apll54_disable(struct clk_hw *hw);
62 #endif