• L
    PCI: Add pci_scan_root_bus_bridge() interface · 1228c4b6
    Lorenzo Pieralisi 提交于
    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: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    1228c4b6
pci.h 77.1 KB