Commit 0122af0a authored by Hou Zhiqiang's avatar Hou Zhiqiang Committed by Lorenzo Pieralisi

PCI: mobiveil: Fix the Class Code field

Fix up the Class Code field in PCI configuration space and set it to
PCI_CLASS_BRIDGE_PCI.

Move the Class Code fixup to function mobiveil_host_init() where
it belongs.

Fixes: 9af6bcb1 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver")
Signed-off-by: default avatarHou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: default avatarMinghuan Lian <Minghuan.Lian@nxp.com>
Reviewed-by: default avatarSubrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
parent f7fee1b4
...@@ -626,6 +626,12 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie) ...@@ -626,6 +626,12 @@ static int mobiveil_host_init(struct mobiveil_pcie *pcie)
} }
} }
/* fixup for PCIe class register */
value = csr_readl(pcie, PAB_INTP_AXI_PIO_CLASS);
value &= 0xff;
value |= (PCI_CLASS_BRIDGE_PCI << 16);
csr_writel(pcie, value, PAB_INTP_AXI_PIO_CLASS);
/* setup MSI hardware registers */ /* setup MSI hardware registers */
mobiveil_pcie_enable_msi(pcie); mobiveil_pcie_enable_msi(pcie);
...@@ -866,9 +872,6 @@ static int mobiveil_pcie_probe(struct platform_device *pdev) ...@@ -866,9 +872,6 @@ static int mobiveil_pcie_probe(struct platform_device *pdev)
goto error; goto error;
} }
/* fixup for PCIe class register */
csr_writel(pcie, 0x060402ab, PAB_INTP_AXI_PIO_CLASS);
/* initialize the IRQ domains */ /* initialize the IRQ domains */
ret = mobiveil_pcie_init_irq_domain(pcie); ret = mobiveil_pcie_init_irq_domain(pcie);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment