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

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

Merge "msm: pcie: only look for EP CAP reg for certain testcases"

parents 073206d7 2a69bc60
Loading
Loading
Loading
Loading
+22 −17
Original line number Diff line number Diff line
@@ -1318,13 +1318,17 @@ static void msm_pcie_sel_debug_testcase(struct msm_pcie_dev_t *dev,
	u32 ep_link_ctrlstts_offset = 0;
	u32 ep_dev_ctrl2stts2_offset = 0;

	current_offset = readl_relaxed(dev->conf + PCIE_CAP_PTR_OFFSET) & 0xff;
	if (testcase >= 5 && testcase <= 10) {
		current_offset =
			readl_relaxed(dev->conf + PCIE_CAP_PTR_OFFSET) & 0xff;

		while (current_offset) {
			val = readl_relaxed(dev->conf + current_offset);
			if ((val & 0xff) == PCIE20_CAP_ID) {
			ep_link_ctrlstts_offset = current_offset + 0x10;
			ep_dev_ctrl2stts2_offset = current_offset + 0x28;
				ep_link_ctrlstts_offset = current_offset +
								0x10;
				ep_dev_ctrl2stts2_offset = current_offset +
								0x28;
				break;
			}
			current_offset = (val >> 8) & 0xff;
@@ -1338,6 +1342,7 @@ static void msm_pcie_sel_debug_testcase(struct msm_pcie_dev_t *dev,
			PCIE_DBG(dev,
				"RC%d: ep_link_ctrlstts_offset: 0x%x\n",
				dev->rc_idx, ep_link_ctrlstts_offset);
	}

	switch (testcase) {
	case 0: /* output status */