Merge branch 'lwmon5' of /home/wd/git/u-boot/projects
[platform/kernel/u-boot.git] / include / flash.h
index b0bf733..af8a7c0 100644 (file)
@@ -51,7 +51,10 @@ typedef struct {
        ushort  device_id2;             /* extended device id                   */
        ushort  ext_addr;               /* extended query table address         */
        ushort  cfi_version;            /* cfi version                          */
-       ushort  cfi_offset;             /* offset for cfi query                 */
+       ushort  cfi_offset;             /* offset for cfi query                 */
+       ulong   addr_unlock1;           /* unlock address 1 for AMD flash roms  */
+       ulong   addr_unlock2;           /* unlock address 2 for AMD flash roms  */
+       const char *name;               /* human-readable name                  */
 #endif
 } flash_info_t;
 
@@ -77,6 +80,7 @@ typedef struct {
 #define FLASH_CFI_X8           0x00
 #define FLASH_CFI_X16          0x01
 #define FLASH_CFI_X8X16                0x02
+#define FLASH_CFI_X16X32       0x05
 
 /* convert between bit value and numeric value */
 #define CFI_FLASH_SHIFT_WIDTH  3
@@ -101,6 +105,13 @@ extern void flash_read_user_serial(flash_info_t * info, void * buffer, int offse
 extern void flash_read_factory_serial(flash_info_t * info, void * buffer, int offset, int len);
 #endif /* CFG_FLASH_PROTECTION */
 
+#ifdef CONFIG_FLASH_CFI_LEGACY
+extern ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info);
+extern int jedec_flash_match(flash_info_t *info, ulong base);
+#define CFI_CMDSET_AMD_LEGACY          0xFFF0
+#endif
+
+
 /*-----------------------------------------------------------------------
  * return codes from flash_write():
  */