• Serge Semin's avatar
    PCI: dwc: Introduce generic resources getter · ef8c5887
    Serge Semin authored
    Currently the DW PCIe Root Port and Endpoint CSR spaces are retrieved in
    the separate parts of the DW PCIe core driver. It doesn't really make
    sense since the both controller types have identical set of the core CSR
    regions: DBI, DBI CS2 and iATU/eDMA. Thus we can simplify the DW PCIe Host
    and EP initialization methods by moving the platform-specific registers
    space getting and mapping into a common method. It gets to be even more
    justified seeing the CSRs base address pointers are preserved in the
    common DW PCIe descriptor. Note all the OF-based common DW PCIe settings
    initialization will be moved to the new method too in order to have a
    single function for all the generic platform properties handling in single
    place.
    
    A nice side-effect of this change is that the pcie-designware-host.c and
    pcie-designware-ep.c drivers are cleaned up from all the direct dw_pcie
    storage modification, which makes the DW PCIe core, Root Port and Endpoint
    modules more coherent.
    
    Link: https://lore.kernel.org/r/20221113191301.5526-18-Sergey.Semin@baikalelectronics.ruSigned-off-by: default avatarSerge Semin <Sergey.Semin@baikalelectronics.ru>
    Signed-off-by: default avatarLorenzo Pieralisi <lpieralisi@kernel.org>
    Reviewed-by: default avatarRob Herring <robh@kernel.org>
    ef8c5887
pcie-designware.h 16.2 KB