PCI: aardvark: Implement workaround for the readback value of VEND_ID
authorPali Rohár <pali@kernel.org>
Thu, 24 Jun 2021 22:26:20 +0000 (00:26 +0200)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Fri, 25 Jun 2021 12:49:28 +0000 (13:49 +0100)
commit7f71a409fe3d9358da07c77f15bb5b7960f12253
treec40cf16275232bab8aff69ce1e20a09db1fe0239
parent8ceeac307a79f68c0d0c72d6e48b82fa424204ec
PCI: aardvark: Implement workaround for the readback value of VEND_ID

Marvell Armada 3700 Functional Errata, Guidelines, and Restrictions
document describes in erratum 4.1 PCIe value of vendor ID (Ref #: 243):

    The readback value of VEND_ID (RD0070000h [15:0]) is 1B4Bh, while it
    should read 11ABh.

    The firmware can write the correct value, 11ABh, through VEND_ID
    (RD0076044h [15:0]).

Implement this workaround in aardvark driver for both PCI vendor id and PCI
subsystem vendor id.

This change affects and fixes PCI vendor id of emulated PCIe root bridge.
After this change emulated PCIe root bridge has correct vendor id.

Link: https://lore.kernel.org/r/20210624222621.4776-5-pali@kernel.org
Fixes: 8a3ebd8de328 ("PCI: aardvark: Implement emulated root PCI bridge config space")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Marek Behún <kabel@kernel.org>
Cc: stable@vger.kernel.org
drivers/pci/controller/pci-aardvark.c