aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clock2xxx.h
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2009-12-08 18:21:29 -0500
committerpaul <paul@twilight.(none)>2009-12-11 18:16:00 -0500
commitd8a944582da1a4d29a1487ff7f435643505a12a0 (patch)
tree1e1d946c578c4d5108c86f24f932f55da936ee5d /arch/arm/mach-omap2/clock2xxx.h
parent82e9bd588563c4e22ebb55b684ebec7e310cc715 (diff)
OMAP2 clock: convert clock24xx.h to clock2xxx_data.c, opp2xxx*
The OMAP2 clock code currently #includes a large .h file full of static data structures. Instead, define the data in a .c file. Russell King <linux@arm.linux.org.uk> proposed this new arrangement: http://marc.info/?l=linux-omap&m=125967425908895&w=2 This patch also deals with most of the flagrant checkpatch violations. While here, separate the prcm_config data structures out into their own files, opp2xxx.h and opp24{2,3}0_data.c, and only build in the OPP tables for the target device. This should save some memory. In the long run, these prcm_config tables should be replaced with OPP code. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Richard Woodruff <r-woodruff2@ti.com> Cc: Nishanth Menon <nm@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/clock2xxx.h')
-rw-r--r--arch/arm/mach-omap2/clock2xxx.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clock2xxx.h b/arch/arm/mach-omap2/clock2xxx.h
new file mode 100644
index 000000000000..e35efde4bd80
--- /dev/null
+++ b/arch/arm/mach-omap2/clock2xxx.h
@@ -0,0 +1,41 @@
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
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);
14unsigned long omap2_sys_clk_recalc(struct clk *clk);
15unsigned long omap2_osc_clk_recalc(struct clk *clk);
16unsigned long omap2_sys_clk_recalc(struct clk *clk);
17unsigned long omap2_dpllcore_recalc(struct clk *clk);
18int omap2_reprogram_dpllcore(struct clk *clk, unsigned long rate);
19unsigned long omap2xxx_clk_get_core_rate(struct clk *clk);
20
21/* REVISIT: These should be set dynamically for CONFIG_MULTI_OMAP2 */
22#ifdef CONFIG_ARCH_OMAP2420
23#define OMAP_CM_REGADDR OMAP2420_CM_REGADDR
24#define OMAP24XX_PRCM_CLKOUT_CTRL OMAP2420_PRCM_CLKOUT_CTRL
25#define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2420_PRCM_CLKEMUL_CTRL
26#else
27#define OMAP_CM_REGADDR OMAP2430_CM_REGADDR
28#define OMAP24XX_PRCM_CLKOUT_CTRL OMAP2430_PRCM_CLKOUT_CTRL
29#define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2430_PRCM_CLKEMUL_CTRL
30#endif
31
32extern void __iomem *prcm_clksrc_ctrl;
33
34extern struct clk *dclk;
35
36extern const struct clkops clkops_omap2430_i2chs_wait;
37extern const struct clkops clkops_oscck;
38extern const struct clkops clkops_apll96;
39extern const struct clkops clkops_apll54;
40
41#endif