linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kishon Vijay Abraham I <kishon@ti.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: <linux-pci@vger.kernel.org>, Jingoo Han <jingoohan1@gmail.com>,
	Richard Zhu <Richard.Zhu@freescale.com>,
	Lucas Stach <l.stach@pengutronix.de>,
	Murali Karicheri <m-karicheri2@ti.com>,
	Minghuan Lian <minghuan.Lian@freescale.com>,
	Mingkai Hu <mingkai.hu@freescale.com>,
	Roy Zang <tie-fei.zang@freescale.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Niklas Cassel <niklas.cassel@axis.com>,
	Jesper Nilsson <jesper.nilsson@axis.com>,
	Pratyush Anand <pratyush.anand@gmail.com>,
	Jose Abreu <Jose.Abreu@synopsys.com>,
	Stanimir Varbanov <svarbanov@mm-sol.com>
Subject: Re: resume path in dra7xx and other DW-based drivers
Date: Tue, 20 Dec 2016 11:55:27 +0530	[thread overview]
Message-ID: <5858CED7.4020004@ti.com> (raw)
In-Reply-To: <20161208204304.GC30533@bhelgaas-glaptop.roam.corp.google.com>

Hi Bjorn,

On Friday 09 December 2016 02:13 AM, Bjorn Helgaas wrote:
> On Thu, Dec 08, 2016 at 02:19:00PM +0530, Kishon Vijay Abraham I wrote:
>> 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.
> 
> I'm not really a PM guy, so I'm not familiar with shallow power state.
> Could I have discovered from the code somehow that dra7xx suspend to
> shallow power state preserves register state?  It's nice if a reader
> can verify correctness without knowing the system-specific details.

Some drivers like drivers/mmc/host/omap_hsmmc.c saves the register contents
(omap_hsmmc_context_save) and then in runtime_resume checks if the register
contents are still same (omap_hsmmc_context_restore). Do you think we have to
do something like that for dra7xx?

omap_hsmmc.c is used by a lot of platforms some of which loses the context
during suspend. Since dra7xx doesn't loose context, not sure if we have to do
something like omap_hsmmc.

Thanks
Kishon

  reply	other threads:[~2016-12-20  6:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-07 22:02 resume path in dra7xx and other DW-based drivers Bjorn Helgaas
2016-12-08  8:25 ` Niklas Cassel
2016-12-08  8:49 ` Kishon Vijay Abraham I
2016-12-08 20:43   ` Bjorn Helgaas
2016-12-20  6:25     ` Kishon Vijay Abraham I [this message]
2016-12-20  9:29       ` Lucas Stach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5858CED7.4020004@ti.com \
    --to=kishon@ti.com \
    --cc=Jose.Abreu@synopsys.com \
    --cc=Richard.Zhu@freescale.com \
    --cc=helgaas@kernel.org \
    --cc=jesper.nilsson@axis.com \
    --cc=jingoohan1@gmail.com \
    --cc=l.stach@pengutronix.de \
    --cc=linux-pci@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=minghuan.Lian@freescale.com \
    --cc=mingkai.hu@freescale.com \
    --cc=niklas.cassel@axis.com \
    --cc=pratyush.anand@gmail.com \
    --cc=svarbanov@mm-sol.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=tie-fei.zang@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).