Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 236d32a6 authored by Vikram Mulukutla's avatar Vikram Mulukutla Committed by Gerrit - the friendly Code Review server
Browse files

clk: msm: clock-alpha-pll: Allow interrupts to be enabled during set_rate



Some PLL implementations depend on the CPU being able to handle
certain interrupts in order for the set_rate operation to
complete. Allow interrupts to be handled in the set_rate op.

CRs-Fixed: 960701
Change-Id: I6fda5ed9eb7d6f2e2cd91c58ebabfd7bc1c8a2fc
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent 9f277664
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -611,13 +611,17 @@ static int alpha_pll_set_rate(struct clk *c, unsigned long rate)
		return -EINVAL;
	}

	if (pll->no_irq_dis)
		spin_lock(&c->lock);
	else
		spin_lock_irqsave(&c->lock, flags);

	/*
	 * For PLLs that do not support dynamic programming (dynamic_update
	 * is not set), ensure PLL is off before changing rate. For
	 * optimization reasons, assume no downstream clock is actively
	 * using it.
	 */
	spin_lock_irqsave(&c->lock, flags);
	if (c->count && !pll->dynamic_update)
		c->ops->disable(c);

@@ -643,6 +647,9 @@ static int alpha_pll_set_rate(struct clk *c, unsigned long rate)
	if (c->count && !pll->dynamic_update)
		c->ops->enable(c);

	if (pll->no_irq_dis)
		spin_unlock(&c->lock);
	else
		spin_unlock_irqrestore(&c->lock, flags);
	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ struct alpha_pll_clk {
	 * that the workaround is required.
	 */
	bool offline_bit_workaround;
	bool no_irq_dis;
	bool is_fabia;
	unsigned long min_supported_freq;
	struct clk c;