From patchwork Thu Mar 14 16:18:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10853275 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B09AB1515 for ; Thu, 14 Mar 2019 16:19:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B95129ABE for ; Thu, 14 Mar 2019 16:19:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E25429AEA; Thu, 14 Mar 2019 16:19:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C23429ABE for ; Thu, 14 Mar 2019 16:19:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726889AbfCNQTF (ORCPT ); Thu, 14 Mar 2019 12:19:05 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:43771 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726971AbfCNQTF (ORCPT ); Thu, 14 Mar 2019 12:19:05 -0400 Received: from stefan-Vostro-260.fritz.box ([109.104.41.13]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M2w8Y-1h3M4P3Czk-003KP8; Thu, 14 Mar 2019 17:18:53 +0100 From: Stefan Wahren To: Ulf Hansson , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: kernel@pengutronix.de, linux-imx@nxp.com, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH] mmc: mxs-mmc: Enable MMC_CAP_ERASE Date: Thu, 14 Mar 2019 17:18:22 +0100 Message-Id: <1552580302-11393-1-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 X-Provags-ID: V03:K1:5zx6xX5LTWMXMNntdk6sWTR71mVuMUSKwe9VraQWMSXzbm2eOEJ Hbuo0X060lRCz5mvU+fMVdDvJzG2UhKUCS05ZkIgzL5OLDYfwl1wMh+RxDxRCGm2dKrw1Kh eHNnOwCy3shAMOKdz/0jdlxUoiKJoOm7DSZ38xYG4bOYv/ap1qZPJ10/PENHO48CP6QV9RH UaVHWERl/TR7ICabd4H7g== X-UI-Out-Filterresults: notjunk:1;V03:K0:5wjzNlwV244=:FFTimr3DfdxkucpOvUmjpS IIhfPR2nU7xVd4Q8JTD6PCPdKctMnGUYAXwEJxYEdBKujA0ILMXLW98MmNI+ONeHwt/7ANVMp X4NPv9u6TDsIyYyFprMHepsIgSUhz5VbWuOlWgG3gvD877iUOXRMRprOG4R+4McphGLlzADw+ huNHTnJV+sveOT+FNZ6dFicNI8yepOx/8VKffOGotcX10d5xzZbqELFl0a0ffoniGS6XcfYLe 6J+xVjj4NMYlf5pqboclmQl5wuRliU/gmboFVdaWkNmKwx8WoJqBTMZfoMqp/13WvS4Ypoyww YjK0SLJuT+ukMlVbKuje3XLTohvWqkW4FwjNAa3mZ3d7Ybu1zzbhYMLUrXLsc1BhJdhIq/5SB f9V5u2vsaM8Vjws536bTUd4Jg0oIOemqZbO9iRAYOoAg60VA2409pv7mOBk/YD8IhT+rKjr/B L3EbBYuZaS9jWJ/UwLiK04Ndgdp+P84JqozLkj5m7+QTOzXJeNzCWkWUWK5sy/8PSry6r3lVR ePGZhf4X5w+cglLPg61AAfg9AYzeTxJstUFQ9Hi7D/E/1dCvLZLJPLw+cxo4QGvgvT10DNyeY U96OjtGTa+3siwjqDeuazb6Sivt/gzrIV2W9J2Ec/EHx/yyEPtxtICxDVBFeer+Ko1o95DCMl wjd4lxQ4hQkAWHLwRtavx1Kic0BF5JvRgS0ePhgfkPgWF+AQb6OdLkK6CEyRIpCiHJEfaWXZ5 uVkKDOZi1aYjg1rSGWlTLeLk2+TeD08BW0V9uNT2wP+JqgHIrFZHLasvfa0= Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Fabio Estevam --- 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");