diff mbox series

mmc: mxs-mmc: Enable MMC_CAP_ERASE

Message ID 1552580302-11393-1-git-send-email-stefan.wahren@i2se.com (mailing list archive)
State New, archived
Headers show
Series mmc: mxs-mmc: Enable MMC_CAP_ERASE | expand

Commit Message

Stefan Wahren March 14, 2019, 4:18 p.m. UTC
According to the i.MX23/28 reference manuals both mmc interfaces support
the MMC_ERASE command. So enable this capability in the driver to allow
erase/discard/trim requests.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/mmc/host/mxs-mmc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Fabio Estevam March 15, 2019, 11:47 a.m. UTC | #1
On Thu, Mar 14, 2019 at 1:18 PM Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> According to the i.MX23/28 reference manuals both mmc interfaces support
> the MMC_ERASE command. So enable this capability in the driver to allow
> erase/discard/trim requests.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Reviewed-by: Fabio Estevam <festevam@gmail.com>
Ulf Hansson March 18, 2019, 10:52 a.m. UTC | #2
On Thu, 14 Mar 2019 at 17:18, Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> According to the i.MX23/28 reference manuals both mmc interfaces support
> the MMC_ERASE command. So enable this capability in the driver to allow
> erase/discard/trim requests.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/mxs-mmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
> index 4f06fb0..c021d43 100644
> --- a/drivers/mmc/host/mxs-mmc.c
> +++ b/drivers/mmc/host/mxs-mmc.c
> @@ -648,7 +648,8 @@ static int mxs_mmc_probe(struct platform_device *pdev)
>         /* set mmc core parameters */
>         mmc->ops = &mxs_mmc_ops;
>         mmc->caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED |
> -                   MMC_CAP_SDIO_IRQ | MMC_CAP_NEEDS_POLL | MMC_CAP_CMD23;
> +                   MMC_CAP_SDIO_IRQ | MMC_CAP_NEEDS_POLL | MMC_CAP_CMD23 |
> +                   MMC_CAP_ERASE;
>
>         host->broken_cd = of_property_read_bool(np, "broken-cd");
>
> --
> 2.7.4
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c
index 4f06fb0..c021d43 100644
--- a/drivers/mmc/host/mxs-mmc.c
+++ b/drivers/mmc/host/mxs-mmc.c
@@ -648,7 +648,8 @@  static int mxs_mmc_probe(struct platform_device *pdev)
 	/* set mmc core parameters */
 	mmc->ops = &mxs_mmc_ops;
 	mmc->caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED |
-		    MMC_CAP_SDIO_IRQ | MMC_CAP_NEEDS_POLL | MMC_CAP_CMD23;
+		    MMC_CAP_SDIO_IRQ | MMC_CAP_NEEDS_POLL | MMC_CAP_CMD23 |
+		    MMC_CAP_ERASE;
 
 	host->broken_cd = of_property_read_bool(np, "broken-cd");