blob: 6a658b890c172335c74596cd895874d8c2784bb5 [file] [log] [blame]
Paul Walmsleyd8a94452009-12-08 16:21:29 -07001/*
2 * OMAP2 clock function prototypes and macros
3 *
Paul Walmsley81b34fb2010-02-22 22:09:22 -07004 * Copyright (C) 2005-2010 Texas Instruments, Inc.
5 * Copyright (C) 2004-2010 Nokia Corporation
Paul Walmsleyd8a94452009-12-08 16:21:29 -07006 */
7
Paul Walmsley81b34fb2010-02-22 22:09:22 -07008#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK2XXX_H
9#define __ARCH_ARM_MACH_OMAP2_CLOCK2XXX_H
Paul Walmsleyd8a94452009-12-08 16:21:29 -070010
11unsigned long omap2_table_mpu_recalc(struct clk *clk);
12int omap2_select_table_rate(struct clk *clk, unsigned long rate);
13long omap2_round_to_table_rate(struct clk *clk, unsigned long rate);
Paul Walmsley44da0a52010-01-26 20:13:08 -070014unsigned long omap2xxx_sys_clk_recalc(struct clk *clk);
Paul Walmsleyd8a94452009-12-08 16:21:29 -070015unsigned long omap2_osc_clk_recalc(struct clk *clk);
Paul Walmsleyd8a94452009-12-08 16:21:29 -070016unsigned long omap2_dpllcore_recalc(struct clk *clk);
17int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate);
18unsigned long omap2xxx_clk_get_core_rate(struct clk *clk);
Paul Walmsley49214642010-01-26 20:13:06 -070019u32 omap2xxx_get_apll_clkin(void);
Paul Walmsley87a1b262010-01-26 20:13:07 -070020u32 omap2xxx_get_sysclkdiv(void);
Paul Walmsleyfeec1272010-01-26 20:13:11 -070021void omap2xxx_clk_prepare_for_reboot(void);
Paul Walmsleyd8a94452009-12-08 16:21:29 -070022
Paul Walmsleyd8a94452009-12-08 16:21:29 -070023#ifdef CONFIG_ARCH_OMAP2420
Paul Walmsley81b34fb2010-02-22 22:09:22 -070024int omap2420_clk_init(void);
Paul Walmsleyd8a94452009-12-08 16:21:29 -070025#else
Paul Walmsley81b34fb2010-02-22 22:09:22 -070026#define omap2420_clk_init() 0
Paul Walmsleyd8a94452009-12-08 16:21:29 -070027#endif
28
Paul Walmsley81b34fb2010-02-22 22:09:22 -070029#ifdef CONFIG_ARCH_OMAP2430
30int omap2430_clk_init(void);
31#else
32#define omap2430_clk_init() 0
33#endif
34
35extern void __iomem *prcm_clksrc_ctrl, *cm_idlest_pll;
Paul Walmsleyd8a94452009-12-08 16:21:29 -070036
37extern struct clk *dclk;
38
39extern const struct clkops clkops_omap2430_i2chs_wait;
40extern const struct clkops clkops_oscck;
41extern const struct clkops clkops_apll96;
42extern const struct clkops clkops_apll54;
43
44#endif