1. 10 Jan, 2014 1 commit
    • Bjorn Helgaas's avatar
      Merge branch 'pci/resource' into next · 96702be5
      Bjorn Helgaas authored
      * pci/resource:
        PCI: Allocate 64-bit BARs above 4G when possible
        PCI: Enforce bus address limits in resource allocation
        PCI: Split out bridge window override of minimum allocation address
        agp/ati: Use PCI_COMMAND instead of hard-coded 4
        agp/intel: Use CPU physical address, not bus address, for ioremap()
        agp/intel: Use pci_bus_address() to get GTTADR bus address
        agp/intel: Use pci_bus_address() to get MMADR bus address
        agp/intel: Support 64-bit GMADR
        agp/intel: Rename gtt_bus_addr to gtt_phys_addr
        drm/i915: Rename gtt_bus_addr to gtt_phys_addr
        agp: Use pci_resource_start() to get CPU physical address for BAR
        agp: Support 64-bit APBASE
        PCI: Add pci_bus_address() to get bus address of a BAR
        PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev
        PCI: Change pci_bus_region addresses to dma_addr_t
      96702be5
  2. 08 Jan, 2014 4 commits
  3. 07 Jan, 2014 13 commits
  4. 04 Jan, 2014 4 commits
  5. 03 Jan, 2014 1 commit
  6. 02 Jan, 2014 3 commits
    • Jingoo Han's avatar
      PCI: designware: Fix indent code style · 58275f2f
      Jingoo Han authored
      Fix indent code style and replace 'MSI interrupt controller' of comment
      with 'MSI controller' to fix the following checkpatch issues:
      
        ERROR: code indent should use tabs where possible
        WARNING: please, no spaces at the start of a line
        WARNING: line over 80 characters
      Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      58275f2f
    • Jingoo Han's avatar
      PCI: mvebu: Use max_t() instead of max(resource_size_t,) · 06489002
      Jingoo Han authored
      Use max_t() instead of max(resource_size_t,) in order to fix
      the following checkpatch warning.
      
        WARNING: max() should probably be max_t(resource_size_t, SZ_64K, size)
        WARNING: max() should probably be max_t(resource_size_t, SZ_1M, size)
      Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: default avatarJason Cooper <jason@lakedaemon.net>
      06489002
    • Thomas Petazzoni's avatar
      PCI: mvebu: Call pci_ioremap_io() at startup instead of dynamically · 31e45ec3
      Thomas Petazzoni authored
      The mvebu PCI host controller driver uses an emulated PCI-to-PCI bridge to
      leverage the core PCI kernel enumeration logic to dynamically create and
      remove the MBus windows needed to access the memory and I/O regions of each
      PCI interface.
      
      In the context of this PCI-to-PCI bridge emulation, the driver emulates
      all reads and writes to the PCI bridge registers.  Upon a write to the
      registers configuring the I/O base and limit, the driver was creating the
      MBus window and calling pci_ioremap_io() to setup the mapping.
      
      However, it turns out that accesses to these registers are made in an IRQ
      disabled context, while pci_ioremap_io() is a potentially sleeping
      function.  Not only this is wrong, but it is causing fairly loud warnings
      at boot time when the appropriate kernel hacking options are enabled.
      
      This patch solves this by moving the pci_ioremap_io() call to the startup
      of the driver.  At this point, we don't know how many PCI interfaces will
      be enabled, so we are simply remapping the entire PCI I/O space to virtual
      addresses.  This is reasonable since this I/O space is limited to 1 MB in
      size, and also because the MBus windows continue to be created in a dynamic
      fashion only when devices need them.
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      31e45ec3
  7. 21 Dec, 2013 3 commits
    • Bjorn Helgaas's avatar
      PCI: Add pci_bus_address() to get bus address of a BAR · 06cf56e4
      Bjorn Helgaas authored
      We store BAR information as a struct resource, which contains the CPU
      address, not the bus address.  Drivers often need the bus address, and
      there's currently no convenient way to get it, so they often read the
      BAR directly, or use the resource address (which doesn't work if there's
      any translation between CPU and bus addresses).
      
      Add pci_bus_address() to make this convenient.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      06cf56e4
    • Yinghai Lu's avatar
      PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev · fc279850
      Yinghai Lu authored
      These interfaces:
      
        pcibios_resource_to_bus(struct pci_dev *dev, *bus_region, *resource)
        pcibios_bus_to_resource(struct pci_dev *dev, *resource, *bus_region)
      
      took a pci_dev, but they really depend only on the pci_bus.  And we want to
      use them in resource allocation paths where we have the bus but not a
      device, so this patch converts them to take the pci_bus instead of the
      pci_dev:
      
        pcibios_resource_to_bus(struct pci_bus *bus, *bus_region, *resource)
        pcibios_bus_to_resource(struct pci_bus *bus, *resource, *bus_region)
      
      In fact, with standard PCI-PCI bridges, they only depend on the host
      bridge, because that's the only place address translation occurs, but
      we aren't going that far yet.
      
      [bhelgaas: changelog]
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      fc279850
    • Bjorn Helgaas's avatar
      PCI: Change pci_bus_region addresses to dma_addr_t · 0a5ef7b9
      Bjorn Helgaas authored
      Struct pci_bus_region contains bus addresses, which are type dma_addr_t,
      not resource_size_t.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      0a5ef7b9
  8. 20 Dec, 2013 11 commits