• Kishon Vijay Abraham I's avatar
    PCI: dra7xx: Create functional dependency between PCIe and PHY · 7a4db656
    Kishon Vijay Abraham I authored
    PCI core access configuration space registers in resume_noirq callbacks.
    In the case of dra7xx, PIPE3 PHY connected to PCIe controller has to be
    enabled before accessing configuration space registers. Since
    PIPE3 PHY is enabled by only configuring control module registers, no
    aborts has been observed so far (though during noirq stage, interface
    clock of PIPE3 PHY is not enabled).
    
    With new TRM updates, PIPE3 PHY has to be initialized (PIPE3 PHY
    registers has to be accessed) as well which requires the interface
    clock of PIPE3 PHY to be enabled. The interface clock of PIPE3 PHY is
    derived from OCP2SCP and hence PCIe PHY is modeled as a child of
    OCP2SCP. Since pm_runtime is not enabled during noirq stage,
    pm_runtime_get_sync done in phy_init doesn't enable
    OCP2SCP clocks resulting in abort when PIPE3 PHY registers are
    accessed.
    
    Create a function dependency between PCIe and PHY here to make
    sure PCIe is suspended before PCIe PHY/OCP2SCP and resumed after
    PCIe PHY/OCP2SCP.
    Suggested-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
    Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
    Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
    Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    7a4db656
pci-dra7xx.c 19.6 KB