summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorXiaowei Bao <xiaowei.bao@nxp.com>2020-07-09 18:31:37 +0300
committerPriyanka Jain <priyanka.jain@nxp.com>2020-07-27 11:54:15 +0300
commit15ce1fadf7f00a93021b8d013147b4bcd23099f2 (patch)
tree53b66d384b14285ddf588fbb0cdc20a1474bf82b /drivers/pci
parentc5174a52c2ff719b945cea0f0119ad57c541f1a9 (diff)
downloadu-boot-15ce1fadf7f00a93021b8d013147b4bcd23099f2.tar.xz
pci_ep: layerscape: Add the workaround for errata A-009460
The VF_BARn_REG register's Prefetchable and Type bit fields are overwritten by a write to VF's BAR Mask register. workaround: Before writing to the VF_BARn_MASK_REG register, write 0b to the PCIE_MISC_CONTROL_1_OFF register. Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pcie_layerscape_ep.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/pci/pcie_layerscape_ep.c b/drivers/pci/pcie_layerscape_ep.c
index e609607c3a..3f22c5ef7a 100644
--- a/drivers/pci/pcie_layerscape_ep.c
+++ b/drivers/pci/pcie_layerscape_ep.c
@@ -164,6 +164,15 @@ static void ls_pcie_setup_ep(struct ls_pcie_ep *pcie_ep)
if (PCI_EXT_CAP_ID(sriov) == PCI_EXT_CAP_ID_SRIOV) {
pcie_ep->sriov_flag = 1;
for (pf = 0; pf < PCIE_PF_NUM; pf++) {
+ /*
+ * The VF_BARn_REG register's Prefetchable and Type bit
+ * fields are overwritten by a write to VF's BAR Mask
+ * register. Before writing to the VF_BARn_MASK_REG
+ * register, write 0b to the PCIE_MISC_CONTROL_1_OFF
+ * register.
+ */
+ writel(0, pcie->dbi + PCIE_MISC_CONTROL_1_OFF);
+
if (pcie_ep->cfg2_flag) {
for (vf = 0; vf <= PCIE_VF_NUM; vf++) {
ctrl_writel(pcie,