1. 02 Jul, 2017 37 commits
  2. 28 Jun, 2017 3 commits
    • Lorenzo Pieralisi's avatar
      ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge() · 97ad2bdc
      Lorenzo Pieralisi authored
      The introduction of pci_scan_root_bus_bridge() provides a PCI core API to
      scan a PCI root bus backed by an already initialized struct pci_host_bridge
      object, which simplifies the bus scan interface and makes the PCI scan root
      bus interface easier to generalize as members are added to the struct
      pci_host_bridge.
      
      Convert ARM bios32 code to pci_scan_root_bus_bridge() to improve the PCI
      root bus scanning interface.
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      [bhelgaas: fold in warning fix from Arnd Bergmann <arnd@arndb.de>:
      http://lkml.kernel.org/r/20170621215323.3921382-1-arnd@arndb.de]
      [bhelgaas: set bridge->ops for mv78xx0]
      [bhelgaas: fold in fixes from Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>:
      http://lkml.kernel.org/r/20170701135457.GB8977@red-moon]
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Andrew Lunn <andrew@lunn.ch>
      97ad2bdc
    • Lorenzo Pieralisi's avatar
      PCI: Make pci_register_host_bridge() PCI core internal · cea9bc0b
      Lorenzo Pieralisi authored
      With the introduction of pci_scan_root_bus_bridge() there is no need to
      export pci_register_host_bridge() to other kernel subsystems other than the
      PCI compilation unit that needs it.
      
      Make pci_register_host_bridge() static to its compilation unit and convert
      the existing drivers usage over to pci_scan_root_bus_bridge().
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      cea9bc0b
    • Lorenzo Pieralisi's avatar
      PCI: Add pci_scan_root_bus_bridge() interface · 1228c4b6
      Lorenzo Pieralisi authored
      The current pci_scan_root_bus() interface is made up of two main code
      paths:
      
        - pci_create_root_bus()
        - pci_scan_child_bus()
      
      pci_create_root_bus() is a wrapper function that allows to create a struct
      pci_host_bridge structure, initialize it with the passed parameters and
      register it with the kernel.
      
      As the struct pci_host_bridge require additional struct members,
      pci_create_root_bus() parameters list has grown in time, making it unwieldy
      to add further parameters to it in case the struct pci_host_bridge gains
      more members fields to augment its functionality.
      
      Since PCI core code provides functions to allocate struct pci_host_bridge,
      instead of forcing the pci_create_root_bus() interface to add new
      parameters to cater for new struct pci_host_bridge functionality, it is
      more suitable to add an interface in PCI core code to scan a PCI bus
      straight from a struct pci_host_bridge created and customized by each
      specific PCI host controller driver.
      
      Add a pci_scan_root_bus_bridge() function to allow PCI host controller
      drivers to create and initialize struct pci_host_bridge and scan the
      resulting bus.
      Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      1228c4b6