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

Commit 84f0796d authored by Kiran Gunda's avatar Kiran Gunda Committed by Sagar Dharia
Browse files

msm_serial_hs: Manage clock path-vote correctly



clock path vote is needed for core and iface vote,
so remove it after these votes are removed, and
make sure clock path vote/unvote are balanced by
removing unnecessary clock path vote

CRs-Fixed: 606403
Change-Id: I2ca2ef1cac3f0aacb7d21eb4da8bed3d39e0158c
Signed-off-by: default avatarKiran Gunda <kgunda@codeaurora.org>
parent a18f488c
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
 * MSM 7k High speed uart driver
 *
 * Copyright (c) 2008 Google Inc.
 * Copyright (c) 2007-2013, The Linux Foundation. All rights reserved.
 * Copyright (c) 2007-2014, The Linux Foundation. All rights reserved.
 * Modified: Nick Pelly <npelly@google.com>
 *
 * All source code in this file is licensed under the following license
@@ -447,11 +447,12 @@ static void msm_hs_clock_unvote(struct msm_hs_port *msm_uport)

	rc = atomic_dec_return(&msm_uport->clk_count);
	if (0 == rc) {
		msm_hs_bus_voting(msm_uport, BUS_RESET);
		/* Turn off the core clk and iface clk*/
		clk_disable_unprepare(msm_uport->clk);
		if (msm_uport->pclk)
			clk_disable_unprepare(msm_uport->pclk);
		/* Unvote the PNOC clock */
		msm_hs_bus_voting(msm_uport, BUS_RESET);
		msm_uport->clk_state = MSM_HS_CLK_OFF;
	}
}
@@ -2087,8 +2088,6 @@ static int msm_hs_check_clock_off(struct uart_port *uport)

	spin_unlock_irqrestore(&uport->lock, flags);

	/* Reset PNOC Bus Scaling */
	msm_hs_bus_voting(msm_uport, BUS_RESET);
	mutex_unlock(&msm_uport->clk_mutex);

	return 1;