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

Commit 8af0bacd authored by Amit Nischal's avatar Amit Nischal
Browse files

clk: qcom: Move gcc_usb3_phy_pipe_clk to branch clock



A clk_disable on gate clocks would hold a global
spinlock and it would wait for a halt_delay. In some
race conditions(due to longer delays for gate clocks)
if any other CPU would also invoke a clk_disable then
it could result in a spinlock lockup. Avoid this by
moving the gcc_usb3_phy_pipe_clk clk to branch clock.

CRs-Fixed: 2008439
Change-Id: I177349844c571964637e16a150f93c5912f7dafe
Signed-off-by: default avatarAmit Nischal <anischal@codeaurora.org>
parent 5a092dc8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2493,14 +2493,15 @@ static struct clk_branch gcc_usb3_phy_aux_clk = {
	},
};

static struct clk_gate2 gcc_usb3_phy_pipe_clk = {
	.udelay = 50,
static struct clk_branch gcc_usb3_phy_pipe_clk = {
	.halt_reg = 0x50004,
	.halt_check = BRANCH_HALT_DELAY,
	.clkr = {
		.enable_reg = 0x50004,
		.enable_mask = BIT(0),
		.hw.init = &(struct clk_init_data){
			.name = "gcc_usb3_phy_pipe_clk",
			.ops = &clk_gate2_ops,
			.ops = &clk_branch2_ops,
		},
	},
};