linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: host: sdhci-sprd: Set the missing MMC_CAP_WAIT_WHILE_BUSY flag
@ 2020-02-24  9:08 Baolin Wang
  2020-02-27 13:19 ` Adrian Hunter
  2020-03-04 15:34 ` Ulf Hansson
  0 siblings, 2 replies; 4+ messages in thread
From: Baolin Wang @ 2020-02-24  9:08 UTC (permalink / raw)
  To: adrian.hunter, ulf.hansson
  Cc: orsonzhai, zhang.lyra, baolin.wang7, linux-mmc, linux-kernel

The Spreadtrum host controller supports HW busy detection for I/O
operations, which means when the host gets a transfer complete event,
that always indicates the busy signal is released. Thus we can set
the MMC_CAP_WAIT_WHILE_BUSY flag to remove some redundant software
busy polling.

Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
---
 drivers/mmc/host/sdhci-sprd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
index d346223..2ab42c5 100644
--- a/drivers/mmc/host/sdhci-sprd.c
+++ b/drivers/mmc/host/sdhci-sprd.c
@@ -556,7 +556,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
 		sdhci_sprd_voltage_switch;
 
 	host->mmc->caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED |
-		MMC_CAP_ERASE | MMC_CAP_CMD23;
+		MMC_CAP_ERASE | MMC_CAP_CMD23 | MMC_CAP_WAIT_WHILE_BUSY;
 	ret = mmc_of_parse(host->mmc);
 	if (ret)
 		goto pltfm_free;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: host: sdhci-sprd: Set the missing MMC_CAP_WAIT_WHILE_BUSY flag
  2020-02-24  9:08 [PATCH] mmc: host: sdhci-sprd: Set the missing MMC_CAP_WAIT_WHILE_BUSY flag Baolin Wang
@ 2020-02-27 13:19 ` Adrian Hunter
  2020-03-04 15:34 ` Ulf Hansson
  1 sibling, 0 replies; 4+ messages in thread
From: Adrian Hunter @ 2020-02-27 13:19 UTC (permalink / raw)
  To: Baolin Wang, ulf.hansson; +Cc: orsonzhai, zhang.lyra, linux-mmc, linux-kernel

On 24/02/20 11:08 am, Baolin Wang wrote:
> The Spreadtrum host controller supports HW busy detection for I/O
> operations, which means when the host gets a transfer complete event,
> that always indicates the busy signal is released. Thus we can set
> the MMC_CAP_WAIT_WHILE_BUSY flag to remove some redundant software
> busy polling.
> 
> Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci-sprd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
> index d346223..2ab42c5 100644
> --- a/drivers/mmc/host/sdhci-sprd.c
> +++ b/drivers/mmc/host/sdhci-sprd.c
> @@ -556,7 +556,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
>  		sdhci_sprd_voltage_switch;
>  
>  	host->mmc->caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED |
> -		MMC_CAP_ERASE | MMC_CAP_CMD23;
> +		MMC_CAP_ERASE | MMC_CAP_CMD23 | MMC_CAP_WAIT_WHILE_BUSY;
>  	ret = mmc_of_parse(host->mmc);
>  	if (ret)
>  		goto pltfm_free;
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: host: sdhci-sprd: Set the missing MMC_CAP_WAIT_WHILE_BUSY flag
  2020-02-24  9:08 [PATCH] mmc: host: sdhci-sprd: Set the missing MMC_CAP_WAIT_WHILE_BUSY flag Baolin Wang
  2020-02-27 13:19 ` Adrian Hunter
@ 2020-03-04 15:34 ` Ulf Hansson
  2020-03-05  1:16   ` Baolin Wang
  1 sibling, 1 reply; 4+ messages in thread
From: Ulf Hansson @ 2020-03-04 15:34 UTC (permalink / raw)
  To: Baolin Wang
  Cc: Adrian Hunter, Orson Zhai, Chunyan Zhang, linux-mmc,
	Linux Kernel Mailing List

On Mon, 24 Feb 2020 at 10:09, Baolin Wang <baolin.wang7@gmail.com> wrote:
>
> The Spreadtrum host controller supports HW busy detection for I/O
> operations, which means when the host gets a transfer complete event,

I assume HW busy detection also works for R1B commands, so I am adding
that information to changelog to clarify this.

Please have a look at the next branch to see that it looks good to you.

> that always indicates the busy signal is released. Thus we can set
> the MMC_CAP_WAIT_WHILE_BUSY flag to remove some redundant software
> busy polling.
>
> Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>

So, applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-sprd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
> index d346223..2ab42c5 100644
> --- a/drivers/mmc/host/sdhci-sprd.c
> +++ b/drivers/mmc/host/sdhci-sprd.c
> @@ -556,7 +556,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
>                 sdhci_sprd_voltage_switch;
>
>         host->mmc->caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED |
> -               MMC_CAP_ERASE | MMC_CAP_CMD23;
> +               MMC_CAP_ERASE | MMC_CAP_CMD23 | MMC_CAP_WAIT_WHILE_BUSY;
>         ret = mmc_of_parse(host->mmc);
>         if (ret)
>                 goto pltfm_free;
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mmc: host: sdhci-sprd: Set the missing MMC_CAP_WAIT_WHILE_BUSY flag
  2020-03-04 15:34 ` Ulf Hansson
@ 2020-03-05  1:16   ` Baolin Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Baolin Wang @ 2020-03-05  1:16 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Adrian Hunter, Orson Zhai, Chunyan Zhang, linux-mmc,
	Linux Kernel Mailing List

Hi Ulf,

On Wed, Mar 4, 2020 at 11:35 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:
>
> On Mon, 24 Feb 2020 at 10:09, Baolin Wang <baolin.wang7@gmail.com> wrote:
> >
> > The Spreadtrum host controller supports HW busy detection for I/O
> > operations, which means when the host gets a transfer complete event,
>
> I assume HW busy detection also works for R1B commands, so I am adding
> that information to changelog to clarify this.
>
> Please have a look at the next branch to see that it looks good to you.

Looks good to me. Thanks for your help.

>
> > that always indicates the busy signal is released. Thus we can set
> > the MMC_CAP_WAIT_WHILE_BUSY flag to remove some redundant software
> > busy polling.
> >
> > Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
>
> So, applied for next, thanks!
>
> Kind regards
> Uffe
>
>
> > ---
> >  drivers/mmc/host/sdhci-sprd.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
> > index d346223..2ab42c5 100644
> > --- a/drivers/mmc/host/sdhci-sprd.c
> > +++ b/drivers/mmc/host/sdhci-sprd.c
> > @@ -556,7 +556,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
> >                 sdhci_sprd_voltage_switch;
> >
> >         host->mmc->caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED |
> > -               MMC_CAP_ERASE | MMC_CAP_CMD23;
> > +               MMC_CAP_ERASE | MMC_CAP_CMD23 | MMC_CAP_WAIT_WHILE_BUSY;
> >         ret = mmc_of_parse(host->mmc);
> >         if (ret)
> >                 goto pltfm_free;
> > --
> > 1.9.1
> >



-- 
Baolin Wang

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-05  1:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24  9:08 [PATCH] mmc: host: sdhci-sprd: Set the missing MMC_CAP_WAIT_WHILE_BUSY flag Baolin Wang
2020-02-27 13:19 ` Adrian Hunter
2020-03-04 15:34 ` Ulf Hansson
2020-03-05  1:16   ` Baolin Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).