diff mbox series

mmc: host: sdhci-sprd: Set the missing MMC_CAP_WAIT_WHILE_BUSY flag

Message ID 96f16647f6a6e8cb058c44e46c61b122df027059.1582535202.git.baolin.wang7@gmail.com (mailing list archive)
State New, archived
Headers show
Series mmc: host: sdhci-sprd: Set the missing MMC_CAP_WAIT_WHILE_BUSY flag | expand

Commit Message

Baolin Wang Feb. 24, 2020, 9:08 a.m. UTC
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(-)

Comments

Adrian Hunter Feb. 27, 2020, 1:19 p.m. UTC | #1
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;
>
Ulf Hansson March 4, 2020, 3:34 p.m. UTC | #2
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
>
Baolin Wang March 5, 2020, 1:16 a.m. UTC | #3
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
> >
diff mbox series

Patch

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;