From: "吳昊澄 Ricky" <ricky_wu@realtek.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rui Feng <rui_feng@realsil.com.cn>,
Rui Miguel Silva <rmfrfs@gmail.com>,
Doug Anderson <dianders@chromium.org>,
Lee Jones <lee.jones@linaro.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 1/2] mmc: rtsx: add delay before power on
Date: Wed, 13 Jan 2021 10:20:42 +0000 [thread overview]
Message-ID: <d71300e7cf6d4ad8b1e8e3c7430d2c58@realtek.com> (raw)
In-Reply-To: <CAPDyKFro-dWCOVx=a1BhEJ=J=Hj_+nU+FmTUZjkeAkCqtML=kA@mail.gmail.com>
> On Wed, 30 Dec 2020 at 10:04, <ricky_wu@realtek.com> wrote:
> >
> > From: Ricky Wu <ricky_wu@realtek.com>
> >
> > Make sure voltage below 0.5V before power on when do power cycle
> >
> > Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
> > ---
> > drivers/mmc/host/rtsx_pci_sdmmc.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c
> > b/drivers/mmc/host/rtsx_pci_sdmmc.c
> > index e6f5bbce5685..d21b99962b36 100644
> > --- a/drivers/mmc/host/rtsx_pci_sdmmc.c
> > +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
> > @@ -906,6 +906,8 @@ static int sd_power_on(struct realtek_pci_sdmmc
> *host)
> > if (host->power_state == SDMMC_POWER_ON)
> > return 0;
> >
> > + mdelay(100);
> > +
>
> Why exactly 100 ms? Can you at least add a comment about why in the code?
>
> Moreover, I think you should convert to use msleep() rather than mdelay.
>
Because we need to make sure voltage below 0.5V before power on
mmc-core will do quickly power cycle at recognition card phase,
we need at least 100ms to make our device voltage below 0.5V
I will change mdelay() to msleep()
> > rtsx_pci_init_cmd(pcr);
> > rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SELECT, 0x07,
> SD_MOD_SEL);
> > rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SHARE_MODE,
> > --
> > 2.17.1
> >
>
> Kind regards
> Uffe
>
> ------Please consider the environment before printing this e-mail.
next prev parent reply other threads:[~2021-01-13 10:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 9:04 ricky_wu
2020-12-30 9:04 ` [PATCH 2/2] mmc: rtsx: Add MMC_CAP2_NO_SDIO flag ricky_wu
2021-01-13 11:25 ` Ulf Hansson
2021-01-13 9:58 ` [PATCH 1/2] mmc: rtsx: add delay before power on Ulf Hansson
2021-01-13 10:20 ` 吳昊澄 Ricky [this message]
2021-01-13 10:57 ricky_wu
2021-01-13 13:07 ` 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=d71300e7cf6d4ad8b1e8e3c7430d2c58@realtek.com \
--to=ricky_wu@realtek.com \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=rmfrfs@gmail.com \
--cc=rui_feng@realsil.com.cn \
--cc=ulf.hansson@linaro.org \
/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
all inboxes | Powered by JetHome®