diff options
author | Ranjith Lohithakshan <ranjithl@ti.com> | 2010-02-24 14:05:54 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-02-24 14:05:54 -0500 |
commit | 419cc97d3678f0fca5e60b3853dd9c1371f67805 (patch) | |
tree | a3997e3f9ad52abf927597f8e241fb6dfb02ab00 /arch/arm/mach-omap2/clock2xxx.c | |
parent | cde08f81b1d7952ae00c4be2165da629ef985522 (diff) |
OMAP2/3 clock: Extend find_idlest() to pass back idle state value
Current implementation defines clock idle state indicators based on the
cpu information (cpu_is_omap24xx() or cpu_is_omap34xx()) in a system wide
manner. This patch extends the find_idlest() function in clkops to pass
back the idle state indicator for that clock, thus allowing idle state
indicators to be defined on a per clock basis if required.
This is specifically needed on AM35xx devices as the new IPSS clocks
indicates the idle status (0 is idle, 1 is ready) in a way just
opposite to how its handled in OMAP3 (0 is ready, 1 is idle).
Signed-off-by: Ranjith Lohithakshan <ranjithl@ti.com>
[paul@pwsan.com: updated to apply after commit 98c45457 et seq.]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/clock2xxx.c')
-rw-r--r-- | arch/arm/mach-omap2/clock2xxx.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c index a48b01ab0e35..94fb8a67b503 100644 --- a/arch/arm/mach-omap2/clock2xxx.c +++ b/arch/arm/mach-omap2/clock2xxx.c | |||
@@ -42,6 +42,7 @@ struct clk *vclk, *sclk, *dclk; | |||
42 | * @clk: struct clk * being enabled | 42 | * @clk: struct clk * being enabled |
43 | * @idlest_reg: void __iomem ** to store CM_IDLEST reg address into | 43 | * @idlest_reg: void __iomem ** to store CM_IDLEST reg address into |
44 | * @idlest_bit: pointer to a u8 to store the CM_IDLEST bit shift into | 44 | * @idlest_bit: pointer to a u8 to store the CM_IDLEST bit shift into |
45 | * @idlest_val: pointer to a u8 to store the CM_IDLEST indicator | ||
45 | * | 46 | * |
46 | * OMAP2430 I2CHS CM_IDLEST bits are in CM_IDLEST1_CORE, but the | 47 | * OMAP2430 I2CHS CM_IDLEST bits are in CM_IDLEST1_CORE, but the |
47 | * CM_*CLKEN bits are in CM_{I,F}CLKEN2_CORE. This custom function | 48 | * CM_*CLKEN bits are in CM_{I,F}CLKEN2_CORE. This custom function |
@@ -50,10 +51,12 @@ struct clk *vclk, *sclk, *dclk; | |||
50 | */ | 51 | */ |
51 | static void omap2430_clk_i2chs_find_idlest(struct clk *clk, | 52 | static void omap2430_clk_i2chs_find_idlest(struct clk *clk, |
52 | void __iomem **idlest_reg, | 53 | void __iomem **idlest_reg, |
53 | u8 *idlest_bit) | 54 | u8 *idlest_bit, |
55 | u8 *idlest_val) | ||
54 | { | 56 | { |
55 | *idlest_reg = OMAP_CM_REGADDR(CORE_MOD, CM_IDLEST); | 57 | *idlest_reg = OMAP_CM_REGADDR(CORE_MOD, CM_IDLEST); |
56 | *idlest_bit = clk->enable_bit; | 58 | *idlest_bit = clk->enable_bit; |
59 | *idlest_val = OMAP24XX_CM_IDLEST_VAL; | ||
57 | } | 60 | } |
58 | 61 | ||
59 | #else | 62 | #else |