1. 08 Mar, 2016 3 commits
    • Thierry Reding's avatar
      PCI: tegra: Remove unused struct tegra_pcie.num_ports field · 8493a952
      Thierry Reding authored
      The num_ports field of the tegra_pcie structure is never used so remove it.
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      8493a952
    • Thierry Reding's avatar
      PCI: tegra: Implement ->{add,remove}_bus() callbacks · b4d18d71
      Thierry Reding authored
      The configuration space mapping on Tegra is somewhat special, and in order
      to avoid wasting virtual address space the configuration space for each bus
      needs to be stitched together from several blocks which form a single
      continuous virtual address range for accessors.
      
      Currently the configuration space is mapped upon the first access to one of
      its registers.  However, the mapping operation may sleep under certain
      circumstances, so doing it from the configuration space accessors (they are
      protected by a spin lock) will trigger a warning.
      
      To avoid the warning, use the ->add_bus() callback to perform the mapping
      at enumeration time when the operation is allowed to sleep.  Also add an
      implementation of ->remove_bus() that undoes the mapping established by the
      ->add_bus() callback.  While it isn't currently possible to unload the
      module, there is work underway to remedy this, and this code will come in
      handy when that happens.
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      b4d18d71
    • Thierry Reding's avatar
      PCI: Add pci_ops.{add,remove}_bus() callbacks · 057bd2e0
      Thierry Reding authored
      Add pci_ops.{add,remove}_bus() callbacks, which will be called on every
      newly created bus and when a bus is being removed, respectively.  This can
      be used by drivers to implement driver-specific initialization and teardown
      of the bus, in addition to the architecture-specifics implemented by the
      pcibios_add_bus() and the pcibios_remove_bus() functions.
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      057bd2e0
  2. 24 Jan, 2016 37 commits