1. 06 10月, 2014 1 次提交
  2. 02 10月, 2014 11 次提交
  3. 01 10月, 2014 6 次提交
    • L
      PCI: Add pci_remap_iospace() to map bus I/O resources · 8b921acf
      Liviu Dudau 提交于
      Add pci_remap_iospace() to map bus I/O resources into the CPU virtual
      address space.  Architectures with special needs may provide their own
      version, but most should be able to use this one.
      
      This function is useful for PCI host bridge drivers that need to map the
      PCI I/O resources into virtual memory space.
      
      [bhelgaas: phys_addr description, drop temporary "err" variable]
      Signed-off-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NRob Herring <robh@kernel.org>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      CC: Arnd Bergmann <arnd@arndb.de>
      8b921acf
    • L
      of/pci: Add pci_get_new_domain_nr() and of_get_pci_domain_nr() · 41e5c0f8
      Liviu Dudau 提交于
      Add pci_get_new_domain_nr() to allocate a new domain number and
      of_get_pci_domain_nr() to retrieve the PCI domain number of a given device
      from DT.  Host bridge drivers or architecture-specific code can choose to
      implement their PCI domain number policy using these two functions.
      
      Using of_get_pci_domain_nr() guarantees a stable PCI domain number on every
      boot provided that all host bridge controllers are assigned a number in the
      device tree using "linux,pci-domain" property.  Mixing use of
      pci_get_new_domain_nr() and of_get_pci_domain_nr() is not recommended as it
      can lead to potentially conflicting domain numbers being assigned to root
      buses behind different host bridges.
      Signed-off-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Grant Likely <grant.likely@linaro.org>
      CC: Rob Herring <robh+dt@kernel.org>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      41e5c0f8
    • C
      PCI: Add generic domain handling · 670ba0c8
      Catalin Marinas 提交于
      The handling of PCI domains (or PCI segments in ACPI speak) is usually a
      straightforward affair but its implementation is currently left to the
      architectural code, with pci_domain_nr(b) querying the value of the domain
      associated with bus b.
      
      This patch introduces CONFIG_PCI_DOMAINS_GENERIC as an option that can be
      selected if an architecture wants a simple implementation where the value
      of the domain associated with a bus is stored in struct pci_bus.
      
      The architectures that select CONFIG_PCI_DOMAINS_GENERIC will then have to
      implement pci_bus_assign_domain_nr() as a way of setting the domain number
      associated with a root bus.  All child buses except the root bus will
      inherit the domain_nr value from their parent.
      Signed-off-by: NCatalin Marinas <Catalin.Marinas@arm.com>
      [Renamed pci_set_domain_nr() to pci_bus_assign_domain_nr()]
      Signed-off-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Arnd Bergmann <arnd@arndb.de>
      670ba0c8
    • L
      of/pci: Fix the conversion of IO ranges into IO resources · 0b0b0893
      Liviu Dudau 提交于
      The ranges property for a host bridge controller in DT describes the
      mapping between the PCI bus address and the CPU physical address.  The
      resources framework however expects that the IO resources start at a pseudo
      "port" address 0 (zero) and have a maximum size of IO_SPACE_LIMIT.  The
      conversion from PCI ranges to resources failed to take that into account,
      returning a CPU physical address instead of a port number.
      
      Also fix all the drivers that depend on the old behaviour by fetching the
      CPU physical address based on the port number where it is being needed.
      Signed-off-by: NLiviu Dudau <Liviu.Dudau@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      CC: Grant Likely <grant.likely@linaro.org>
      CC: Rob Herring <robh+dt@kernel.org>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Thierry Reding <thierry.reding@gmail.com>
      CC: Simon Horman <horms@verge.net.au>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      0b0b0893
    • L
      PCI: designware: Setup and clear exactly one MSI at a time · 91f8ae82
      Lucas Stach 提交于
      The setup_irq function is supposed to set up exactly one MSI IRQ.  Multiple
      IRQ setup is handled differently, to respect the choices made by the upper
      layers.
      
      Also only clear one MSI IRQ at a time; the PCI core will call into this
      function multiple times if it has to tear down more than one MSI IRQ.
      Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: NPratyush Anand <pratyush.anand@st.com>
      Acked-by: NJingoo Han <jg1.han@samsung.com>
      91f8ae82
    • Y
      PCI: Add missing MEM_64 mask in pci_assign_unassigned_bridge_resources() · d61b0e87
      Yinghai Lu 提交于
      In 5b285415 ("PCI: Restrict 64-bit prefetchable bridge windows to
      64-bit resources"), we added IORESOURCE_MEM_64 to the mask in
      pci_assign_unassigned_root_bus_resources(), but not to the mask in
      pci_assign_unassigned_bridge_resources().
      
      Add IORESOURCE_MEM_64 to the pci_assign_unassigned_bridge_resources() type
      mask.
      
      Fixes: 5b285415 ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources")
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: stable@vger.kernel.org	# v3.16+
      d61b0e87
  4. 30 9月, 2014 2 次提交
  5. 25 9月, 2014 1 次提交
  6. 24 9月, 2014 11 次提交
  7. 23 9月, 2014 8 次提交