From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Schwingen Date: Mon, 26 Nov 2007 19:57:16 +0100 Subject: [U-Boot-Users] PATCH (resend): support JEDEC flash roms in CFI-flash framework In-Reply-To: <20071124174500.GA17159@discworld.dascon.de> References: <20071112202311.GB29521@discworld.dascon.de> <4739C21C.1090107@semihalf.com> <20071113185911.GA21337@discworld.dascon.de> <200711132156.47785.sr@denx.de> <20071124174500.GA17159@discworld.dascon.de> Message-ID: <20071126185716.GA9487@discworld.dascon.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Nov 24, 2007 at 06:45:01PM +0100, Michael Schwingen wrote: > Done - here is the complete patch again, plus description: Sorry, I missed the diff for flash.h: cu Michael Signed-off-by: Michael Schwingen diff --git a/include/flash.h b/include/flash.h index b0bf733..cd075f9 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,12 @@ 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 CFG_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(): */