From patchwork Fri Nov 28 09:10:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Santa Cruz X-Patchwork-Id: 415822 X-Patchwork-Delegate: panto@antoniou-consulting.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 8C26314019D for ; Fri, 28 Nov 2014 20:37:30 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 67C3E4B825; Fri, 28 Nov 2014 10:36:35 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dcEaSd0Y-er1; Fri, 28 Nov 2014 10:36:35 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 268A94B7C4; Fri, 28 Nov 2014 10:35:47 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EC1B74B6A7 for ; Fri, 28 Nov 2014 10:27:41 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RoehhusAgP-i for ; Fri, 28 Nov 2014 10:27:41 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1on0060.outbound.protection.outlook.com [157.56.112.60]) by theia.denx.de (Postfix) with ESMTPS id 15B3B4B6AF for ; Fri, 28 Nov 2014 10:27:39 +0100 (CET) Received: from localhost.localdomain (212.147.27.179) by AMSPR01MB118.eurprd01.prod.exchangelabs.com (10.242.92.19) with Microsoft SMTP Server (TLS) id 15.1.26.15; Fri, 28 Nov 2014 09:11:34 +0000 From: Diego Santa Cruz To: Date: Fri, 28 Nov 2014 10:10:38 +0100 Message-ID: <1417165845-30960-12-git-send-email-Diego.SantaCruz@spinetix.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1417165845-30960-1-git-send-email-Diego.SantaCruz@spinetix.com> References: <1417165845-30960-1-git-send-email-Diego.SantaCruz@spinetix.com> MIME-Version: 1.0 X-Originating-IP: [212.147.27.179] X-ClientProxiedBy: DB3PR01CA0063.eurprd01.prod.exchangelabs.com (10.242.133.166) To AMSPR01MB118.eurprd01.prod.exchangelabs.com (10.242.92.19) X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:AMSPR01MB118; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:AMSPR01MB118; X-Forefront-PRVS: 04097B7F7F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(189002)(199003)(46102003)(106356001)(87976001)(50226001)(87286001)(2351001)(229853001)(105586002)(110136001)(107046002)(97736003)(4396001)(88136002)(95666004)(89996001)(122386002)(77096003)(77156002)(62966003)(99396003)(120916001)(104166001)(42186005)(101416001)(102836001)(31966008)(86362001)(575784001)(93916002)(66066001)(92726001)(48376002)(21056001)(92566001)(36756003)(64706001)(76176999)(40100003)(50986999)(20776003)(47776003)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:AMSPR01MB118; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:AMSPR01MB118; X-OriginatorOrg: spinetix.com X-Mailman-Approved-At: Fri, 28 Nov 2014 10:35:25 +0100 Cc: panto@antoniou-consulting.com Subject: [U-Boot] [PATCH 11/18] mmc: show the erase group size and HC WP group size in mmcinfo output X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This adds the erase group size and high-capacity WP group size to mmcinfo's output. The erase group size is necessary to properly align erase requests on eMMC. The high-capacity WP group size is necessary to properly align partitions on eMMC. --- common/cmd_mmc.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index aa5ba0e..7b7167c 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -94,9 +94,16 @@ static void print_mmcinfo(struct mmc *mmc) printf("Bus Width: %d-bit\n", mmc->bus_width); + puts("Erase Group Size: "); + print_size(((u64)mmc->erase_grp_size) << 9, "\n"); + if (!IS_SD(mmc) && (mmc->version >= MMC_VERSION_4_41)) { bool has_enh = (mmc->part_support & ENHNCD_SUPPORT) != 0; bool usr_enh = has_enh && (mmc->part_attr & EXT_CSD_ENH_USR); + + puts("HC WP Group Size: "); + print_size(((u64)mmc->hc_wp_grp_size) << 9, "\n"); + puts("User Capacity: "); print_size(mmc->capacity_user, usr_enh ? " ENH\n" : "\n"); if (usr_enh) { @@ -105,10 +112,13 @@ static void print_mmcinfo(struct mmc *mmc) puts("User Enhanced Size: "); print_size(mmc->enh_user_size, "\n"); } + puts("Boot Capacity: "); print_size(mmc->capacity_boot, has_enh ? " ENH\n" : "\n"); + puts("RPMB Capacity: "); print_size(mmc->capacity_rpmb, has_enh ? " ENH\n" : "\n"); + for (i = 0; i < ARRAY_SIZE(mmc->capacity_gp); i++) { bool is_enh = has_enh && (mmc->part_attr & EXT_CSD_ENH_GP(i));