Skip to content

Commit

Permalink
OMAP1 clock: fix for "BUG: spinlock lockup on CPU#0"
Browse files Browse the repository at this point in the history
Commit 5265050 caused clock initialization
to fail on OMAP1 with "BUG: spinlock lockup on CPU#0" -- this is because
omap1_select_table_rate() and omap1_round_to_table_rate() call clk_get_rate()
with the clockfw spinlock held.  Fix by accessing the rate directly from
the internal clock framework functions.

Thanks to Tony Lindgren <tony@atomide.com> for reporting and testing the fix.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Paul Walmsley committed Jan 20, 2010
1 parent ecbb065 commit af022fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/arm/mach-omap1/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate)
struct mpu_rate * ptr;
unsigned long dpll1_rate, ref_rate;

dpll1_rate = clk_get_rate(ck_dpll1_p);
ref_rate = clk_get_rate(ck_ref_p);
dpll1_rate = ck_dpll1_p->rate;
ref_rate = ck_ref_p->rate;

for (ptr = omap1_rate_table; ptr->rate; ptr++) {
if (ptr->xtal != ref_rate)
Expand Down Expand Up @@ -306,7 +306,7 @@ long omap1_round_to_table_rate(struct clk *clk, unsigned long rate)
long highest_rate;
unsigned long ref_rate;

ref_rate = clk_get_rate(ck_ref_p);
ref_rate = ck_ref_p->rate;

highest_rate = -EINVAL;

Expand Down

0 comments on commit af022fa

Please sign in to comment.