• Lorenzo Pieralisi's avatar
    PCI: generic: Convert to DT resource parsing API · dbf9826d
    Lorenzo Pieralisi authored
    In order to consolidate DT configuration for PCI host controllers in the
    kernel, a new API, of_pci_get_host_bridge_resources(), was developed to
    allow parsing and assigning IO/BUS/MEM resources from DT, removing
    duplicated code present in the majority of PCI host driver implementations.
    
    Convert the existing PCI generic host controller driver to the new API.
    Most of the code parsing ranges and creating resources is now delegated to
    the of_pci_get_host_bridge_resources() API.
    
    The PCI host controller code filters the resulting resource list and maps
    IO space by using the newly introduced pci_ioremap_iospace() API.
    
    New code supports only one IO resource per generic host controller, which
    should cater for all existing host controller configurations.
    
    [bhelgaas: changelog]
    Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    Acked-by: default avatarWill Deacon <will.deacon@arm.com>
    dbf9826d
pci-host-generic.c 7.74 KB