diff options
author | Paul Walmsley <paul@pwsan.com> | 2010-02-23 00:09:22 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-02-24 14:29:42 -0500 |
commit | 81b34fbecbfbf24ed95c2d80d5cb14149652408f (patch) | |
tree | b29a0d117a7dda644e6d37931a7999095aeeaf69 /arch/arm/mach-omap2/clkt2xxx_apll.c | |
parent | 657ebfadc19c5a14f709dee1645082828330d5d4 (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/clkt2xxx_apll.c')
-rw-r--r-- | arch/arm/mach-omap2/clkt2xxx_apll.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/clkt2xxx_apll.c b/arch/arm/mach-omap2/clkt2xxx_apll.c index d5b8b2bb0e9d..43d7246ce335 100644 --- a/arch/arm/mach-omap2/clkt2xxx_apll.c +++ b/arch/arm/mach-omap2/clkt2xxx_apll.c | |||
@@ -38,6 +38,8 @@ | |||
38 | #define APLLS_CLKIN_13MHZ 2 | 38 | #define APLLS_CLKIN_13MHZ 2 |
39 | #define APLLS_CLKIN_12MHZ 3 | 39 | #define APLLS_CLKIN_12MHZ 3 |
40 | 40 | ||
41 | void __iomem *cm_idlest_pll; | ||
42 | |||
41 | /* Private functions */ | 43 | /* Private functions */ |
42 | 44 | ||
43 | /* Enable an APLL if off */ | 45 | /* Enable an APLL if off */ |
@@ -56,7 +58,7 @@ static int omap2_clk_apll_enable(struct clk *clk, u32 status_mask) | |||
56 | cval |= apll_mask; | 58 | cval |= apll_mask; |
57 | cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN); | 59 | cm_write_mod_reg(cval, PLL_MOD, CM_CLKEN); |
58 | 60 | ||
59 | omap2_cm_wait_idlest(OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), status_mask, | 61 | omap2_cm_wait_idlest(cm_idlest_pll, status_mask, |
60 | OMAP24XX_CM_IDLEST_VAL, clk->name); | 62 | OMAP24XX_CM_IDLEST_VAL, clk->name); |
61 | 63 | ||
62 | /* | 64 | /* |