From patchwork Fri Jul 15 01:54:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 9231017 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9A5116075D for ; Fri, 15 Jul 2016 01:54:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8917B2830A for ; Fri, 15 Jul 2016 01:54:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DAB128326; Fri, 15 Jul 2016 01:54:58 +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=-6.9 required=2.0 tests=BAYES_00,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 F3A0F2830A for ; Fri, 15 Jul 2016 01:54:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751471AbcGOBy5 (ORCPT ); Thu, 14 Jul 2016 21:54:57 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:44273 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751453AbcGOBy4 (ORCPT ); Thu, 14 Jul 2016 21:54:56 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OAC002JL2NG1B90@mailout3.samsung.com> for linux-mmc@vger.kernel.org; Fri, 15 Jul 2016 10:54:52 +0900 (KST) Received: from epcpsbgm1new.samsung.com ( [172.20.52.113]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id B2.6A.05174.C6248875; Fri, 15 Jul 2016 10:54:52 +0900 (KST) X-AuditID: cbfee68d-f79876d000001436-19-5788426c506c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id E6.A1.02101.C6248875; Fri, 15 Jul 2016 10:54:52 +0900 (KST) Received: from localhost.localdomain ([10.113.62.216]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OAC009WC2NGXK80@mmp2.samsung.com>; Fri, 15 Jul 2016 10:54:52 +0900 (KST) From: Jaehoon Chung To: linux-mmc@vger.kernel.org Cc: ulf.hansson@linaro.org, shawn.lin@rock-chips.com, Jaehoon Chung Subject: [PATCH 1/2] mmc: dw_mmc: set to MMC_CAP_ERASE by default Date: Fri, 15 Jul 2016 10:54:50 +0900 Message-id: <1468547691-4525-1-git-send-email-jh80.chung@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLLMWRmVeSWpSXmKPExsWyRsSkUDfHqSPc4M1CC4sbv9pYLY7872e0 uPNkPavF8bXhDiwed67tYfP4O2s/i0ffllWMHp83yQWwRHHZpKTmZJalFunbJXBlXGhqZyqY xFZx+odHA2MHaxcjJ4eEgInE85udzBC2mMSFe+vZuhi5OIQEVjBKnF47D65o065JrBCJWYwS 19a/Y4RwfjBKLL96jwWkik1AR2L7t+NMILaIgKzEzz8X2EBsZoE4iUVHf7KD2MICjhJrHvUw gtgsAqoSbyduBKvhFXCVOPmvC2qbnMTJY5Oh7PtsEq1NERD1AhLfJh8C2sUBFJeV2HQA6mpJ iYMrbrBMYBRcwMiwilE0tSC5oDgpvchQrzgxt7g0L10vOT93EyMwFE//e9a7g/H2AetDjAIc jEo8vBbGHeFCrIllxZW5hxhNgTZMZJYSTc4HBnxeSbyhsZmRhamJqbGRuaWZkjivot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: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected 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 This flag needs to use the trim/discard/erase commands. dwmmc controller enables this flag by default. Signed-off-by: Jaehoon Chung Reviewed-by: Shawn Lin --- drivers/mmc/host/dw_mmc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 9fab5ed..d16de19 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2604,6 +2604,12 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) if (host->pdata->caps) mmc->caps = host->pdata->caps; + /* + * Support MMC_CAP_ERASE by default. + * It needs to use trim/discard/erase commands. + */ + mmc->caps |= MMC_CAP_ERASE; + if (host->pdata->pm_caps) mmc->pm_caps = host->pdata->pm_caps;