1. 24 Apr, 2017 1 commit
  2. 21 Apr, 2017 1 commit
  3. 12 Jan, 2017 1 commit
  4. 06 Dec, 2016 7 commits
    • Duc Dang's avatar
      PCI: Add MCFG quirks for X-Gene host controller · c5d46039
      Duc Dang authored
      PCIe controllers in X-Gene SoCs are not ECAM compliant: software needs to
      configure additional controller's register to address device at
      bus:dev:function.
      
      Add a quirk to discover controller MMIO register space and configure
      controller registers to select and address the target secondary device.
      
      The quirk will only be applied for X-Gene PCIe MCFG table with
      OEM revison 1, 2, 3 or 4 (PCIe controller v1 and v2 on X-Gene SoCs).
      Tested-by: default avatarJon Masters <jcm@redhat.com>
      Signed-off-by: default avatarDuc Dang <dhdang@apm.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      c5d46039
    • Tomasz Nowicki's avatar
      PCI: Add MCFG quirks for Cavium ThunderX pass1.x host controller · 648d93fc
      Tomasz Nowicki authored
      ThunderX pass1.x requires to emulate the EA headers for on-chip devices
      hence it has to use custom pci_thunder_ecam_ops for accessing PCI config
      space (pci-thunder-ecam.c). Add new entries to MCFG quirk array where it
      can be applied while probing ACPI based PCI host controller.
      
      ThunderX pass1.x is using the same way for accessing off-chip devices
      (so-called PEM) as silicon pass-2.x so we need to add PEM quirk entries
      too.
      
      Quirk is considered for ThunderX silicon pass1.x only which is identified
      via MCFG revision 2.
      
      ThunderX pass 1.x requires the following accessors:
      
        NUMA node 0 PCI segments  0- 3: pci_thunder_ecam_ops (MCFG quirk)
        NUMA node 0 PCI segments  4- 9: thunder_pem_ecam_ops (MCFG quirk)
        NUMA node 1 PCI segments 10-13: pci_thunder_ecam_ops (MCFG quirk)
        NUMA node 1 PCI segments 14-19: thunder_pem_ecam_ops (MCFG quirk)
      
      [bhelgaas: change Makefile/ifdefs so quirk doesn't depend on
      CONFIG_PCI_HOST_THUNDER_ECAM]
      Signed-off-by: default avatarTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      648d93fc
    • Tomasz Nowicki's avatar
      PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller · 44f22bd9
      Tomasz Nowicki authored
      ThunderX PCIe controller to off-chip devices (so-called PEM) is not fully
      compliant with ECAM standard. It uses non-standard configuration space
      accessors (see thunder_pem_ecam_ops) and custom configuration space
      granulation (see bus_shift = 24). In order to access configuration space
      and probe PEM as ACPI-based PCI host controller we need to add MCFG quirk
      infrastructure. This involves:
      1. A new thunder_pem_acpi_init() init function to locate PEM-specific
         register ranges using ACPI.
      2. Export PEM thunder_pem_ecam_ops structure so it is visible to MCFG quirk
         code.
      3. New quirk entries for each PEM segment. Each contains platform IDs,
         mentioned thunder_pem_ecam_ops and CFG resources.
      
      Quirk is considered for ThunderX silicon pass2.x only which is identified
      via MCFG revision 1.
      
      ThunderX pass 2.x requires the following accessors:
      
        NUMA Node 0 PCI segments  0- 3: pci_generic_ecam_ops (ECAM-compliant)
        NUMA Node 0 PCI segments  4- 9: thunder_pem_ecam_ops (MCFG quirk)
        NUMA Node 1 PCI segments 10-13: pci_generic_ecam_ops (ECAM-compliant)
        NUMA Node 1 PCI segments 14-19: thunder_pem_ecam_ops (MCFG quirk)
      
      [bhelgaas: adapt to use acpi_get_rc_resources(), update Makefile/ifdefs so
      quirk doesn't depend on CONFIG_PCI_HOST_THUNDER_PEM]
      Signed-off-by: default avatarTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      44f22bd9
    • Dongdong Liu's avatar
      PCI: Add MCFG quirks for HiSilicon Hip05/06/07 host controllers · 5f00f1a0
      Dongdong Liu authored
      The PCIe controller in Hip05/Hip06/Hip07 SoCs is not completely
      ECAM-compliant.  It is non-ECAM only for the RC bus config space; for any
      other bus underneath the root bus it does support ECAM access.
      
      Add specific quirks for PCI config space accessors.  This involves:
      1. New initialization call hisi_pcie_init() to obtain RC base
      addresses from PNP0C02 at the root of the ACPI namespace (under \_SB).
      2. New entry in common quirk array.
      
      [bhelgaas: move to pcie-hisi.c and change Makefile/ifdefs so quirk doesn't
      depend on CONFIG_PCI_HISI]
      Signed-off-by: default avatarDongdong Liu <liudongdong3@huawei.com>
      Signed-off-by: default avatarGabriele Paoloni <gabriele.paoloni@huawei.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      5f00f1a0
    • Christopher Covington's avatar
      PCI: Add MCFG quirks for Qualcomm QDF2432 host controller · 2ca5b8dd
      Christopher Covington authored
      The Qualcomm Technologies QDF2432 SoC does not support accesses smaller
      than 32 bits to the PCI configuration space.  Register the appropriate
      quirk.
      
      [bhelgaas: add QCOM_ECAM32 macro, ifdef for ACPI and PCI_QUIRKS]
      Signed-off-by: default avatarChristopher Covington <cov@codeaurora.org>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      2ca5b8dd
    • Tomasz Nowicki's avatar
      PCI/ACPI: Check for platform-specific MCFG quirks · 5b69b85b
      Tomasz Nowicki authored
      The PCIe spec (r3.0, sec 7.2.2) specifies an "Enhanced Configuration Access
      Mechanism" (ECAM) for memory-mapped access to configuration space.  ECAM is
      required for PCIe systems unless there's a standard firmware interface for
      config access.
      
      In the absence of a firmware interface, we use pci_generic_ecam_ops, and on
      ACPI systems, we discover the ECAM space via the MCFG table and/or the _CBA
      method.
      
      Unfortunately some systems provide MCFG but don't implement ECAM according
      to spec, so we need a mechanism for quirks to make those systems work.
      
      Add an MCFG quirk mechanism to override the config accessor functions
      and/or the memory-mapped address space.
      
      A quirk is selected if it matches all of the following:
      
        - OEM ID
        - OEM Table ID
        - OEM Revision
        - PCI segment (from _SEG)
        - PCI bus number range (from _CRS, wildcard allowed)
      
      If the quirk specifies config accessor functions or a memory-mapped address
      range, these override the defaults.
      
      [bhelgaas: changelog, reorder quirk matching, fix oem_revision typo per
      Duc, add under #ifdef CONFIG_PCI_QUIRKS]
      Signed-off-by: default avatarTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: default avatarDongdong Liu <liudongdong3@huawei.com>
      Signed-off-by: default avatarChristopher Covington <cov@codeaurora.org>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      5b69b85b
    • Tomasz Nowicki's avatar
      PCI/ACPI: Extend pci_mcfg_lookup() to return ECAM config accessors · 13983eb8
      Tomasz Nowicki authored
      pci_mcfg_lookup() is the external interface to the generic MCFG code.
      Previously it merely looked up the ECAM base address for a given domain and
      bus range.  We want a way to add MCFG quirks, some of which may require
      special config accessors and adjustments to the ECAM address range.
      
      Extend pci_mcfg_lookup() so it can return a pointer to a pci_ecam_ops
      structure and a struct resource for the ECAM address space.  For now, it
      always returns &pci_generic_ecam_ops (the standard accessor) and the
      resource described by the MCFG.
      
      No functional changes intended.
      
      [bhelgaas: changelog]
      Signed-off-by: default avatarTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      13983eb8
  5. 10 Jun, 2016 1 commit