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

Commit d099051c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "scsi: ufshcd: suspend clock scaling before clocks are gated"

parents 45e7964f 56ec2368
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -5420,6 +5420,15 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
	ufshcd_vreg_set_lpm(hba);

disable_clks:
	/*
	 * The clock scaling needs access to controller registers. Hence, Wait
	 * for pending clock scaling work to be done before clocks are
	 * turned off.
	 */
	if (ufshcd_is_clkscaling_enabled(hba)) {
		devfreq_suspend_device(hba->devfreq);
		hba->clk_scaling.window_start_t = 0;
	}
	/*
	 * Call vendor specific suspend callback. As these callbacks may access
	 * vendor specific host controller register space call them before the
@@ -5452,10 +5461,6 @@ disable_clks:
	 */
	ufshcd_disable_irq(hba);

	if (ufshcd_is_clkscaling_enabled(hba)) {
		devfreq_suspend_device(hba->devfreq);
		hba->clk_scaling.window_start_t = 0;
	}
	goto out;

vops_resume: