diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-09-07 02:19:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-09-07 02:19:51 -0400 |
commit | a1922ed661ab2c1637d0b10cde933bd9cd33d965 (patch) | |
tree | 0f1777542b385ebefd30b3586d830fd8ed6fda5b /arch/arm/mach-omap2/clock24xx.c | |
parent | 75e33751ca8bbb72dd6f1a74d2810ddc8cbe4bdf (diff) | |
parent | d28daf923ac5e4a0d7cecebae56f3e339189366b (diff) |
Merge branch 'tracing/core' into tracing/hw-breakpoints
Conflicts:
arch/Kconfig
kernel/trace/trace.h
Merge reason: resolve the conflicts, plus adopt to the new
ring-buffer APIs.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/arm/mach-omap2/clock24xx.c')
-rw-r--r-- | arch/arm/mach-omap2/clock24xx.c | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c index 44de0271fc2f..bc5d3ac66611 100644 --- a/arch/arm/mach-omap2/clock24xx.c +++ b/arch/arm/mach-omap2/clock24xx.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <mach/clock.h> | 31 | #include <mach/clock.h> |
32 | #include <mach/sram.h> | 32 | #include <mach/sram.h> |
33 | #include <mach/prcm.h> | ||
33 | #include <asm/div64.h> | 34 | #include <asm/div64.h> |
34 | #include <asm/clkdev.h> | 35 | #include <asm/clkdev.h> |
35 | 36 | ||
@@ -43,6 +44,18 @@ | |||
43 | static const struct clkops clkops_oscck; | 44 | static const struct clkops clkops_oscck; |
44 | static const struct clkops clkops_fixed; | 45 | static const struct clkops clkops_fixed; |
45 | 46 | ||
47 | static void omap2430_clk_i2chs_find_idlest(struct clk *clk, | ||
48 | void __iomem **idlest_reg, | ||
49 | u8 *idlest_bit); | ||
50 | |||
51 | /* 2430 I2CHS has non-standard IDLEST register */ | ||
52 | static const struct clkops clkops_omap2430_i2chs_wait = { | ||
53 | .enable = omap2_dflt_clk_enable, | ||
54 | .disable = omap2_dflt_clk_disable, | ||
55 | .find_idlest = omap2430_clk_i2chs_find_idlest, | ||
56 | .find_companion = omap2_clk_dflt_find_companion, | ||
57 | }; | ||
58 | |||
46 | #include "clock24xx.h" | 59 | #include "clock24xx.h" |
47 | 60 | ||
48 | struct omap_clk { | 61 | struct omap_clk { |
@@ -240,6 +253,26 @@ static void __iomem *prcm_clksrc_ctrl; | |||
240 | *-------------------------------------------------------------------------*/ | 253 | *-------------------------------------------------------------------------*/ |
241 | 254 | ||
242 | /** | 255 | /** |
256 | * omap2430_clk_i2chs_find_idlest - return CM_IDLEST info for 2430 I2CHS | ||
257 | * @clk: struct clk * being enabled | ||
258 | * @idlest_reg: void __iomem ** to store CM_IDLEST reg address into | ||
259 | * @idlest_bit: pointer to a u8 to store the CM_IDLEST bit shift into | ||
260 | * | ||
261 | * OMAP2430 I2CHS CM_IDLEST bits are in CM_IDLEST1_CORE, but the | ||
262 | * CM_*CLKEN bits are in CM_{I,F}CLKEN2_CORE. This custom function | ||
263 | * passes back the correct CM_IDLEST register address for I2CHS | ||
264 | * modules. No return value. | ||
265 | */ | ||
266 | static void omap2430_clk_i2chs_find_idlest(struct clk *clk, | ||
267 | void __iomem **idlest_reg, | ||
268 | u8 *idlest_bit) | ||
269 | { | ||
270 | *idlest_reg = OMAP_CM_REGADDR(CORE_MOD, CM_IDLEST); | ||
271 | *idlest_bit = clk->enable_bit; | ||
272 | } | ||
273 | |||
274 | |||
275 | /** | ||
243 | * omap2xxx_clk_get_core_rate - return the CORE_CLK rate | 276 | * omap2xxx_clk_get_core_rate - return the CORE_CLK rate |
244 | * @clk: pointer to the combined dpll_ck + core_ck (currently "dpll_ck") | 277 | * @clk: pointer to the combined dpll_ck + core_ck (currently "dpll_ck") |
245 | * | 278 | * |
@@ -325,8 +358,8 @@ static int omap2_clk_fixed_enable(struct clk *clk) | |||
325 | else if (clk == &apll54_ck) | 358 | else if (clk == &apll54_ck) |
326 | cval = OMAP24XX_ST_54M_APLL; | 359 | cval = OMAP24XX_ST_54M_APLL; |
327 | 360 | ||
328 | omap2_wait_clock_ready(OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), cval, | 361 | omap2_cm_wait_idlest(OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), cval, |
329 | clk->name); | 362 | clk->name); |
330 | 363 | ||
331 | /* | 364 | /* |
332 | * REVISIT: Should we return an error code if omap2_wait_clock_ready() | 365 | * REVISIT: Should we return an error code if omap2_wait_clock_ready() |