* Re: [PATCH/RFC v2 2/2] mmc: core: Call mmc_power_off_nofity() if pm_suspend_via_firmware() [not found] ` <1592566143-4546-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> @ 2020-06-19 13:41 ` Sergei Shtylyov 0 siblings, 0 replies; 4+ messages in thread From: Sergei Shtylyov @ 2020-06-19 13:41 UTC (permalink / raw) To: Yoshihiro Shimoda, mark.rutland, lorenzo.pieralisi, ulf.hansson Cc: linux-renesas-soc, linux-mmc, linux-arm-kernel Hello! On 19.06.2020 14:29, Yoshihiro Shimoda wrote: > If pm_suspend_via_firmware() returns true, the system will be able > to cut both vcc and vccq in the suspend. So, call > mmc_power_off_nofity() if pm_suspend_via_firmware() returns true. mmc_poweroff_notify()? :-) > Note that we should not update the MMC_CAP2_FULL_PWR_CYCLE caps > because the mmc_select_voltage() checks the caps when attaches > a mmc/sd. > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> > --- > drivers/mmc/core/mmc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c > index 4203303..81941fd 100644 > --- a/drivers/mmc/core/mmc.c > +++ b/drivers/mmc/core/mmc.c [...] > @@ -2038,7 +2039,8 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend) > goto out; > > if (mmc_can_poweroff_notify(host->card) && > - ((host->caps2 & MMC_CAP2_FULL_PWR_CYCLE) || !is_suspend)) > + ((host->caps2 & MMC_CAP2_FULL_PWR_CYCLE) || !is_suspend || > + pm_suspend_via_firmware())) > err = mmc_poweroff_notify(host->card, notify_type); > else if (mmc_can_sleep(host->card)) > err = mmc_sleep(host); > MBR, Sergei _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH/RFC v2 0/2] treewide: fix _mmc_suspend() on PSCI [not found] <1592566143-4546-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> [not found] ` <1592566143-4546-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> @ 2020-06-19 14:51 ` Geert Uytterhoeven [not found] ` <1592566143-4546-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> 2 siblings, 0 replies; 4+ messages in thread From: Geert Uytterhoeven @ 2020-06-19 14:51 UTC (permalink / raw) To: Yoshihiro Shimoda Cc: Mark Rutland, Ulf Hansson, Lorenzo Pieralisi, Linux MMC List, Linux-Renesas, Linux ARM Hi Shimoda-san, On Fri, Jun 19, 2020 at 2:42 PM Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> wrote: > We can detect whether the system is going to suspend by using > pm_suspend_via_firmware() API. So, this patch series update > both PSCI and MMC driver for my environment (r8a77951-salvator-xs). Cool, didn't know about pm_set_.*_via_firmware(). Looks like this can be used in the clock and pin control drivers, too. Currently they're checking for !psci_ops.cpu_suspend. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <1592566143-4546-2-git-send-email-yoshihiro.shimoda.uh@renesas.com>]
* Re: [PATCH/RFC v2 1/2] firmware: psci: call pm_set_suspend_via_firmware() [not found] ` <1592566143-4546-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> @ 2020-06-29 14:33 ` Sudeep Holla 2020-06-30 8:53 ` Yoshihiro Shimoda 0 siblings, 1 reply; 4+ messages in thread From: Sudeep Holla @ 2020-06-29 14:33 UTC (permalink / raw) To: Yoshihiro Shimoda Cc: mark.rutland, ulf.hansson, lorenzo.pieralisi, linux-mmc, linux-renesas-soc, Sudeep Holla, linux-arm-kernel (This patch never made it to my inbox, may be due to ALKML issues on that day) On Fri, Jun 19, 2020 at 08:29:02PM +0900, Yoshihiro Shimoda wrote: > Call pm_set_suspend_via_firmware() in .begin() of psci_suspend_ops > to use pm_suspend_via_firmware() on PSCI environment. > I don't have issues with this change as such, but I need to understand how and why this is used. I will comment on that separately. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH/RFC v2 1/2] firmware: psci: call pm_set_suspend_via_firmware() 2020-06-29 14:33 ` [PATCH/RFC v2 1/2] firmware: psci: call pm_set_suspend_via_firmware() Sudeep Holla @ 2020-06-30 8:53 ` Yoshihiro Shimoda 0 siblings, 0 replies; 4+ messages in thread From: Yoshihiro Shimoda @ 2020-06-30 8:53 UTC (permalink / raw) To: Sudeep Holla Cc: mark.rutland@arm.com, ulf.hansson@linaro.org, lorenzo.pieralisi@arm.com, linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Hi Sudeep, > From: Sudeep Holla, Sent: Monday, June 29, 2020 11:33 PM > > (This patch never made it to my inbox, may be due to ALKML issues on that day) > > On Fri, Jun 19, 2020 at 08:29:02PM +0900, Yoshihiro Shimoda wrote: > > Call pm_set_suspend_via_firmware() in .begin() of psci_suspend_ops > > to use pm_suspend_via_firmware() on PSCI environment. > > > > I don't have issues with this change as such, but I need to understand > how and why this is used. I will comment on that separately. I thought MMC driver could use this API to detect whether the firmware was suspending or not. However, Ulf said this was not a good way because all implementation of PSCI will not turn the power off while system suspend [1]. Also, as you and Mark said on other email thread [2], the current PSCI specification cannot inform system suspend state to OS (Linux). So, I think I should recall this patch because this cannot get expected information. [1] https://lore.kernel.org/linux-renesas-soc/CAPDyKFq-dEPaU094hrk2xg18VpJAsbnf8enieFmcMhKiB1bW1A@mail.gmail.com/ https://lore.kernel.org/linux-renesas-soc/CAMuHMdXh1Hh6H35Mp8hBJBykUucRNwxTmW+U9SHM+xhrcwasDA@mail.gmail.com/T/#m442a2ce972cfdb3ff33637c120c8d096e4d07af8 Best regards, Yoshihiro Shimoda > -- > Regards, > Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-30 8:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1592566143-4546-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>
[not found] ` <1592566143-4546-3-git-send-email-yoshihiro.shimoda.uh@renesas.com>
2020-06-19 13:41 ` [PATCH/RFC v2 2/2] mmc: core: Call mmc_power_off_nofity() if pm_suspend_via_firmware() Sergei Shtylyov
2020-06-19 14:51 ` [PATCH/RFC v2 0/2] treewide: fix _mmc_suspend() on PSCI Geert Uytterhoeven
[not found] ` <1592566143-4546-2-git-send-email-yoshihiro.shimoda.uh@renesas.com>
2020-06-29 14:33 ` [PATCH/RFC v2 1/2] firmware: psci: call pm_set_suspend_via_firmware() Sudeep Holla
2020-06-30 8:53 ` Yoshihiro Shimoda
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox