Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Ricky WU <ricky_wu@realtek.com>
Cc: "ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	"kai.heng.feng@canonical.com" <kai.heng.feng@canonical.com>,
	"tommyhebb@gmail.com" <tommyhebb@gmail.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: rtsx: add 74 Clocks in power on flow
Date: Tue, 22 Feb 2022 15:18:03 +0100	[thread overview]
Message-ID: <YhTwm9yDEhjEXt6H@kroah.com> (raw)
In-Reply-To: <d28b6fb6649d472a809329876c3ac4bd@realtek.com>

On Tue, Feb 22, 2022 at 12:31:10PM +0000, Ricky WU wrote:
> > -----Original Message-----
> > From: gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>
> > Sent: Tuesday, February 22, 2022 4:59 PM
> > To: Ricky WU <ricky_wu@realtek.com>
> > Cc: ulf.hansson@linaro.org; kai.heng.feng@canonical.com;
> > tommyhebb@gmail.com; linux-mmc@vger.kernel.org;
> > linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH] mmc: rtsx: add 74 Clocks in power on flow
> > 
> > On Tue, Feb 22, 2022 at 08:48:30AM +0000, Ricky WU wrote:
> > > > -----Original Message-----
> > > > From: gregkh@linuxfoundation.org <gregkh@linuxfoundation.org>
> > > > Sent: Tuesday, February 22, 2022 3:42 PM
> > > > To: Ricky WU <ricky_wu@realtek.com>
> > > > Cc: ulf.hansson@linaro.org; kai.heng.feng@canonical.com;
> > > > tommyhebb@gmail.com; linux-mmc@vger.kernel.org;
> > > > linux-kernel@vger.kernel.org
> > > > Subject: Re: [PATCH] mmc: rtsx: add 74 Clocks in power on flow
> > > >
> > > > On Tue, Feb 22, 2022 at 07:27:52AM +0000, Ricky WU wrote:
> > > > > After 1ms stabilizing the voltage time add "Host provides at least
> > > > > 74 Clocks before issuing first command" that is spec definition
> > > >
> > > > You do have 72 columns to use here, no need to wrap this so tightly.
> > > >
> > >
> > > Ok...
> > > so I need to have next patch to fix this format?
> > 
> > Please do, because:
> > 
> > >
> > > > >
> > > > > Signed-off-by: Ricky Wu <ricky_wu@realtek.com>
> > > > > ---
> > > > >  drivers/mmc/host/rtsx_pci_sdmmc.c | 7 +++++++
> > > > >  1 file changed, 7 insertions(+)
> > > > >
> > > > > diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c
> > > > > b/drivers/mmc/host/rtsx_pci_sdmmc.c
> > > > > index 2a3f14afe9f8..e016d720e453 100644
> > > > > --- a/drivers/mmc/host/rtsx_pci_sdmmc.c
> > > > > +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c
> > > > > @@ -940,10 +940,17 @@ static int sd_power_on(struct
> > > > > realtek_pci_sdmmc
> > > > *host)
> > > > >  	if (err < 0)
> > > > >  		return err;
> > > > >
> > > > > +	mdelay(1);
> > > >
> > > > What is this delay for?
> > > >
> > >
> > > Spec definition, need to wait 1ms for voltage stable and below
> > > mdelay(5) is our device send 74 Clocks time
> > 
> > Clock cycles and mdelay() are not going to always stay the same, right?
> > 
> > I really have no idea what "74 clocks time" means, is this some specific timing
> > value for this hardware?  What is the units?  This needs to be documented
> > better in both the changelog and in the code.
> > 
> > thanks,
> > 
> 
> Please ref: https://www.sdcard.org/downloads/pls/ Version8

I can not download those specifications according to the license that
they ask me to abide by.

> And see the 6.4.1.2 Power Up Time of Host Figure 6-5: Power Up Diagram of Host
> mdelay(1) corresponds to Stable supply voltage
> mdelay(5) corresponds to Host provides at least 74 Clocks before issuing first command
> our device need 5ms to issue 74 Clocks

What is a "clock"?  The kernel works with time units, how does "5" equal
to 74?

thanks,

greg k-h

  reply	other threads:[~2022-02-22 14:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22  7:27 [PATCH] mmc: rtsx: add 74 Clocks in power on flow Ricky WU
2022-02-22  7:42 ` gregkh
2022-02-22  8:48   ` Ricky WU
2022-02-22  8:59     ` gregkh
2022-02-22 12:31       ` Ricky WU
2022-02-22 14:18         ` gregkh [this message]
2022-02-24  5:49           ` Ricky WU
2022-02-28 16:12 ` Ulf Hansson
2022-05-09  9:35   ` Christian Löhle
2022-05-09  9:47     ` gregkh
2022-05-09 10:12       ` Christian Löhle
2022-05-10  9:56         ` Ulf Hansson
2022-05-10 10:21           ` gregkh

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=YhTwm9yDEhjEXt6H@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ricky_wu@realtek.com \
    --cc=tommyhebb@gmail.com \
    --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