xref: /openbmc/linux/arch/arm/mach-omap2/clock2xxx.h (revision 44da0a51)
1d8a94458SPaul Walmsley /*
2d8a94458SPaul Walmsley  * OMAP2 clock function prototypes and macros
3d8a94458SPaul Walmsley  *
4d8a94458SPaul Walmsley  * Copyright (C) 2005-2009 Texas Instruments, Inc.
5d8a94458SPaul Walmsley  * Copyright (C) 2004-2009 Nokia Corporation
6d8a94458SPaul Walmsley  */
7d8a94458SPaul Walmsley 
8d8a94458SPaul Walmsley #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_24XX_H
9d8a94458SPaul Walmsley #define __ARCH_ARM_MACH_OMAP2_CLOCK_24XX_H
10d8a94458SPaul Walmsley 
11d8a94458SPaul Walmsley unsigned long omap2_table_mpu_recalc(struct clk *clk);
12d8a94458SPaul Walmsley int omap2_select_table_rate(struct clk *clk, unsigned long rate);
13d8a94458SPaul Walmsley long omap2_round_to_table_rate(struct clk *clk, unsigned long rate);
1444da0a51SPaul Walmsley unsigned long omap2xxx_sys_clk_recalc(struct clk *clk);
15d8a94458SPaul Walmsley unsigned long omap2_osc_clk_recalc(struct clk *clk);
16d8a94458SPaul Walmsley unsigned long omap2_dpllcore_recalc(struct clk *clk);
17d8a94458SPaul Walmsley int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate);
18d8a94458SPaul Walmsley unsigned long omap2xxx_clk_get_core_rate(struct clk *clk);
1949214640SPaul Walmsley u32 omap2xxx_get_apll_clkin(void);
2087a1b26cSPaul Walmsley u32 omap2xxx_get_sysclkdiv(void);
21d8a94458SPaul Walmsley 
22d8a94458SPaul Walmsley /* REVISIT: These should be set dynamically for CONFIG_MULTI_OMAP2 */
23d8a94458SPaul Walmsley #ifdef CONFIG_ARCH_OMAP2420
24d8a94458SPaul Walmsley #define OMAP_CM_REGADDR			OMAP2420_CM_REGADDR
25d8a94458SPaul Walmsley #define OMAP24XX_PRCM_CLKOUT_CTRL	OMAP2420_PRCM_CLKOUT_CTRL
26d8a94458SPaul Walmsley #define OMAP24XX_PRCM_CLKEMUL_CTRL	OMAP2420_PRCM_CLKEMUL_CTRL
27d8a94458SPaul Walmsley #else
28d8a94458SPaul Walmsley #define OMAP_CM_REGADDR			OMAP2430_CM_REGADDR
29d8a94458SPaul Walmsley #define OMAP24XX_PRCM_CLKOUT_CTRL	OMAP2430_PRCM_CLKOUT_CTRL
30d8a94458SPaul Walmsley #define OMAP24XX_PRCM_CLKEMUL_CTRL	OMAP2430_PRCM_CLKEMUL_CTRL
31d8a94458SPaul Walmsley #endif
32d8a94458SPaul Walmsley 
33d8a94458SPaul Walmsley extern void __iomem *prcm_clksrc_ctrl;
34d8a94458SPaul Walmsley 
35d8a94458SPaul Walmsley extern struct clk *dclk;
36d8a94458SPaul Walmsley 
37d8a94458SPaul Walmsley extern const struct clkops clkops_omap2430_i2chs_wait;
38d8a94458SPaul Walmsley extern const struct clkops clkops_oscck;
39d8a94458SPaul Walmsley extern const struct clkops clkops_apll96;
40d8a94458SPaul Walmsley extern const struct clkops clkops_apll54;
41d8a94458SPaul Walmsley 
42d8a94458SPaul Walmsley #endif
43