From patchwork Tue Jul 26 08:46:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyungmin Park X-Patchwork-Id: 1007542 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6Q8kEMe024133 for ; Tue, 26 Jul 2011 08:46:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751426Ab1GZIqN (ORCPT ); Tue, 26 Jul 2011 04:46:13 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:11668 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751337Ab1GZIqN (ORCPT ); Tue, 26 Jul 2011 04:46:13 -0400 Received: from epcpsbgm2.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LOX00BWPN0NMKQ0@mailout2.samsung.com> for linux-mmc@vger.kernel.org; Tue, 26 Jul 2011 17:46:11 +0900 (KST) X-AuditID: cbfee61b-b7c3dae000002cb8-69-4e2e7ed3cf26 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (MMPCPMTA) with SMTP id 30.76.11448.3DE7E2E4; Tue, 26 Jul 2011 17:46:11 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LOX00B93N0Z95@mmp2.samsung.com> for linux-mmc@vger.kernel.org; Tue, 26 Jul 2011 17:46:11 +0900 (KST) Received: from july ([165.213.219.111]) by TNRNDGASPAPP1.tn.corp.samsungelectronics.net with Microsoft SMTPSVC(6.0.3790.4675); Tue, 26 Jul 2011 17:46:31 +0900 Received: by july (sSMTP sendmail emulation); Tue, 26 Jul 2011 17:46:03 +0900 Date: Tue, 26 Jul 2011 17:46:03 +0900 From: Kyungmin Park Subject: [RFC] mmc: new discard support at mmc v4.5 To: linux-mmc@vger.kernel.org, Chris Ball Cc: jh80.chung@samsung.com Message-id: <20110726084603.GA15154@july> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-OriginalArrivalTime: 26 Jul 2011 08:46:32.0111 (UTC) FILETIME=[84AAD3F0:01CC4B70] X-Brightmail-Tracker: AAAAAA== Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 26 Jul 2011 08:46:14 +0000 (UTC) At mmc v4.5, it supports the DISCARD feature. It's different from trim and there's no check bit. currently it's only supported at v4.5. In trim mode, the controller can perform the actual erase at a convenient time. however, In discard, The controller can perform partial or full the actual erase at a convenient time. So in mmc v4.5, it's better to use the discard instead of trim. Please give opinions or comments. Thank you, Kyungmin Park --- -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index b8b1b7a..84f35a6 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -146,6 +146,7 @@ extern int mmc_switch(struct mmc_card *, u8, u8, u8, unsigned int); #define MMC_ERASE_ARG 0x00000000 #define MMC_SECURE_ERASE_ARG 0x80000000 #define MMC_TRIM_ARG 0x00000001 +#define MMC_DISCARD_ARG 0x00000003 #define MMC_SECURE_TRIM1_ARG 0x80000001 #define MMC_SECURE_TRIM2_ARG 0x80008000