Paul Walmsley | d8a9445 | 2009-12-08 16:21:29 -0700 | [diff] [blame] | 1 | /* |
| 2 | * OMAP2 clock function prototypes and macros |
| 3 | * |
| 4 | * Copyright (C) 2005-2009 Texas Instruments, Inc. |
| 5 | * Copyright (C) 2004-2009 Nokia Corporation |
| 6 | */ |
| 7 | |
| 8 | #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_24XX_H |
| 9 | #define __ARCH_ARM_MACH_OMAP2_CLOCK_24XX_H |
| 10 | |
| 11 | unsigned long omap2_table_mpu_recalc(struct clk *clk); |
| 12 | int omap2_select_table_rate(struct clk *clk, unsigned long rate); |
| 13 | long omap2_round_to_table_rate(struct clk *clk, unsigned long rate); |
| 14 | unsigned long omap2_sys_clk_recalc(struct clk *clk); |
| 15 | unsigned long omap2_osc_clk_recalc(struct clk *clk); |
| 16 | unsigned long omap2_sys_clk_recalc(struct clk *clk); |
| 17 | unsigned long omap2_dpllcore_recalc(struct clk *clk); |
| 18 | int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate); |
| 19 | unsigned long omap2xxx_clk_get_core_rate(struct clk *clk); |
Paul Walmsley | 4921464 | 2010-01-26 20:13:06 -0700 | [diff] [blame] | 20 | u32 omap2xxx_get_apll_clkin(void); |
Paul Walmsley | 87a1b26 | 2010-01-26 20:13:07 -0700 | [diff] [blame^] | 21 | u32 omap2xxx_get_sysclkdiv(void); |
Paul Walmsley | d8a9445 | 2009-12-08 16:21:29 -0700 | [diff] [blame] | 22 | |
| 23 | /* REVISIT: These should be set dynamically for CONFIG_MULTI_OMAP2 */ |
| 24 | #ifdef CONFIG_ARCH_OMAP2420 |
| 25 | #define OMAP_CM_REGADDR OMAP2420_CM_REGADDR |
| 26 | #define OMAP24XX_PRCM_CLKOUT_CTRL OMAP2420_PRCM_CLKOUT_CTRL |
| 27 | #define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2420_PRCM_CLKEMUL_CTRL |
| 28 | #else |
| 29 | #define OMAP_CM_REGADDR OMAP2430_CM_REGADDR |
| 30 | #define OMAP24XX_PRCM_CLKOUT_CTRL OMAP2430_PRCM_CLKOUT_CTRL |
| 31 | #define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2430_PRCM_CLKEMUL_CTRL |
| 32 | #endif |
| 33 | |
| 34 | extern void __iomem *prcm_clksrc_ctrl; |
| 35 | |
| 36 | extern struct clk *dclk; |
| 37 | |
| 38 | extern const struct clkops clkops_omap2430_i2chs_wait; |
| 39 | extern const struct clkops clkops_oscck; |
| 40 | extern const struct clkops clkops_apll96; |
| 41 | extern const struct clkops clkops_apll54; |
| 42 | |
| 43 | #endif |