Skip to content

Commit f0d2f68

Browse files
Tero KristoPaul Walmsley
authored andcommitted
ARM: OMAP3: clock: use clk_features flags for omap3 DPLL4 checks
DPLL4 can't be reprogrammed on OMAP3430 ES1.0 due to hardware limitation. Currently, the code does runtime omap_rev() check to see the chip it is being executed on, instead, change this to use clk_features flags. This avoids need for runtime omap_rev() checks. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
1 parent f114040 commit f0d2f68

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

arch/arm/mach-omap2/clock.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,4 +771,8 @@ void __init ti_clk_init_features(void)
771771
ti_clk_features.cm_idlest_val = OMAP24XX_CM_IDLEST_VAL;
772772
else if (cpu_is_omap34xx())
773773
ti_clk_features.cm_idlest_val = OMAP34XX_CM_IDLEST_VAL;
774+
775+
/* On OMAP3430 ES1.0, DPLL4 can't be re-programmed */
776+
if (omap_rev() == OMAP3430_REV_ES1_0)
777+
ti_clk_features.flags |= TI_CLK_DPLL4_DENY_REPROGRAM;
774778
}

arch/arm/mach-omap2/clock.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ struct ti_clk_features {
234234
};
235235

236236
#define TI_CLK_DPLL_HAS_FREQSEL (1 << 0)
237+
#define TI_CLK_DPLL4_DENY_REPROGRAM (1 << 1)
237238

238239
extern struct ti_clk_features ti_clk_features;
239240

arch/arm/mach-omap2/clock3xxx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int omap3_dpll4_set_rate(struct clk_hw *hw, unsigned long rate,
4646
* on 3430ES1 prevents us from changing DPLL multipliers or dividers
4747
* on DPLL4.
4848
*/
49-
if (omap_rev() == OMAP3430_REV_ES1_0) {
49+
if (ti_clk_features.flags & TI_CLK_DPLL4_DENY_REPROGRAM) {
5050
pr_err("clock: DPLL4 cannot change rate due to silicon 'Limitation 2.5' on 3430ES1.\n");
5151
return -EINVAL;
5252
}

0 commit comments

Comments
 (0)