diff mbox

[U-Boot,4/4] cfi_flash: Report Advanced Sector Protection (PPB) with flinfo cmd

Message ID 1354805052-32347-4-git-send-email-sr@denx.de
State Awaiting Upstream
Delegated to: Stefan Roese
Headers show

Commit Message

Stefan Roese Dec. 6, 2012, 2:44 p.m. UTC
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 <sr@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Holger Brunck <holger.brunck@keymile.com>
---
 drivers/mtd/cfi_flash.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Holger Brunck Dec. 7, 2012, 9:20 a.m. UTC | #1
Hi Stefan,

On 12/06/2012 03:44 PM, Stefan Roese wrote:
> 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 <sr@denx.de>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Holger Brunck <holger.brunck@keymile.com>
> ---
>  drivers/mtd/cfi_flash.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Tested-by: Holger Brunck <holger.brunck@keymile.com>

Regards
Holger
diff mbox

Patch

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);