• J
    PCI: designware: Move Root Complex setup code to dw_pcie_setup_rc() · 7e57fd14
    Jisheng Zhang 提交于
    dw_pcie_host_init() looks up host bridge resources, ioremaps them, creates
    IRQ domains, and enumerates devices below the bridge.  dw_pcie_setup_rc()
    programs the Root Complex registers.  The Root Complex may lose power
    during suspend-to-RAM, and when we resume, we want to redo the latter but
    not the former.
    
    Move some Root Complex programming from dw_pcie_host_init() to
    dw_pcie_setup_rc() where it belongs.  DesignWare-based drivers can call
    dw_pcie_setup_rc() in their resume paths.
    
    [Niklas Cassel <niklas.cassel@axis.com>:  This change moves outbound ATU
    programming, which uses pp->mem_base, to dw_pcie_setup_rc().  Apply the
    dra7xx pp->mem_base update before calling dw_pcie_setup_rc().]
    
    [bhelgaas: changelog, fold in dra7xx fix from Niklas]
    Signed-off-by: NJisheng Zhang <jszhang@marvell.com>
    Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
    Acked-by: NPratyush Anand <pratyush.anand@gmail.com>
    7e57fd14
pcie-designware.c 20.4 KB