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

Commit 10c7af92 authored by Tony Truong's avatar Tony Truong
Browse files

msm: pcie: add PCIe enumeration to debugfs



PCIe enumeration may fail during bootup. Add PCIe enumeration to
debugfs so user can call enumerate after bootup.

Change-Id: Iaf7bc5e4dbbaff3351504ab55a0d7115c20ad050
Signed-off-by: default avatarTony Truong <truong@codeaurora.org>
parent 8eea61ca
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -1311,6 +1311,21 @@ static ssize_t msm_pcie_cmd_debug(struct file *file,
				readl_relaxed(dev->conf +
				PCIE20_DEVICE_CONTROL2_STATUS2));
			break;
		case 11: /* enumerate PCIe  */
			pr_alert("\n\nPCIe: attempting to enumerate RC%d\n\n",
				i);
			if (dev->enumerated)
				pr_alert("PCIe: RC%d is already enumerated\n",
					i);
			else {
				if (!msm_pcie_enumerate(i))
					pr_alert("PCIe: RC%d is successfully enumerated\n",
						i);
				else
					pr_alert("PCIe: RC%d enumeration failed\n",
						i);
			}
			break;
		default:
			pr_alert("Invalid testcase: %d.\n", testcase);
			break;