1. 07 12月, 2016 8 次提交
    • T
      PCI: Add MCFG quirks for Cavium ThunderX pass1.x host controller · 648d93fc
      Tomasz Nowicki 提交于
      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: NTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      648d93fc
    • T
      PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller · 44f22bd9
      Tomasz Nowicki 提交于
      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: NTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      44f22bd9
    • B
      PCI: thunder-pem: Factor out resource lookup · 0d414268
      Bjorn Helgaas 提交于
      Pull the register resource lookup out of thunder_pem_init() so we can
      easily add a corresponding lookup using ACPI.  No functional change
      intended.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      0d414268
    • D
      PCI: Add MCFG quirks for HiSilicon Hip05/06/07 host controllers · 5f00f1a0
      Dongdong Liu 提交于
      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: NDongdong Liu <liudongdong3@huawei.com>
      Signed-off-by: NGabriele Paoloni <gabriele.paoloni@huawei.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      5f00f1a0
    • C
      PCI: Add MCFG quirks for Qualcomm QDF2432 host controller · 2ca5b8dd
      Christopher Covington 提交于
      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: NChristopher Covington <cov@codeaurora.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      2ca5b8dd
    • D
      PCI/ACPI: Provide acpi_get_rc_resources() for ARM64 platform · 169de969
      Dongdong Liu 提交于
      The acpi_get_rc_resources() is used to get the RC register address that can
      not be described in MCFG.  It takes the _HID & segment to look for and
      outputs the RC address resource.  Use PNP0C02 devices to describe such RC
      address resource.  Use _UID to match segment to tell which root bus the
      PNP0C02 resource belongs to.
      
      [bhelgaas: add dev argument, wrap in #ifdef CONFIG_PCI_QUIRKS]
      Signed-off-by: NDongdong Liu <liudongdong3@huawei.com>
      Signed-off-by: NTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      169de969
    • T
      PCI/ACPI: Check for platform-specific MCFG quirks · 5b69b85b
      Tomasz Nowicki 提交于
      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: NTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: NDongdong Liu <liudongdong3@huawei.com>
      Signed-off-by: NChristopher Covington <cov@codeaurora.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      5b69b85b
    • T
      PCI/ACPI: Extend pci_mcfg_lookup() to return ECAM config accessors · 13983eb8
      Tomasz Nowicki 提交于
      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: NTomasz Nowicki <tn@semihalf.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      13983eb8
  2. 02 12月, 2016 1 次提交
  3. 15 10月, 2016 10 次提交
  4. 14 10月, 2016 4 次提交
  5. 13 10月, 2016 17 次提交