summaryrefslogtreecommitdiffstats
path: root/include/flash.h
diff options
context:
space:
mode:
authorMichael Schwingen <michael@schwingen.org>2007-12-07 23:35:02 +0100
committerStefan Roese <sr@denx.de>2007-12-08 08:16:50 +0100
commit81b20ccc2d795ae9a1199db5a50ad9c28d1e4d22 (patch)
treee868eac227ddea35a626f01c894918c0776eb781 /include/flash.h
parent41be969f4957115ed7b1fe8b890bfaee99d7a7a2 (diff)
downloadtalos-obmc-uboot-81b20ccc2d795ae9a1199db5a50ad9c28d1e4d22.tar.gz
talos-obmc-uboot-81b20ccc2d795ae9a1199db5a50ad9c28d1e4d22.zip
CFI: support JEDEC flash roms in CFI-flash framework
The following patch adds support for non-CFI flash ROMS, by hooking into the CFI flash code and using most of its code, as recently discussed here in the thread "Mixing CFI and non-CFI flashs". Signed-off-by: Michael Schwingen <michael@schwingen.org> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include/flash.h')
-rw-r--r--include/flash.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/flash.h b/include/flash.h
index b0bf733f18..6e252ccad8 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -52,6 +52,9 @@ typedef struct {
ushort ext_addr; /* extended query table address */
ushort cfi_version; /* cfi version */
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;
@@ -101,6 +104,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():
*/
OpenPOWER on IntegriCloud