aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clock2xxx.h
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-02-23 00:09:22 -0500
committerPaul Walmsley <paul@pwsan.com>2010-02-24 14:29:42 -0500
commit81b34fbecbfbf24ed95c2d80d5cb14149652408f (patch)
treeb29a0d117a7dda644e6d37931a7999095aeeaf69 /arch/arm/mach-omap2/clock2xxx.h
parent657ebfadc19c5a14f709dee1645082828330d5d4 (diff)
OMAP2 clock: split OMAP2420, OMAP2430 clock data into their own files
In preparation for multi-OMAP2 kernels, split mach-omap2/clock2xxx_data.c into mach-omap2/clock2420_data.c and mach-omap2/clock2430_data.c. 2430 uses a different device space physical memory layout than past or future OMAPs, and we use a different virtual memory layout as well, which causes trouble for architecture-level code/data that tries to support both. We tried using offsets from the virtual base last year, but those patches never made it upstream; so after some discussion with Tony about the best all-around approach, we'll just grit our teeth and duplicate the structures. The maintenance advantages of a single kernel config that can compile and boot on OMAP2, 3, and 4 platforms are simply too compelling. This approach does have some nice benefits beyond multi-OMAP 2 kernel support. The runtime size of OMAP2420-specific and OMAP2430-specific kernels is smaller, since unused clocks for the other OMAP2 chip will no longer be compiled in. (At some point we will mark the clock data __initdata and allocate it during registration, which will eliminate the runtime memory advantage.) It also makes the clock trees slightly easier to read, since 2420-specific and 2430-specific clocks are no longer mixed together. This patch also splits 2430-specific clock code into its own file, mach-omap2/clock2430.c, which is only compiled in for 2430 builds - mostly for organizational clarity. While here, fix a bug in the OMAP2430 clock tree: "emul_ck" was incorrectly marked as being 2420-only, when actually it is present on both OMAP2420 and OMAP2430. Thanks to Tony for some good discussions about how to approach this problem. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Tony Lindgren <tony@atomide.com> Cc: Richard Woodruff <r-woodruff2@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/clock2xxx.h')
-rw-r--r--arch/arm/mach-omap2/clock2xxx.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/clock2xxx.h b/arch/arm/mach-omap2/clock2xxx.h
index 32f3d0aa8fc..6a658b890c1 100644
--- a/arch/arm/mach-omap2/clock2xxx.h
+++ b/arch/arm/mach-omap2/clock2xxx.h
@@ -1,12 +1,12 @@
1/* 1/*
2 * OMAP2 clock function prototypes and macros 2 * OMAP2 clock function prototypes and macros
3 * 3 *
4 * Copyright (C) 2005-2009 Texas Instruments, Inc. 4 * Copyright (C) 2005-2010 Texas Instruments, Inc.
5 * Copyright (C) 2004-2009 Nokia Corporation 5 * Copyright (C) 2004-2010 Nokia Corporation
6 */ 6 */
7 7
8#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_24XX_H 8#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK2XXX_H
9#define __ARCH_ARM_MACH_OMAP2_CLOCK_24XX_H 9#define __ARCH_ARM_MACH_OMAP2_CLOCK2XXX_H
10 10
11unsigned long omap2_table_mpu_recalc(struct clk *clk); 11unsigned long omap2_table_mpu_recalc(struct clk *clk);
12int omap2_select_table_rate(struct clk *clk, unsigned long rate); 12int omap2_select_table_rate(struct clk *clk, unsigned long rate);
@@ -19,20 +19,20 @@ unsigned long omap2xxx_clk_get_core_rate(struct clk *clk);
19u32 omap2xxx_get_apll_clkin(void); 19u32 omap2xxx_get_apll_clkin(void);
20u32 omap2xxx_get_sysclkdiv(void); 20u32 omap2xxx_get_sysclkdiv(void);
21void omap2xxx_clk_prepare_for_reboot(void); 21void omap2xxx_clk_prepare_for_reboot(void);
22int omap2xxx_clk_init(void);
23 22
24/* REVISIT: These should be set dynamically for CONFIG_MULTI_OMAP2 */
25#ifdef CONFIG_ARCH_OMAP2420 23#ifdef CONFIG_ARCH_OMAP2420
26#define OMAP_CM_REGADDR OMAP2420_CM_REGADDR 24int omap2420_clk_init(void);
27#define OMAP24XX_PRCM_CLKOUT_CTRL OMAP2420_PRCM_CLKOUT_CTRL
28#define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2420_PRCM_CLKEMUL_CTRL
29#else 25#else
30#define OMAP_CM_REGADDR OMAP2430_CM_REGADDR 26#define omap2420_clk_init() 0
31#define OMAP24XX_PRCM_CLKOUT_CTRL OMAP2430_PRCM_CLKOUT_CTRL
32#define OMAP24XX_PRCM_CLKEMUL_CTRL OMAP2430_PRCM_CLKEMUL_CTRL
33#endif 27#endif
34 28
35extern void __iomem *prcm_clksrc_ctrl; 29#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;
36 36
37extern struct clk *dclk; 37extern struct clk *dclk;
38 38