8 #ifndef OPENOCD_FLASH_NOR_CFI_H
9 #define OPENOCD_FLASH_NOR_CFI_H
11 #define CFI_STATUS_POLL_MASK_DQ5_DQ6_DQ7 0xE0
12 #define CFI_STATUS_POLL_MASK_DQ6_DQ7 0xC0
165 #define CFI_MFR_AMD 0x0001
166 #define CFI_MFR_FUJITSU 0x0004
167 #define CFI_MFR_ATMEL 0x001F
168 #define CFI_MFR_ST 0x0020
169 #define CFI_MFR_AMIC 0x0037
170 #define CFI_MFR_SST 0x00BF
171 #define CFI_MFR_MX 0x00C2
172 #define CFI_MFR_EON 0x007F
174 #define CFI_MFR_ANY 0xffff
175 #define CFI_ID_ANY 0xffff
177 #define CFI_MAX_BUS_WIDTH 4
178 #define CFI_MAX_CHIP_WIDTH 4
uint32_t cfi_flash_address(struct flash_bank *bank, int sector, uint32_t offset)
int cfi_write_word(struct flash_bank *bank, uint8_t *word, uint32_t address)
int cfi_protect_check(struct flash_bank *bank)
int cfi_probe(struct flash_bank *bank)
int cfi_auto_probe(struct flash_bank *bank)
int cfi_get_info(struct flash_bank *bank, struct command_invocation *cmd)
int cfi_reset(struct flash_bank *bank)
int cfi_target_read_memory(struct flash_bank *bank, target_addr_t addr, uint32_t count, uint8_t *buffer)
int cfi_protect(struct flash_bank *bank, int set, unsigned int first, unsigned int last)
int cfi_send_command(struct flash_bank *bank, uint8_t cmd, uint32_t address)
int cfi_flash_bank_cmd(struct flash_bank *bank, unsigned int argc, const char **argv)
int cfi_spansion_wait_status_busy(struct flash_bank *bank, int timeout)
int cfi_erase(struct flash_bank *bank, unsigned int first, unsigned int last)
int cfi_spansion_unlock_seq(struct flash_bank *bank)
target_addr_t addr
Start address to search for the control block.
void(* fixup)(struct flash_bank *bank, const void *param)
uint8_t block_erase_timeout_typ
unsigned int buf_write_timeout
uint8_t num_erase_regions
int(* read_mem)(struct flash_bank *bank, target_addr_t addr, uint32_t count, uint8_t *buffer)
uint8_t chip_erase_timeout_max
uint16_t max_buf_write_size
unsigned int block_erase_timeout
uint32_t * erase_region_info
uint8_t word_write_timeout_max
uint8_t word_write_timeout_typ
unsigned int chip_erase_timeout
enum target_endianness endianness
uint8_t buf_write_timeout_typ
uint8_t chip_erase_timeout_typ
uint8_t buf_write_timeout_max
int(* write_mem)(struct flash_bank *bank, target_addr_t addr, uint32_t count, const uint8_t *buffer)
uint8_t block_erase_timeout_max
unsigned int word_write_timeout
uint16_t blk_status_reg_mask
uint8_t user_prot_reg_size
uint8_t fact_prot_reg_size
uint8_t num_protection_fields
uint8_t suspend_cmd_support
uint8_t tmp_blk_unprotected
When run_command is called, a new instance will be created on the stack, filled with the proper value...
Provides details of a flash bank, available either on-chip or through a major interface.