OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | eneispif_flash_bank |
Macros | |
#define | CFG_READ 0x372 |
#define | CFG_WRITE 0x371 |
#define | ISPI_CTRL_BASE 0x50101000 |
#define | ISPIADDR 0x0008 |
#define | ISPICFG 0x0000 |
#define | ISPICMD 0x000C |
#define | ISPIDAT 0x0100 |
#define | ISPISTS 0x0004 |
#define | ISPISTS_BUSY BIT(0) |
#define | STATUS1_QE BIT(1) |
Functions | |
static int | eneispi_erase_sector (struct flash_bank *bank, int sector) |
static int | eneispif_auto_probe (struct flash_bank *bank) |
static int | eneispif_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | eneispif_probe (struct flash_bank *bank) |
static int | eneispif_protect (struct flash_bank *bank, int set, unsigned int first, unsigned int last) |
static int | eneispif_protect_check (struct flash_bank *bank) |
static int | eneispif_read_flash_id (struct flash_bank *bank, uint32_t *id) |
static int | eneispif_read_reg (struct flash_bank *bank, uint32_t *value, target_addr_t address) |
static int | eneispif_wait (struct flash_bank *bank) |
static int | eneispif_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | eneispif_write_reg (struct flash_bank *bank, target_addr_t address, uint32_t value) |
FLASH_BANK_COMMAND_HANDLER (eneispif_flash_bank_command) | |
static int | get_eneispif_info (struct flash_bank *bank, struct command_invocation *cmd) |
Variables | |
struct flash_device | ene_flash_device |
const struct flash_driver | eneispif_flash |
#define CFG_READ 0x372 |
Definition at line 28 of file eneispif.c.
#define CFG_WRITE 0x371 |
Definition at line 29 of file eneispif.c.
#define ISPI_CTRL_BASE 0x50101000 |
Definition at line 31 of file eneispif.c.
#define ISPIADDR 0x0008 |
Definition at line 21 of file eneispif.c.
#define ISPICFG 0x0000 |
Definition at line 19 of file eneispif.c.
#define ISPICMD 0x000C |
Definition at line 22 of file eneispif.c.
#define ISPIDAT 0x0100 |
Definition at line 23 of file eneispif.c.
#define ISPISTS 0x0004 |
Definition at line 20 of file eneispif.c.
#define ISPISTS_BUSY BIT(0) |
Definition at line 25 of file eneispif.c.
#define STATUS1_QE BIT(1) |
Definition at line 26 of file eneispif.c.
|
static |
Definition at line 129 of file eneispif.c.
References bank, CFG_WRITE, eneispif_flash_bank::dev, eneispif_read_reg(), eneispif_wait(), eneispif_write_reg(), flash_device::erase_cmd, ERROR_OK, ISPIADDR, ISPICFG, ISPICMD, offset, and SPIFLASH_WRITE_ENABLE.
Referenced by eneispif_erase().
|
static |
Definition at line 388 of file eneispif.c.
References bank, eneispif_probe(), ERROR_OK, and eneispif_flash_bank::probed.
|
static |
Definition at line 160 of file eneispif.c.
References bank, eneispif_flash_bank::dev, eneispi_erase_sector(), flash_device::erase_cmd, ERROR_FAIL, ERROR_FLASH_BANK_NOT_PROBED, ERROR_FLASH_OPER_UNSUPPORTED, ERROR_FLASH_SECTOR_INVALID, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_ERROR, eneispif_flash_bank::probed, target::state, and TARGET_HALTED.
|
static |
Definition at line 329 of file eneispif.c.
References bank, CFG_READ, eneispif_flash_bank::ctrl_base, eneispif_flash_bank::dev, eneispif_flash_bank::dev_id, ene_flash_device, eneispif_read_flash_id(), eneispif_write_reg(), ERROR_FAIL, ERROR_OK, id, flash_sector::is_erased, flash_sector::is_protected, ISPICFG, LOG_ERROR, LOG_INFO, LOG_WARNING, flash_device::name, flash_sector::offset, eneispif_flash_bank::probed, flash_device::sectorsize, flash_sector::size, flash_device::size_in_bytes, and TARGET_ADDR_FMT.
Referenced by eneispif_auto_probe().
|
static |
Definition at line 202 of file eneispif.c.
|
static |
Definition at line 396 of file eneispif.c.
References ERROR_OK.
|
static |
Definition at line 288 of file eneispif.c.
References bank, buffer, CFG_WRITE, eneispif_flash_bank::ctrl_base, eneispif_read_reg(), eneispif_wait(), eneispif_write_reg(), ERROR_OK, ERROR_TARGET_NOT_HALTED, ISPICFG, ISPICMD, ISPIDAT, LOG_DEBUG, LOG_ERROR, SPIFLASH_READ_ID, target::state, TARGET_HALTED, and target_read_buffer().
Referenced by eneispif_probe().
|
static |
Definition at line 74 of file eneispif.c.
References bank, eneispif_flash_bank::ctrl_base, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, and target_read_u32().
Referenced by eneispi_erase_sector(), eneispif_read_flash_id(), eneispif_wait(), and eneispif_write().
|
static |
Definition at line 106 of file eneispif.c.
References bank, eneispif_read_reg(), ERROR_FAIL, ERROR_OK, ERROR_TARGET_TIMEOUT, ISPISTS, ISPISTS_BUSY, LOG_ERROR, start, status, and timeval_ms().
Referenced by eneispi_erase_sector(), eneispif_read_flash_id(), and eneispif_write().
|
static |
Definition at line 210 of file eneispif.c.
References bank, buffer, CFG_WRITE, count, eneispif_flash_bank::ctrl_base, eneispif_flash_bank::dev, eneispif_read_reg(), eneispif_wait(), eneispif_write_reg(), ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, ISPIADDR, ISPICFG, ISPICMD, ISPIDAT, LOG_DEBUG, LOG_ERROR, LOG_WARNING, offset, flash_device::pagesize, flash_device::pprog_cmd, flash_device::size_in_bytes, SPIFLASH_DEF_PAGESIZE, SPIFLASH_WRITE_ENABLE, target::state, TARGET_HALTED, and target_write_buffer().
|
static |
Definition at line 90 of file eneispif.c.
References bank, eneispif_flash_bank::ctrl_base, ERROR_OK, LOG_DEBUG, LOG_ERROR, TARGET_ADDR_FMT, and target_write_u32().
Referenced by eneispi_erase_sector(), eneispif_probe(), eneispif_read_flash_id(), and eneispif_write().
FLASH_BANK_COMMAND_HANDLER | ( | eneispif_flash_bank_command | ) |
Definition at line 47 of file eneispif.c.
References bank, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_ADDRESS, eneispif_flash_bank::ctrl_base, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, ISPI_CTRL_BASE, LOG_DEBUG, LOG_ERROR, LOG_INFO, eneispif_flash_bank::probed, and TARGET_ADDR_FMT.
|
static |
Definition at line 402 of file eneispif.c.
struct flash_device ene_flash_device |
Definition at line 1 of file eneispif.c.
Referenced by eneispif_probe().
const struct flash_driver eneispif_flash |
Definition at line 402 of file eneispif.c.