From: Adrian Hunter <adrian.hunter@intel.com>
To: Zhoujie Wu <zjwu@marvell.com>,
ulf.hansson@linaro.org, linux-mmc@vger.kernel.org
Cc: zmxu@marvell.com, jszhang@marvell.com, nadavh@marvell.com,
xigu@marvell.com, dingwei@marvell.com, kostap@marvell.com,
hannah@marvell.com, hongd@marvell.com, dougj@marvell.com,
ygao@marvell.com, liuw@marvell.com,
gregory.clement@free-electrons.com,
thomas.petazzoni@free-electrons.com
Subject: Re: [PATCH v3] mmc: sdhci-xenon: Add Xenon SDHCI specific system-level PM support
Date: Mon, 14 Aug 2017 14:11:47 +0300 [thread overview]
Message-ID: <c520d6b0-5bea-8503-95d6-32845decb573@intel.com> (raw)
In-Reply-To: <1499897779-12338-1-git-send-email-zjwu@marvell.com>
On 13/07/17 01:16, Zhoujie Wu wrote:
> From: Hu Ziji <huziji@marvell.com>
>
> Add Xenon specific system-level suspend and resume support.
> Especially during resume, re-configure Xenon specific registers
> since registers setting will be lost in suspend if Xenon is power off.
>
> Signed-off-by: Hu Ziji <huziji@marvell.com>
> Signed-off-by: Zhoujie Wu <zjwu@marvell.com>
> Tested-by: Jisheng Zhang <jszhang@marvell.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> Hu Ziji has left marvell, submit the patch for him.
> I will submit a patch to change xenon driver maintainer information and take over the ownership.
> v2:
> Add Signed-off-by Hu Ziji <huziji@marvell.com>.
> v3:
> Since Hu Ziji wrote the patch, correct the author information.
> drivers/mmc/host/sdhci-xenon.c | 42 +++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 41 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-xenon.c b/drivers/mmc/host/sdhci-xenon.c
> index bc1781b..9f399c4 100644
> --- a/drivers/mmc/host/sdhci-xenon.c
> +++ b/drivers/mmc/host/sdhci-xenon.c
> @@ -519,6 +519,46 @@ static int xenon_remove(struct platform_device *pdev)
> return 0;
> }
>
> +#ifdef CONFIG_PM_SLEEP
> +static int xenon_suspend(struct device *dev)
> +{
> + struct sdhci_host *host = dev_get_drvdata(dev);
> + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> + int ret;
> +
> + ret = sdhci_suspend_host(host);
> + if (ret)
> + return ret;
> +
> + clk_disable_unprepare(pltfm_host->clk);
> + return ret;
> +}
> +
> +static int xenon_resume(struct device *dev)
> +{
> + struct sdhci_host *host = dev_get_drvdata(dev);
> + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
> + int ret;
> +
> + ret = clk_prepare_enable(pltfm_host->clk);
> + if (ret)
> + return ret;
> +
> + /*
> + * If SoCs power off the entire Xenon, registers setting will
> + * be lost.
> + * Re-configure Xenon specific register to enable current SDHC
> + */
> + ret = xenon_sdhc_prepare(host);
> + if (ret)
> + return ret;
> +
> + return sdhci_resume_host(host);
> +}
> +#endif
> +
> +static SIMPLE_DEV_PM_OPS(xenon_pmops, xenon_suspend, xenon_resume);
> +
> static const struct of_device_id sdhci_xenon_dt_ids[] = {
> { .compatible = "marvell,armada-ap806-sdhci",},
> { .compatible = "marvell,armada-cp110-sdhci",},
> @@ -531,7 +571,7 @@ static int xenon_remove(struct platform_device *pdev)
> .driver = {
> .name = "xenon-sdhci",
> .of_match_table = sdhci_xenon_dt_ids,
> - .pm = &sdhci_pltfm_pmops,
> + .pm = &xenon_pmops,
> },
> .probe = xenon_probe,
> .remove = xenon_remove,
>
next prev parent reply other threads:[~2017-08-14 11:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 22:16 [PATCH v3] mmc: sdhci-xenon: Add Xenon SDHCI specific system-level PM support Zhoujie Wu
2017-07-13 9:18 ` Ulf Hansson
2017-07-13 9:25 ` Jisheng Zhang
2017-07-13 9:52 ` Ulf Hansson
2017-07-13 10:13 ` [EXT] " Jisheng Zhang
2017-07-13 10:48 ` Ulf Hansson
2017-07-13 11:03 ` Ulf Hansson
2017-07-13 21:45 ` Zhoujie Wu
2017-07-14 9:09 ` Ulf Hansson
2017-07-14 10:25 ` Ziji Hu
2017-08-07 9:18 ` Ulf Hansson
2017-07-14 18:46 ` Zhoujie Wu
2017-08-07 9:23 ` Ulf Hansson
2017-08-07 22:09 ` Zhoujie Wu
2017-08-14 11:11 ` Adrian Hunter [this message]
2017-08-21 12:33 ` Ulf Hansson
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=c520d6b0-5bea-8503-95d6-32845decb573@intel.com \
--to=adrian.hunter@intel.com \
--cc=dingwei@marvell.com \
--cc=dougj@marvell.com \
--cc=gregory.clement@free-electrons.com \
--cc=hannah@marvell.com \
--cc=hongd@marvell.com \
--cc=jszhang@marvell.com \
--cc=kostap@marvell.com \
--cc=linux-mmc@vger.kernel.org \
--cc=liuw@marvell.com \
--cc=nadavh@marvell.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=ulf.hansson@linaro.org \
--cc=xigu@marvell.com \
--cc=ygao@marvell.com \
--cc=zjwu@marvell.com \
--cc=zmxu@marvell.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