OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | sector_info |
struct | stmqspi_flash_bank |
Functions | |
COMMAND_HANDLER (stmqspi_handle_cmd) | |
COMMAND_HANDLER (stmqspi_handle_mass_erase_command) | |
COMMAND_HANDLER (stmqspi_handle_set) | |
static int | find_sfdp_dummy (struct flash_bank *bank, int len) |
FLASH_BANK_COMMAND_HANDLER (stmqspi_flash_bank_command) | |
static int | get_stmqspi_info (struct flash_bank *bank, struct command_invocation *cmd) |
static uint32_t | h_to_le_32 (uint32_t val) |
static int | log2u (uint32_t word) |
static int | octospi_cmd (struct flash_bank *bank, uint32_t mode, uint32_t ccr, uint32_t ir) |
static int | poll_busy (struct flash_bank *bank, int timeout) |
static int | qspi_erase_sector (struct flash_bank *bank, unsigned int sector) |
static int | qspi_read_write_block (struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count, bool write) |
static int | qspi_verify (struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | qspi_write_enable (struct flash_bank *bank) |
static int | read_flash_id (struct flash_bank *bank, uint32_t *id1, uint32_t *id2) |
static int | read_sfdp_block (struct flash_bank *bank, uint32_t addr, uint32_t words, uint32_t *buffer) |
static int | read_status_reg (struct flash_bank *bank, uint16_t *status) |
static int | set_mm_mode (struct flash_bank *bank) |
static int | stmqspi_abort (struct flash_bank *bank) |
static int | stmqspi_auto_probe (struct flash_bank *bank) |
static int | stmqspi_blank_check (struct flash_bank *bank) |
static int | stmqspi_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
static int | stmqspi_probe (struct flash_bank *bank) |
static int | stmqspi_protect (struct flash_bank *bank, int set, unsigned int first, unsigned int last) |
static int | stmqspi_protect_check (struct flash_bank *bank) |
static int | stmqspi_read (struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | stmqspi_verify (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | stmqspi_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
static int | wait_till_ready (struct flash_bank *bank, int timeout) |
Variables | |
static const struct command_registration | stmqspi_command_handlers [] |
static const struct command_registration | stmqspi_exec_command_handlers [] |
struct flash_driver | stmqspi_flash |
#define OCTOSPI_CCR_MASS_ERASE ((OCTOSPI_MODE_CCR & OCTOSPI_NO_ADDR & OCTOSPI_NO_ALTB & OCTOSPI_NO_DATA)) |
#define OCTOSPI_CCR_PAGE_PROG ((OCTOSPI_MODE_CCR & QSPI_NO_ALTB)) |
#define OCTOSPI_CCR_READ OCTOSPI_MODE_CCR |
#define OCTOSPI_CCR_READ_ID |
#define OCTOSPI_CCR_READ_MID OCTOSPI_CCR_READ_ID |
#define OCTOSPI_CCR_READ_SFDP | ( | len | ) |
#define OCTOSPI_CCR_READ_STATUS |
#define OCTOSPI_CCR_SECTOR_ERASE ((OCTOSPI_MODE_CCR & OCTOSPI_NO_ALTB & OCTOSPI_NO_DATA)) |
#define OCTOSPI_CCR_WRITE_ENABLE ((OCTOSPI_MODE_CCR & OCTOSPI_NO_ADDR & OCTOSPI_NO_ALTB & OCTOSPI_NO_DATA)) |
#define OCTOSPI_MODE_CCR |
#define OPI_DUMMY ((stmqspi_info->saved_ccr & OCTOSPI_DQSEN) ? 6U : 4U) |
#define OPI_MODE ((stmqspi_info->saved_ccr & OCTOSPI_ISIZE_MASK) != 0) |
#define QSPI_CCR_MASS_ERASE |
#define QSPI_CCR_PAGE_PROG |
#define QSPI_CCR_READ |
#define QSPI_CCR_READ_ID |
#define QSPI_CCR_READ_MID |
#define QSPI_CCR_READ_SFDP |
#define QSPI_CCR_READ_STATUS |
#define QSPI_CCR_SECTOR_ERASE |
#define QSPI_CCR_WRITE_ENABLE |
#define QSPI_MODE |
#define SPI_ADSIZE (((stmqspi_info->saved_ccr >> SPI_ADSIZE_POS) & 0x3) + 1) |
COMMAND_HANDLER | ( | stmqspi_handle_cmd | ) |
Definition at line 769 of file stmqspi.c.
References addr, bank, BIT, CALL_COMMAND_HANDLER, CMD, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, command_print(), count, ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, ERROR_TARGET_NOT_HALTED, stmqspi_flash_bank::io_base, IS_OCTOSPI, LOG_DEBUG, LOG_ERROR, NULL, OCTOSPI_ADDR4, octospi_cmd(), OCTOSPI_MODE_CCR, OCTOSPI_NO_ADDR, OCTOSPI_NO_ALTB, OCTOSPI_NO_DATA, OCTOSPI_NO_DDTR, OCTOSPI_READ_MODE, OCTOSPI_WRITE_MODE, output, poll_busy(), QSPI_ADDR4, QSPI_CCR, QSPI_DCYC_MASK, QSPI_MODE, QSPI_NO_ADDR, QSPI_NO_ALTB, QSPI_NO_DATA, QSPI_READ_MODE, QSPI_WRITE_MODE, stmqspi_flash_bank::saved_cr, set_mm_mode(), SPI_ADSIZE_POS, SPI_AR, SPI_DLR, SPI_DR, SPI_DUAL_FLASH, SPI_PROBE_TIMEOUT, target::state, stmqspi_abort(), TARGET_HALTED, target_read_u8(), target_write_u32(), and target_write_u8().
COMMAND_HANDLER | ( | stmqspi_handle_mass_erase_command | ) |
Definition at line 485 of file stmqspi.c.
References bank, BIT, CALL_COMMAND_HANDLER, flash_device::chip_erase_cmd, CMD, CMD_ARGC, command_print(), stmqspi_flash_bank::dev, duration_elapsed(), duration_kbps(), duration_measure(), duration_start(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_FLASH_BANK_NOT_PROBED, ERROR_FLASH_OPER_UNSUPPORTED, ERROR_FLASH_OPERATION_FAILED, ERROR_FLASH_PROTECTED, ERROR_OK, ERROR_TARGET_NOT_HALTED, stmqspi_flash_bank::io_base, IS_OCTOSPI, LOG_DEBUG, LOG_ERROR, NULL, OCTOSPI_CCR_MASS_ERASE, octospi_cmd(), OCTOSPI_WRITE_MODE, poll_busy(), stmqspi_flash_bank::probed, QSPI_CCR, QSPI_CCR_MASS_ERASE, qspi_write_enable(), read_status_reg(), stmqspi_flash_bank::saved_cr, set_mm_mode(), SPI_CMD_TIMEOUT, SPI_DUAL_FLASH, SPI_FSEL_FLASH, SPI_MASS_ERASE_TIMEOUT, SPIFLASH_BSY_BIT, SPIFLASH_WE_BIT, target::state, status, TARGET_HALTED, target_write_u32(), and wait_till_ready().
COMMAND_HANDLER | ( | stmqspi_handle_set | ) |
Definition at line 607 of file stmqspi.c.
References bank, BIT, CALL_COMMAND_HANDLER, flash_device::chip_erase_cmd, CMD, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, command_print(), stmqspi_flash_bank::dev, stmqspi_flash_bank::devname, flash_device::erase_cmd, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, stmqspi_flash_bank::io_base, flash_sector::is_erased, flash_sector::is_protected, log2u(), LOG_DEBUG, LOG_ERROR, LOG_INFO, flash_device::name, NULL, flash_sector::offset, flash_device::pagesize, flash_device::pprog_cmd, stmqspi_flash_bank::probed, flash_device::qread_cmd, flash_device::read_cmd, stmqspi_flash_bank::saved_cr, flash_device::sectorsize, stmqspi_flash_bank::sfdp_dummy1, stmqspi_flash_bank::sfdp_dummy2, flash_sector::size, flash_device::size_in_bytes, SPI_DCR, SPI_DUAL_FLASH, SPI_FSIZE_LEN, SPI_FSIZE_POS, and target_read_u32().
|
static |
Definition at line 1718 of file stmqspi.c.
References bank, BIT, count, ERROR_OK, stmqspi_flash_bank::io_base, IS_OCTOSPI, LOG_DEBUG, OCTOSPI_CCR_READ_SFDP, octospi_cmd(), OCTOSPI_READ_MODE, poll_busy(), QSPI_CCR, QSPI_CCR_READ_SFDP, stmqspi_flash_bank::saved_cr, stmqspi_flash_bank::sfdp_dummy1, stmqspi_flash_bank::sfdp_dummy2, SPI_ABORT, SPI_AR, SPI_CR, SPI_DLR, SPI_DR, SPI_DUAL_FLASH, SPI_FSEL_FLASH, SPI_PROBE_TIMEOUT, SPIFLASH_READ_SFDP, stmqspi_abort(), target_read_u8(), and target_write_u32().
Referenced by read_sfdp_block().
FLASH_BANK_COMMAND_HANDLER | ( | stmqspi_flash_bank_command | ) |
Definition at line 205 of file stmqspi.c.
References bank, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, stmqspi_flash_bank::io_base, LOG_DEBUG, LOG_ERROR, stmqspi_flash_bank::probed, stmqspi_flash_bank::sfdp_dummy1, and stmqspi_flash_bank::sfdp_dummy2.
|
static |
Definition at line 2382 of file stmqspi.c.
References bank, BIT, flash_device::chip_erase_cmd, cmd, command_print_sameline(), stmqspi_flash_bank::dev, flash_device::device_id, flash_device::erase_cmd, ERROR_FLASH_BANK_NOT_PROBED, ERROR_OK, flash_device::name, flash_device::pagesize, flash_device::pprog_cmd, stmqspi_flash_bank::probed, flash_device::qread_cmd, flash_device::read_cmd, stmqspi_flash_bank::saved_cr, flash_device::sectorsize, SPI_DUAL_FLASH, and SPI_FSEL_FLASH.
|
inlinestatic |
Definition at line 142 of file stmqspi.c.
References h_u32_to_le().
Referenced by qspi_read_write_block(), qspi_verify(), and stmqspi_blank_check().
|
static |
|
inlinestatic |
Definition at line 176 of file stmqspi.c.
References bank, ERROR_OK, stmqspi_flash_bank::io_base, mode, OCTOSPI_CCR, OCTOSPI_CR, OCTOSPI_DCYC_MASK, OCTOSPI_DCYC_POS, OCTOSPI_IR, OCTOSPI_MODE, OCTOSPI_READ_MODE, OCTOSPI_TCR, OPI_CMD, OPI_DUMMY, OPI_MODE, stmqspi_flash_bank::saved_tcr, and target_write_u32().
Referenced by COMMAND_HANDLER(), find_sfdp_dummy(), qspi_erase_sector(), qspi_write_enable(), read_flash_id(), read_sfdp_block(), and read_status_reg().
|
static |
Definition at line 234 of file stmqspi.c.
References alive_sleep(), bank, BIT, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, stmqspi_flash_bank::io_base, LOG_DEBUG, LOG_ERROR, SPI_BUSY, SPI_FCR, SPI_SR, SPI_TCF, target_read_u32(), target_write_u32(), and timeval_ms().
Referenced by COMMAND_HANDLER(), find_sfdp_dummy(), qspi_erase_sector(), qspi_write_enable(), read_flash_id(), read_sfdp_block(), read_status_reg(), set_mm_mode(), stmqspi_blank_check(), stmqspi_probe(), stmqspi_read(), stmqspi_verify(), and stmqspi_write().
|
static |
Definition at line 924 of file stmqspi.c.
References bank, BIT, stmqspi_flash_bank::dev, flash_device::erase_cmd, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, stmqspi_flash_bank::io_base, IS_OCTOSPI, LOG_DEBUG, LOG_ERROR, OCTOSPI_CCR_SECTOR_ERASE, octospi_cmd(), OCTOSPI_WRITE_MODE, poll_busy(), QSPI_CCR, QSPI_CCR_SECTOR_ERASE, qspi_write_enable(), read_status_reg(), stmqspi_flash_bank::saved_cr, SPI_AR, SPI_CMD_TIMEOUT, SPI_DUAL_FLASH, SPI_FSEL_FLASH, SPI_MAX_TIMEOUT, SPIFLASH_BSY_BIT, SPIFLASH_WE_BIT, status, target_write_u32(), and wait_till_ready().
Referenced by stmqspi_erase().
|
static |
Definition at line 1366 of file stmqspi.c.
References working_area::address, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, ARRAY_SIZE, bank, BIT, buf_get_u32(), buf_set_u32(), buffer, armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, count, destroy_reg_param(), stmqspi_flash_bank::dev, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, h_to_le_32(), init_reg_param(), stmqspi_flash_bank::io_base, IS_OCTOSPI, LOG_DEBUG, LOG_ERROR, NULL, OCTOSPI_CCR_PAGE_PROG, OCTOSPI_CCR_READ, OCTOSPI_CCR_READ_STATUS, OCTOSPI_CCR_WRITE_ENABLE, OCTOSPI_DCYC_MASK, OCTOSPI_DCYC_POS, OCTOSPI_MODE, OCTOSPI_READ_MODE, OCTOSPI_WRITE_MODE, offset, OPI_CMD, OPI_DUMMY, OPI_MODE, flash_device::pagesize, PARAM_IN_OUT, PARAM_OUT, flash_device::pprog_cmd, QSPI_CCR_PAGE_PROG, QSPI_CCR_READ, QSPI_CCR_READ_STATUS, QSPI_CCR_WRITE_ENABLE, stmqspi_flash_bank::saved_cr, stmqspi_flash_bank::saved_ir, stmqspi_flash_bank::saved_tcr, flash_device::sectorsize, set_mm_mode(), flash_device::size_in_bytes, SPI_DUAL_FLASH, SPIFLASH_DEF_PAGESIZE, SPIFLASH_READ_STATUS, SPIFLASH_WRITE_ENABLE, target_alloc_working_area_try(), target_free_working_area(), target_get_working_area_avail(), target_run_flash_async_algorithm(), target_run_read_async_algorithm(), and target_write_buffer().
Referenced by stmqspi_read(), and stmqspi_write().
|
static |
Definition at line 1243 of file stmqspi.c.
References working_area::address, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, ARRAY_SIZE, bank, BIT, buf_get_u32(), buf_set_u32(), buffer, armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, count, destroy_reg_param(), stmqspi_flash_bank::dev, ERROR_FAIL, ERROR_OK, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, h_to_le_32(), image_calculate_checksum(), init_reg_param(), stmqspi_flash_bank::io_base, IS_OCTOSPI, keep_alive(), LOG_DEBUG, LOG_ERROR, NULL, OCTOSPI_CCR_READ, OCTOSPI_MODE, OCTOSPI_READ_MODE, offset, flash_device::pagesize, PARAM_IN_OUT, PARAM_OUT, QSPI_CCR_READ, stmqspi_flash_bank::saved_cr, stmqspi_flash_bank::saved_ir, stmqspi_flash_bank::saved_tcr, flash_device::sectorsize, set_mm_mode(), SPI_DUAL_FLASH, SPIFLASH_DEF_PAGESIZE, TARGET_ADDR_FMT, target_alloc_working_area_try(), target_free_working_area(), target_run_algorithm(), and target_write_buffer().
Referenced by stmqspi_verify().
|
static |
Definition at line 419 of file stmqspi.c.
References bank, BIT, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, stmqspi_flash_bank::io_base, IS_OCTOSPI, LOG_ERROR, OCTOSPI_CCR_WRITE_ENABLE, octospi_cmd(), OCTOSPI_WRITE_MODE, OPI_MODE, poll_busy(), QSPI_CCR, QSPI_CCR_WRITE_ENABLE, read_status_reg(), stmqspi_flash_bank::saved_cr, SPI_AR, SPI_CMD_TIMEOUT, SPI_DUAL_FLASH, SPI_FSEL_FLASH, SPI_PROBE_TIMEOUT, SPIFLASH_BSY_BIT, SPIFLASH_WE_BIT, SPIFLASH_WRITE_ENABLE, status, stmqspi_abort(), and target_write_u32().
Referenced by COMMAND_HANDLER(), and qspi_erase_sector().
|
static |
Definition at line 1936 of file stmqspi.c.
References bank, BIT, count, dummy, ERROR_FAIL, ERROR_FLASH_BANK_NOT_PROBED, ERROR_OK, ERROR_TARGET_NOT_HALTED, stmqspi_flash_bank::io_base, IS_OCTOSPI, LOG_ERROR, LOG_INFO, OCTOSPI_CCR_READ_ID, OCTOSPI_CCR_READ_MID, octospi_cmd(), OCTOSPI_READ_MODE, OPI_MODE, poll_busy(), QSPI_CCR, QSPI_CCR_READ_ID, QSPI_CCR_READ_MID, stmqspi_flash_bank::saved_cr, SPI_AR, SPI_DLR, SPI_DR, SPI_DUAL_FLASH, SPI_FSEL_FLASH, SPI_PROBE_TIMEOUT, SPI_SR, SPIFLASH_READ_ID, SPIFLASH_READ_MID, target::state, stmqspi_abort(), TARGET_HALTED, target_read_u32(), target_read_u8(), target_write_u32(), type, and wait_till_ready().
Referenced by stmqspi_probe().
|
static |
Definition at line 1809 of file stmqspi.c.
References addr, bank, BIT, buffer, count, dummy, ERROR_OK, find_sfdp_dummy(), stmqspi_flash_bank::io_base, IS_OCTOSPI, le_to_h_u32(), LOG_DEBUG, OCTOSPI_CCR_READ_SFDP, octospi_cmd(), OCTOSPI_READ_MODE, poll_busy(), QSPI_CCR, QSPI_CCR_READ_SFDP, stmqspi_flash_bank::saved_ccr, stmqspi_flash_bank::saved_cr, stmqspi_flash_bank::sfdp_dummy1, stmqspi_flash_bank::sfdp_dummy2, SPI_ABORT, SPI_AR, SPI_CR, SPI_DLR, SPI_DMODE_POS, SPI_DR, SPI_DUAL_FLASH, SPI_FSEL_FLASH, SPI_PROBE_TIMEOUT, SPIFLASH_READ_SFDP, target_read_u32(), target_read_u8(), and target_write_u32().
Referenced by spi_sfdp(), and stmqspi_probe().
|
static |
Definition at line 323 of file stmqspi.c.
References bank, BIT, count, dummy, ERROR_OK, stmqspi_flash_bank::io_base, IS_OCTOSPI, LOG_DEBUG, OCTOSPI_CCR_READ_STATUS, octospi_cmd(), OCTOSPI_READ_MODE, OPI_MODE, poll_busy(), QSPI_CCR, QSPI_CCR_READ_STATUS, stmqspi_flash_bank::saved_cr, SPI_AR, SPI_DLR, SPI_DR, SPI_DUAL_FLASH, SPI_FSEL_FLASH, SPI_PROBE_TIMEOUT, SPI_SR, SPIFLASH_READ_STATUS, status, stmqspi_abort(), target_read_u32(), target_read_u8(), and target_write_u32().
Referenced by COMMAND_HANDLER(), qspi_erase_sector(), qspi_write_enable(), and wait_till_ready().
|
static |
Definition at line 277 of file stmqspi.c.
References bank, ERROR_OK, stmqspi_flash_bank::io_base, IS_OCTOSPI, OCTOSPI_CCR, OCTOSPI_CR, OCTOSPI_IR, OCTOSPI_MM_MODE, OCTOSPI_MODE, OCTOSPI_TCR, poll_busy(), QSPI_CCR, QSPI_CR, stmqspi_flash_bank::saved_ccr, stmqspi_flash_bank::saved_cr, stmqspi_flash_bank::saved_ir, stmqspi_flash_bank::saved_tcr, SPI_AR, SPI_PROBE_TIMEOUT, stmqspi_abort(), and target_write_u32().
Referenced by COMMAND_HANDLER(), qspi_read_write_block(), qspi_verify(), stmqspi_blank_check(), stmqspi_erase(), and stmqspi_probe().
|
static |
Definition at line 261 of file stmqspi.c.
References bank, BIT, ERROR_OK, stmqspi_flash_bank::io_base, SPI_ABORT, SPI_CR, target_read_u32(), and target_write_u32().
Referenced by COMMAND_HANDLER(), find_sfdp_dummy(), qspi_write_enable(), read_flash_id(), read_status_reg(), set_mm_mode(), stmqspi_blank_check(), stmqspi_probe(), stmqspi_read(), stmqspi_verify(), and stmqspi_write().
|
static |
Definition at line 2366 of file stmqspi.c.
References bank, ERROR_OK, stmqspi_flash_bank::probed, and stmqspi_probe().
|
static |
Definition at line 1063 of file stmqspi.c.
References working_area::address, ARM_MODE_THREAD, ARMV7M_COMMON_MAGIC, ARRAY_SIZE, bank, buf_set_u32(), armv7m_algorithm::common_magic, armv7m_algorithm::core_mode, count, destroy_reg_param(), duration_elapsed(), duration_kbps(), duration_measure(), duration_start(), ERROR_FLASH_BANK_NOT_PROBED, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, h_to_le_32(), init_reg_param(), stmqspi_flash_bank::io_base, IS_OCTOSPI, keep_alive(), LOG_DEBUG, LOG_ERROR, LOG_INFO, NULL, OCTOSPI_CCR_READ, OCTOSPI_MODE, OCTOSPI_READ_MODE, sector_info::offset, PARAM_OUT, poll_busy(), stmqspi_flash_bank::probed, QSPI_CCR_READ, sector_info::result, stmqspi_flash_bank::saved_ir, stmqspi_flash_bank::saved_tcr, set_mm_mode(), sector_info::size, SPI_PROBE_TIMEOUT, target::state, stmqspi_abort(), target_alloc_working_area_try(), target_free_working_area(), target_get_working_area_avail(), TARGET_HALTED, target_read_buffer(), target_run_algorithm(), and target_write_buffer().
|
static |
Definition at line 995 of file stmqspi.c.
References alive_sleep(), bank, stmqspi_flash_bank::dev, flash_device::erase_cmd, ERROR_FLASH_BANK_NOT_PROBED, ERROR_FLASH_OPER_UNSUPPORTED, ERROR_FLASH_PROTECTED, ERROR_FLASH_SECTOR_INVALID, ERROR_OK, ERROR_TARGET_NOT_HALTED, keep_alive(), LOG_DEBUG, LOG_ERROR, stmqspi_flash_bank::probed, qspi_erase_sector(), set_mm_mode(), target::state, and TARGET_HALTED.
|
static |
Definition at line 2067 of file stmqspi.c.
References bank, BIT, flash_device::chip_erase_cmd, stmqspi_flash_bank::dev, flash_device::device_id, flash_device::erase_cmd, ERROR_FAIL, ERROR_FLASH_BANK_NOT_PROBED, ERROR_OK, flash_devices, stmqspi_flash_bank::io_base, flash_sector::is_erased, IS_OCTOSPI, flash_sector::is_protected, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING, flash_device::name, NULL, stmqspi_flash_bank::octo, OCTO_MAGIC_ID, OCTOSPI_DCR1, OCTOSPI_DDTR, OCTOSPI_IR, OCTOSPI_MAGIC, OCTOSPI_MTYP_MASK, OCTOSPI_MTYP_POS, OCTOSPI_TCR, flash_sector::offset, flash_device::pagesize, poll_busy(), flash_device::pprog_cmd, stmqspi_flash_bank::probed, flash_device::qread_cmd, QSPI_ABR, QSPI_DDRM, flash_device::read_cmd, read_flash_id(), read_sfdp_block(), stmqspi_flash_bank::saved_ccr, stmqspi_flash_bank::saved_cr, stmqspi_flash_bank::saved_ir, stmqspi_flash_bank::saved_tcr, flash_device::sectorsize, set_mm_mode(), stmqspi_flash_bank::sfdp_dummy1, stmqspi_flash_bank::sfdp_dummy2, flash_sector::size, flash_device::size_in_bytes, SPI_ADSIZE, SPI_CCR, SPI_CR, SPI_DCR, SPI_DUAL_FLASH, SPI_FSEL_FLASH, SPI_FSIZE_LEN, SPI_FSIZE_POS, SPI_PROBE_TIMEOUT, spi_sfdp(), stmqspi_abort(), target_read_u32(), and target_write_u32().
Referenced by stmqspi_auto_probe().
|
static |
Definition at line 1048 of file stmqspi.c.
References bank, ERROR_OK, and LOG_WARNING.
|
static |
|
static |
Definition at line 1569 of file stmqspi.c.
References bank, buffer, count, ERROR_FLASH_BANK_NOT_PROBED, ERROR_OK, ERROR_TARGET_NOT_HALTED, LOG_DEBUG, LOG_ERROR, LOG_WARNING, offset, poll_busy(), stmqspi_flash_bank::probed, qspi_read_write_block(), SPI_PROBE_TIMEOUT, target::state, stmqspi_abort(), and TARGET_HALTED.
|
static |
Definition at line 1668 of file stmqspi.c.
References bank, BIT, buffer, count, ERROR_FLASH_BANK_NOT_PROBED, ERROR_FLASH_DST_BREAKS_ALIGNMENT, ERROR_OK, ERROR_TARGET_NOT_HALTED, IS_OCTOSPI, LOG_DEBUG, LOG_ERROR, LOG_WARNING, OCTOSPI_DDTR, offset, poll_busy(), stmqspi_flash_bank::probed, qspi_verify(), stmqspi_flash_bank::saved_ccr, stmqspi_flash_bank::saved_cr, SPI_DUAL_FLASH, SPI_PROBE_TIMEOUT, target::state, stmqspi_abort(), and TARGET_HALTED.
|
static |
Definition at line 1607 of file stmqspi.c.
References bank, BIT, buffer, count, ERROR_FLASH_BANK_NOT_PROBED, ERROR_FLASH_DST_BREAKS_ALIGNMENT, ERROR_FLASH_PROTECTED, ERROR_OK, ERROR_TARGET_NOT_HALTED, IS_OCTOSPI, LOG_DEBUG, LOG_ERROR, LOG_WARNING, OCTOSPI_DDTR, offset, poll_busy(), stmqspi_flash_bank::probed, qspi_read_write_block(), stmqspi_flash_bank::saved_ccr, stmqspi_flash_bank::saved_cr, SPI_DUAL_FLASH, SPI_PROBE_TIMEOUT, target::state, stmqspi_abort(), and TARGET_HALTED.
|
static |
Definition at line 396 of file stmqspi.c.
References alive_sleep(), bank, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, LOG_ERROR, read_status_reg(), SPIFLASH_BSY_BIT, status, and timeval_ms().
Referenced by COMMAND_HANDLER(), qspi_erase_sector(), and read_flash_id().
|
static |
|
static |
struct flash_driver stmqspi_flash |