From patchwork Thu Dec 6 14:44:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 204255 X-Patchwork-Delegate: sr@denx.de 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 5C69C2C0314 for ; Fri, 7 Dec 2012 01:44:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C87A54A276; Thu, 6 Dec 2012 15:44:39 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 aUBq0tWC1jZU; Thu, 6 Dec 2012 15:44:39 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 48A504A277; Thu, 6 Dec 2012 15:44:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 351B64A261 for ; Thu, 6 Dec 2012 15:44:30 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 npAPLPd7ghQZ for ; Thu, 6 Dec 2012 15:44:29 +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 mo-p05-ob.rzone.de (mo-p05-ob.rzone.de [81.169.146.181]) by theia.denx.de (Postfix) with ESMTPS id 95DB74A274 for ; Thu, 6 Dec 2012 15:44:27 +0100 (CET) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohdvpEkce+Ub4+ReKfHD+mCZCG5UI/9A== X-RZG-CLASS-ID: mo05 Received: from ubuntu-2012.fritz.box (p57B942D7.dip.t-dialin.net [87.185.66.215]) by smtp.strato.de (jored mo25) (RZmta 31.7 DYNA|AUTH) with ESMTPA id 20750eoB6DfZxO ; Thu, 6 Dec 2012 15:44:22 +0100 (CET) From: Stefan Roese To: u-boot@lists.denx.de Date: Thu, 6 Dec 2012 15:44:12 +0100 Message-Id: <1354805052-32347-4-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.8.0.1 In-Reply-To: <1354805052-32347-1-git-send-email-sr@denx.de> References: <1354805052-32347-1-git-send-email-sr@denx.de> Cc: Holger Brunck Subject: [U-Boot] [PATCH 4/4] cfi_flash: Report Advanced Sector Protection (PPB) with flinfo cmd X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Report the usage of the Advanced Sector Protection (PPB) to the user upon 'flinfo' command. E.g: Bank # 1: CFI conformant flash (16 x 16) Size: 64 MB in 512 Sectors AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E2301 Advanced Sector Protection (PPB) enabled Erase timeout: 16384 ms, write timeout: 2 ms Buffer write timeout: 5 ms, buffer size: 32 bytes Sector Start Addresses: FC000000 E FC020000 E RO FC040000 E FC060000 E FC080000 E ... Signed-off-by: Stefan Roese Cc: Anatolij Gustschin Cc: Holger Brunck Tested-by: Holger Brunck --- drivers/mtd/cfi_flash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 5176d62..adb0a9b 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -1247,6 +1247,8 @@ void flash_print_info (flash_info_t * info) printf(info->chipwidth == FLASH_CFI_16BIT ? "%04X" : "%02X", info->device_id2); } + if ((info->vendor == CFI_CMDSET_AMD_STANDARD) && (info->legacy_unlock)) + printf("\n Advanced Sector Protection (PPB) enabled"); printf ("\n Erase timeout: %ld ms, write timeout: %ld ms\n", info->erase_blk_tout, info->write_tout);