From: Jaehoon Chung <jh80.chung@samsung.com>
To: John Keeping <john@metanate.com>
Cc: "Romain Perier" <romain.perier@collabora.com>,
"Romain Perier" <romain.perier@gmail.com>,
ulf.hansson@linaro.org, xzy.xu@rock-chips.com,
"Jaehoon Chung" <jh80.chung@gmail.com>,
"Heiko Stübner" <heiko@sntech.de>,
"Randy Li" <randy.li@rock-chips.com>,
"Shawn Lin" <shawn.lin@rock-chips.com>, ayaka <ayaka@soulik.info>,
linux-mmc@vger.kernel.org,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] Revert "mmc: dw_mmc-rockchip: add runtime PM support"
Date: Mon, 23 Jan 2017 21:53:02 +0900 [thread overview]
Message-ID: <845aea80-10a5-e8f9-5620-952bdcc37234@samsung.com> (raw)
In-Reply-To: <20170123112432.08337d26.john@metanate.com>
Hi John,
On 01/23/2017 08:24 PM, John Keeping wrote:
> Hi,
>
> On Fri, 20 Jan 2017 15:08:57 +0900, Jaehoon Chung wrote:
>> On 01/17/2017 10:38 PM, Romain Perier wrote:
>>> In my case I can reproduce the issue on the rock2 and the firefly-rk3288. A workaround is to
>>>
>>> comment the line ".pm = <&pm_ops_foo>" .
>>
>> Sorry for late. I'm checking runtime PM for this.
>> After that, i will decide whether revert or not.
>
> I hit this problem on Rock2 when trying 4.10-rc4. The following patch
> fixes it for me.
Could you check with Ulf's repository?
https://git.kernel.org/cgit/linux/kernel/git/ulfh/mmc.git/commit/?h=next&id=e86738ac78c22956f1c787ebafefc83d43cab30a
Shawn's patch was applied. If also occurred the same issue, let me know, plz.
>
> I'm not sure if this is safe in general or whether it should be guarded
> by a quirk that is enabled for RK3288.
>
> -- >8 --
> Subject: [PATCH] mmc: dw_mmc: restore CIU state on resume
>
> At least on RK3288, asserting SDMMC_CTRL_RESET causes the CIU to reset
> and disable the clock. We need to send SDMMC_CMD_UPD_CLK after doing
> this in order to avoid the MMC host hanging.
>
> Signed-off-by: John Keeping <john@metanate.com>
> ---
> drivers/mmc/host/dw_mmc.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index b44306b886cb..e7504dabcfb6 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -3311,6 +3311,7 @@ int dw_mci_runtime_resume(struct device *dev)
> {
> int i, ret = 0;
> struct dw_mci *host = dev_get_drvdata(dev);
> + u32 sdmmc_cmd_bits = SDMMC_CMD_UPD_CLK | SDMMC_CMD_PRV_DAT_WAIT;
>
> if (host->cur_slot &&
> (mmc_can_gpio_cd(host->cur_slot->mmc) ||
> @@ -3357,6 +3358,9 @@ int dw_mci_runtime_resume(struct device *dev)
> if (slot->mmc->pm_flags & MMC_PM_KEEP_POWER) {
> dw_mci_set_ios(slot->mmc, &slot->mmc->ios);
> dw_mci_setup_bus(slot, true);
> + } else {
> + /* restore CIU */
> + mci_send_cmd(slot, sdmmc_cmd_bits, 0);
> }
> }
>
>
next prev parent reply other threads:[~2017-01-23 12:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20161228153516epcas2p253c6bc0371ab0df464573b63218795ef@epcas2p2.samsung.com>
2016-12-28 15:34 ` [PATCH] Revert "mmc: dw_mmc-rockchip: add runtime PM support" Randy Li
2016-12-29 3:02 ` Jaehoon Chung
[not found] ` <e0cc8029-0155-4879-a643-ddc4239a55ab-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-12-29 7:13 ` Jaehoon Chung
2016-12-29 7:25 ` Shawn Lin
2016-12-29 10:25 ` Randy Li
[not found] ` <04b667d9-2591-51ff-e024-047bbb6e17c3-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-12-29 12:55 ` ayaka
2016-12-29 14:04 ` Jaehoon Chung
[not found] ` <95648282-38f5-42c2-fd8b-ab603eb3a168-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-12-29 15:07 ` ayaka
2016-12-30 2:35 ` Jaehoon Chung
2016-12-30 2:44 ` Randy Li
2016-12-30 2:50 ` Jaehoon Chung
[not found] ` <CABgxDo+3qMcHn6e2s_ZJy1crdi=ch5hQk6sy3W29Q12-ye33Qw@mail.gmail.com>
[not found] ` <2cdd0b6c-a099-595d-1c0b-be7933b0d4a6@collabora.com>
2017-01-20 6:08 ` Jaehoon Chung
2017-01-23 11:24 ` John Keeping
2017-01-23 12:53 ` Jaehoon Chung [this message]
[not found] ` <845aea80-10a5-e8f9-5620-952bdcc37234-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2017-01-23 13:22 ` John Keeping
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=845aea80-10a5-e8f9-5620-952bdcc37234@samsung.com \
--to=jh80.chung@samsung.com \
--cc=ayaka@soulik.info \
--cc=heiko@sntech.de \
--cc=jh80.chung@gmail.com \
--cc=john@metanate.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=randy.li@rock-chips.com \
--cc=romain.perier@collabora.com \
--cc=romain.perier@gmail.com \
--cc=shawn.lin@rock-chips.com \
--cc=ulf.hansson@linaro.org \
--cc=xzy.xu@rock-chips.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