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

Commit 7390bdc7 authored by Tony Truong's avatar Tony Truong Committed by Gerrit - the friendly Code Review server
Browse files

msm: pcie: always enable BDF to SID for PCIe RC mode



In root complex mode, PCIe needs to enable BDF to SID
translation so that device generates the correct SID.
Therefore, always enable BDF to SID translation when setting
up other BDF to SID configuration.

Change-Id: Ied960384e14cb4069bba46bb7b750d8d34949cec
Signed-off-by: default avatarTony Truong <truong@codeaurora.org>
parent 43ee8667
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@
#define PCIE20_PARF_INT_ALL_MASK (0x22c)
#define PCIE20_PARF_DEVICE_TYPE (0x1000)
#define PCIE20_PARF_BDF_TO_SID_TABLE_N (0x2000)
#define PCIE20_PARF_BDF_TO_SID_CFG (0x2C00)
#define PCIE20_PARF_L1SUB_AHB_CLK_MAX_TIMER (0x180)
#define PCIE20_PARF_DEBUG_INT_EN (0x190)

@@ -4482,6 +4483,9 @@ static void msm_pcie_config_sid(struct msm_pcie_dev_t *dev)
	if (!dev->sid_info)
		return;

	/* clear BDF_TO_SID_BYPASS bit to enable BDF to SID translation */
	msm_pcie_write_mask(dev->parf + PCIE20_PARF_BDF_TO_SID_CFG, BIT(0), 0);

	/* Registers need to be zero out first */
	memset_io(bdf_to_sid_base, 0, CRC8_TABLE_SIZE * sizeof(u32));