Skip to content
Permalink
Browse files

PCI: Vulcan: AHCI PCI bar fix for Broadcom Vulcan early silicon

PCI BAR 5 is not setup correctly for the on-board AHCI
controller on Broadcom's Vulcan processor. Added a quirk to fix BAR 5
by using BAR 4's resources which are populated correctly but NOT used
by the AHCI controller actually.

Signed-off-by: Ashok Kumar Sekar <asekar@redhat.com>
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
  • Loading branch information...
Ashok Kumar Sekar Robert Richter
Ashok Kumar Sekar authored and Robert Richter committed Sep 23, 2016
1 parent ca9406b commit 940d574d4ef0769a43f56cd1ee4a98f0546fe0b3
Showing with 24 additions and 0 deletions.
  1. +24 −0 drivers/pci/quirks.c
@@ -4013,6 +4013,30 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9000,
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9084,
quirk_bridge_cavm_thrx2_pcie_root);

/*
* PCI BAR 5 is not setup correctly for the on-board AHCI controller
* on Broadcom's Vulcan processor. Added a quirk to fix BAR 5 by
* using BAR 4's resources which are populated correctly and NOT
* actually used by the AHCI controller.
*/
static void quirk_fix_vulcan_ahci_bars(struct pci_dev *dev)
{
struct resource *r = &dev->resource[4];

if (!(r->flags & IORESOURCE_MEM) || (r->start == 0))
return;

/* Set BAR5 resource to BAR4 */
dev->resource[5] = *r;

/* Update BAR5 in pci config space */
pci_write_config_dword(dev, PCI_BASE_ADDRESS_5, r->start);

/* Clear BAR4's resource */
memset(r, 0, sizeof(*r));
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_BROADCOM, 0x9027, quirk_fix_vulcan_ahci_bars);

/*
* Intersil/Techwell TW686[4589]-based video capture cards have an empty (zero)
* class code. Fix it.

0 comments on commit 940d574

Please sign in to comment.
You can’t perform that action at this time.