OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | mrvlqspi_flash_bank |
Macros | |
#define | ADDR 0x14 |
#define | BLOCK_ERASE_TIMEOUT (1000) |
#define | CHIP_ERASE_TIMEOUT (10000) |
#define | CNTL 0x0 /* QSPI_BASE + 0x0 */ |
#define | CONF 0x4 |
#define | CONF_MASK (0x7) |
#define | CONF_OFFSET (10) |
#define | DIN 0xc |
#define | DINCNT 0x20 |
#define | DOUT 0x8 |
#define | FIFO_FLUSH (1 << 9) |
#define | FIFO_FLUSH_TIMEOUT (1000) |
#define | HDRCNT 0x1c |
#define | INS_PAGE_PROGRAM 0x02 |
#define | INS_READ_STATUS 0x05 |
#define | INS_WRITE_DISABLE 0x04 |
#define | INS_WRITE_ENABLE 0x06 |
#define | INSTR 0x10 |
#define | QSPI_R_EN (0x0) |
#define | QSPI_SS_DISABLE (0x0) |
#define | QSPI_SS_ENABLE (0x1) |
#define | QSPI_TIMEOUT (1000) |
#define | QSPI_W_EN (0x1) |
#define | RDMODE 0x18 |
#define | RFIFO_EMPTY (1 << 4) |
#define | RW_EN (1 << 13) |
#define | SS_EN (1 << 0) |
#define | WFIFO_EMPTY (1 << 6) |
#define | WFIFO_FULL (1 << 7) |
#define | WRITE_DISABLE (0x0) |
#define | WRITE_ENABLE (0x1) |
#define | XFER_RDY (1 << 1) |
#define | XFER_START (1 << 15) |
#define | XFER_STOP (1 << 14) |
Variables | |
const struct flash_driver | mrvlqspi_flash |
#define ADDR 0x14 |
Definition at line 59 of file mrvlqspi.c.
#define BLOCK_ERASE_TIMEOUT (1000) |
Definition at line 34 of file mrvlqspi.c.
#define CHIP_ERASE_TIMEOUT (10000) |
Definition at line 35 of file mrvlqspi.c.
#define CNTL 0x0 /* QSPI_BASE + 0x0 */ |
Definition at line 54 of file mrvlqspi.c.
#define CONF 0x4 |
Definition at line 55 of file mrvlqspi.c.
#define CONF_MASK (0x7) |
Definition at line 46 of file mrvlqspi.c.
#define CONF_OFFSET (10) |
Definition at line 47 of file mrvlqspi.c.
#define DIN 0xc |
Definition at line 57 of file mrvlqspi.c.
#define DINCNT 0x20 |
Definition at line 62 of file mrvlqspi.c.
#define DOUT 0x8 |
Definition at line 56 of file mrvlqspi.c.
#define FIFO_FLUSH (1 << 9) |
Definition at line 42 of file mrvlqspi.c.
#define FIFO_FLUSH_TIMEOUT (1000) |
Definition at line 33 of file mrvlqspi.c.
#define HDRCNT 0x1c |
Definition at line 61 of file mrvlqspi.c.
#define INS_PAGE_PROGRAM 0x02 |
Definition at line 52 of file mrvlqspi.c.
#define INS_READ_STATUS 0x05 |
Definition at line 51 of file mrvlqspi.c.
#define INS_WRITE_DISABLE 0x04 |
Definition at line 50 of file mrvlqspi.c.
#define INS_WRITE_ENABLE 0x06 |
Definition at line 49 of file mrvlqspi.c.
#define INSTR 0x10 |
Definition at line 58 of file mrvlqspi.c.
#define QSPI_R_EN (0x0) |
Definition at line 25 of file mrvlqspi.c.
#define QSPI_SS_DISABLE (0x0) |
Definition at line 27 of file mrvlqspi.c.
#define QSPI_SS_ENABLE (0x1) |
Definition at line 28 of file mrvlqspi.c.
#define QSPI_TIMEOUT (1000) |
Definition at line 32 of file mrvlqspi.c.
#define QSPI_W_EN (0x1) |
Definition at line 26 of file mrvlqspi.c.
#define RDMODE 0x18 |
Definition at line 60 of file mrvlqspi.c.
#define RFIFO_EMPTY (1 << 4) |
Definition at line 39 of file mrvlqspi.c.
#define RW_EN (1 << 13) |
Definition at line 43 of file mrvlqspi.c.
#define SS_EN (1 << 0) |
Definition at line 37 of file mrvlqspi.c.
#define WFIFO_EMPTY (1 << 6) |
Definition at line 40 of file mrvlqspi.c.
#define WFIFO_FULL (1 << 7) |
Definition at line 41 of file mrvlqspi.c.
#define WRITE_DISABLE (0x0) |
Definition at line 29 of file mrvlqspi.c.
#define WRITE_ENABLE (0x1) |
Definition at line 30 of file mrvlqspi.c.
#define XFER_RDY (1 << 1) |
Definition at line 38 of file mrvlqspi.c.
#define XFER_START (1 << 15) |
Definition at line 45 of file mrvlqspi.c.
#define XFER_STOP (1 << 14) |
Definition at line 44 of file mrvlqspi.c.
FLASH_BANK_COMMAND_HANDLER | ( | mrvlqspi_flash_bank_command | ) |
Definition at line 922 of file mrvlqspi.c.
References bank, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, LOG_ERROR, mrvlqspi_flash_bank::probed, and mrvlqspi_flash_bank::reg_base.
|
static |
Definition at line 892 of file mrvlqspi.c.
References bank, ERROR_OK, mrvlqspi_probe(), and mrvlqspi_flash_bank::probed.
|
static |
Definition at line 454 of file mrvlqspi.c.
References bank, BLOCK_ERASE_TIMEOUT, mrvlqspi_flash_bank::dev, flash_device::erase_cmd, ERROR_OK, mrvlqspi_flash_busy_status(), mrvlqspi_set_addr(), mrvlqspi_set_hdr_cnt(), mrvlqspi_set_instr(), mrvlqspi_set_write_status(), mrvlqspi_start_transfer(), mrvlqspi_stop_transfer(), offset, QSPI_W_EN, and WRITE_ENABLE.
Referenced by mrvlqspi_flash_erase().
|
static |
Definition at line 490 of file mrvlqspi.c.
References bank, flash_device::chip_erase_cmd, CHIP_ERASE_TIMEOUT, mrvlqspi_flash_bank::dev, ERROR_FLASH_OPER_UNSUPPORTED, ERROR_OK, mrvlqspi_flash_busy_status(), mrvlqspi_set_instr(), mrvlqspi_set_write_status(), mrvlqspi_start_transfer(), mrvlqspi_stop_transfer(), QSPI_W_EN, and WRITE_ENABLE.
Referenced by mrvlqspi_flash_erase().
|
static |
Definition at line 251 of file mrvlqspi.c.
References alive_sleep(), bank, CONF, ERROR_FAIL, ERROR_OK, FIFO_FLUSH, LOG_DEBUG, LOG_ERROR, mrvlqspi_get_reg(), target_read_u32(), and target_write_u32().
Referenced by mrvlqspi_flash_busy_status(), mrvlqspi_flash_read(), mrvlqspi_read_id(), and mrvlqspi_set_write_status().
|
static |
Definition at line 315 of file mrvlqspi.c.
References alive_sleep(), bank, ERROR_FAIL, ERROR_OK, FIFO_FLUSH_TIMEOUT, INS_READ_STATUS, LOG_ERROR, mrvlqspi_fifo_flush(), mrvlqspi_read_byte(), mrvlqspi_set_conf(), mrvlqspi_set_din_cnt(), mrvlqspi_set_hdr_cnt(), mrvlqspi_set_instr(), mrvlqspi_start_transfer(), mrvlqspi_stop_transfer(), and QSPI_R_EN.
Referenced by mrvlqspi_block_erase(), and mrvlqspi_bulk_erase().
|
static |
Definition at line 519 of file mrvlqspi.c.
References bank, flash_device::chip_erase_cmd, mrvlqspi_flash_bank::dev, 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, LOG_WARNING, mrvlqspi_block_erase(), mrvlqspi_bulk_erase(), mrvlqspi_flash_bank::probed, flash_device::sectorsize, target::state, and TARGET_HALTED.
|
static |
Definition at line 900 of file mrvlqspi.c.
References ERROR_OK.
|
static |
Definition at line 753 of file mrvlqspi.c.
References bank, buffer, count, ERROR_FLASH_BANK_NOT_PROBED, ERROR_OK, ERROR_TARGET_NOT_HALTED, FIFO_FLUSH_TIMEOUT, LOG_ERROR, mrvlqspi_fifo_flush(), mrvlqspi_read_byte(), mrvlqspi_set_addr(), mrvlqspi_set_conf(), mrvlqspi_set_din_cnt(), mrvlqspi_set_hdr_cnt(), mrvlqspi_set_instr(), mrvlqspi_set_ss_state(), mrvlqspi_start_transfer(), offset, mrvlqspi_flash_bank::probed, QSPI_R_EN, QSPI_SS_DISABLE, QSPI_TIMEOUT, SPIFLASH_READ, target::state, and TARGET_HALTED.
|
static |
Definition at line 578 of file mrvlqspi.c.
References working_area::address, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, bank, buf_set_u32(), buffer, armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, count, destroy_reg_param(), mrvlqspi_flash_bank::dev, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, init_reg_param(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, NULL, offset, flash_device::pagesize, PARAM_IN_OUT, PARAM_OUT, mrvlqspi_flash_bank::reg_base, working_area::size, flash_device::size_in_bytes, SPIFLASH_DEF_PAGESIZE, target::state, target_alloc_working_area(), target_free_working_area(), target_get_working_area_avail(), TARGET_HALTED, target_run_flash_async_algorithm(), and target_write_buffer().
|
static |
Definition at line 906 of file mrvlqspi.c.
References bank, cmd, command_print_sameline(), mrvlqspi_flash_bank::dev, flash_device::device_id, ERROR_OK, flash_device::name, and mrvlqspi_flash_bank::probed.
|
inlinestatic |
Definition at line 71 of file mrvlqspi.c.
References bank, and mrvlqspi_flash_bank::reg_base.
Referenced by mrvlqspi_fifo_flush(), mrvlqspi_read_byte(), mrvlqspi_set_addr(), mrvlqspi_set_conf(), mrvlqspi_set_din_cnt(), mrvlqspi_set_hdr_cnt(), mrvlqspi_set_instr(), mrvlqspi_set_ss_state(), mrvlqspi_start_transfer(), and mrvlqspi_stop_transfer().
|
static |
Definition at line 818 of file mrvlqspi.c.
References bank, mrvlqspi_flash_bank::bank_num, mrvlqspi_flash_bank::dev, flash_device::device_id, ERROR_FAIL, ERROR_OK, ERROR_TARGET_NOT_HALTED, flash_devices, flash_sector::is_erased, flash_sector::is_protected, LOG_ERROR, LOG_INFO, LOG_WARNING, mrvlqspi_read_id(), flash_device::name, NULL, flash_sector::offset, mrvlqspi_flash_bank::probed, flash_device::sectorsize, flash_sector::size, flash_device::size_in_bytes, target::state, and TARGET_HALTED.
Referenced by mrvlqspi_auto_probe().
|
static |
Definition at line 287 of file mrvlqspi.c.
References bank, CNTL, DIN, ERROR_OK, LOG_DEBUG, mrvlqspi_get_reg(), RFIFO_EMPTY, and target_read_u32().
Referenced by mrvlqspi_flash_busy_status(), mrvlqspi_flash_read(), and mrvlqspi_read_id().
|
static |
Definition at line 402 of file mrvlqspi.c.
References bank, ERROR_OK, FIFO_FLUSH_TIMEOUT, LOG_DEBUG, mrvlqspi_fifo_flush(), mrvlqspi_read_byte(), mrvlqspi_set_conf(), mrvlqspi_set_din_cnt(), mrvlqspi_set_hdr_cnt(), mrvlqspi_set_instr(), mrvlqspi_set_ss_state(), mrvlqspi_start_transfer(), QSPI_R_EN, QSPI_SS_DISABLE, QSPI_TIMEOUT, and SPIFLASH_READ_ID.
Referenced by mrvlqspi_probe().
|
inlinestatic |
Definition at line 84 of file mrvlqspi.c.
References ADDR, addr, bank, mrvlqspi_get_reg(), and target_write_u32().
Referenced by mrvlqspi_block_erase(), and mrvlqspi_flash_read().
|
static |
Definition at line 105 of file mrvlqspi.c.
References bank, CONF, CONF_MASK, CONF_OFFSET, ERROR_OK, mrvlqspi_get_reg(), target_read_u32(), and target_write_u32().
Referenced by mrvlqspi_flash_busy_status(), mrvlqspi_flash_read(), and mrvlqspi_read_id().
|
inlinestatic |
Definition at line 77 of file mrvlqspi.c.
References bank, count, DINCNT, mrvlqspi_get_reg(), and target_write_u32().
Referenced by mrvlqspi_flash_busy_status(), mrvlqspi_flash_read(), and mrvlqspi_read_id().
|
inlinestatic |
Definition at line 98 of file mrvlqspi.c.
References bank, HDRCNT, mrvlqspi_get_reg(), and target_write_u32().
Referenced by mrvlqspi_block_erase(), mrvlqspi_flash_busy_status(), mrvlqspi_flash_read(), mrvlqspi_read_id(), and mrvlqspi_set_write_status().
|
inlinestatic |
Definition at line 91 of file mrvlqspi.c.
References bank, INSTR, mrvlqspi_get_reg(), and target_write_u32().
Referenced by mrvlqspi_block_erase(), mrvlqspi_bulk_erase(), mrvlqspi_flash_busy_status(), mrvlqspi_flash_read(), mrvlqspi_read_id(), and mrvlqspi_set_write_status().
|
static |
Definition at line 123 of file mrvlqspi.c.
References alive_sleep(), bank, CNTL, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, mrvlqspi_get_reg(), SS_EN, state, target_read_u32(), target_write_u32(), and XFER_RDY.
Referenced by mrvlqspi_flash_read(), mrvlqspi_read_id(), mrvlqspi_start_transfer(), and mrvlqspi_stop_transfer().
|
static |
Definition at line 366 of file mrvlqspi.c.
References bank, ERROR_OK, FIFO_FLUSH_TIMEOUT, INS_WRITE_DISABLE, INS_WRITE_ENABLE, mode, mrvlqspi_fifo_flush(), mrvlqspi_set_hdr_cnt(), mrvlqspi_set_instr(), mrvlqspi_start_transfer(), mrvlqspi_stop_transfer(), and QSPI_W_EN.
Referenced by mrvlqspi_block_erase(), and mrvlqspi_bulk_erase().
|
static |
Definition at line 162 of file mrvlqspi.c.
References bank, CONF, ERROR_OK, mrvlqspi_get_reg(), mrvlqspi_set_ss_state(), QSPI_SS_ENABLE, QSPI_TIMEOUT, RW_EN, target_read_u32(), target_write_u32(), and XFER_START.
Referenced by mrvlqspi_block_erase(), mrvlqspi_bulk_erase(), mrvlqspi_flash_busy_status(), mrvlqspi_flash_read(), mrvlqspi_read_id(), and mrvlqspi_set_write_status().
|
static |
Definition at line 192 of file mrvlqspi.c.
References alive_sleep(), bank, CNTL, CONF, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, mrvlqspi_get_reg(), mrvlqspi_set_ss_state(), QSPI_SS_DISABLE, QSPI_TIMEOUT, target_read_u32(), target_write_u32(), WFIFO_EMPTY, XFER_RDY, XFER_START, and XFER_STOP.
Referenced by mrvlqspi_block_erase(), mrvlqspi_bulk_erase(), mrvlqspi_flash_busy_status(), and mrvlqspi_set_write_status().
const struct flash_driver mrvlqspi_flash |
Definition at line 922 of file mrvlqspi.c.