From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Subject: Re: resume path in dra7xx and other DW-based drivers To: Bjorn Helgaas References: <20161207220234.GG22129@bhelgaas-glaptop.roam.corp.google.com> CC: , Jingoo Han , Richard Zhu , Lucas Stach , Murali Karicheri , Minghuan Lian , Mingkai Hu , Roy Zang , Thomas Petazzoni , Niklas Cassel , Jesper Nilsson , Pratyush Anand , Jose Abreu , Stanimir Varbanov From: Kishon Vijay Abraham I Message-ID: <58491E7C.1070700@ti.com> Date: Thu, 8 Dec 2016 14:19:00 +0530 MIME-Version: 1.0 In-Reply-To: <20161207220234.GG22129@bhelgaas-glaptop.roam.corp.google.com> Content-Type: text/plain; charset="windows-1252" List-ID: Hi Bjorn, On Thursday 08 December 2016 03:32 AM, Bjorn Helgaas wrote: > Hi Kishon, et al, > > Does dra7xx suspend/resume work? I'm not sure dra7xx_pcie_resume() > and dra7xx_pcie_resume_noirq() restore everything necessary. For > example, the probe path has this: > > dra7xx_pcie_probe > dra7xx_add_pcie_port > dw_pcie_host_init > dra7xx_pcie_host_init # .host_init > dw_pcie_setup_rc > dw_pcie_prog_outbound_atu > > so I think it programs the ATU in dw_pcie_setup_rc(). But the resume > path doesn't call dw_pcie_setup_rc(), so I don't see where the ATU > setup would be restored. DRA7xx only supported shallow power state and not deep power state. In shallow power state, the register settings are not lost and hence we didn't have to restore anything. > > Related to this, dra7xx_pcie_resume_noirq() contains phy init and > power-on code that is duplicated in dra7xx_pcie_probe(). It seems > like that ought to be done by a common function instead of being cut > and pasted. yeah, that has to be cleaned up. Thanks Kishon