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

Commit 202f52b8 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mhi: controller: Enable L1 when mhi is not active"

parents b346715a 4493222e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -76,12 +76,15 @@ void mhi_reg_write_work(struct work_struct *w)
	if (!info->valid)
		return;

	if (mhi_is_active(mhi_cntrl->mhi_dev) && msm_pcie_prevent_l1(pci_dev))
	if (!mhi_is_active(mhi_cntrl->mhi_dev))
		return;

	if (msm_pcie_prevent_l1(pci_dev))
		return;

	while (info->valid) {
		if (!mhi_is_active(mhi_cntrl->mhi_dev))
			return;
			break;

		writel_relaxed(info->val, info->reg_addr);
		info->valid = false;