|
OpenOCD
|

Go to the source code of this file.
Data Structures | |
| struct | hpm_flash_info |
| struct | hpm_xpi_priv |
Macros | |
| #define | BLOCK_SIZE (4096U) |
| #define | ERASE_CHIP_TIMEOUT_IN_MS (100000U) |
| #define | NOR_CFG_OPT_HEADER (0xFCF90000UL) |
| #define | SECTOR_ERASE_TIMEOUT_IN_MS (100) |
| #define | TIMEOUT_IN_MS (10000U) |
| #define | TYPICAL_TIMEOUT_IN_MS (500U) |
Functions | |
| COMMAND_HANDLER (hpm_xpi_handle_erase_chip_command) | |
| FLASH_BANK_COMMAND_HANDLER (hpm_xpi_flash_bank_command) | |
| static int | hpm_xpi_auto_probe (struct flash_bank *bank) |
| static int | hpm_xpi_erase (struct flash_bank *bank, unsigned int first, unsigned int last) |
| static int | hpm_xpi_erase_chip (struct flash_bank *bank) |
| static int | hpm_xpi_probe (struct flash_bank *bank) |
| static int | hpm_xpi_run_algo_flash_init (struct flash_bank *bank, target_addr_t algo_entry) |
| static int | hpm_xpi_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count) |
Variables | |
| static uint8_t | flash_algo [] |
| const struct command_registration | hpm_xpi_command_handlers [] |
| static const struct command_registration | hpm_xpi_exec_command_handlers [] |
| const struct flash_driver | hpm_xpi_flash |
| COMMAND_HANDLER | ( | hpm_xpi_handle_erase_chip_command | ) |
Definition at line 423 of file hpm_xpi.c.
References bank, CALL_COMMAND_HANDLER, ERROR_OK, ERROR_TARGET_NOT_HALTED, hpm_xpi_erase_chip(), LOG_ERROR, target::state, target, and TARGET_HALTED.
| FLASH_BANK_COMMAND_HANDLER | ( | hpm_xpi_flash_bank_command | ) |
Definition at line 463 of file hpm_xpi.c.
References bank, CMD_ARGC, CMD_ARGV, COMMAND_PARSE_NUMBER, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, hpm_xpi_priv::header, hpm_xpi_priv::io_base, LOG_ERROR, NOR_CFG_OPT_HEADER, hpm_xpi_priv::opt0, hpm_xpi_priv::opt1, and hpm_xpi_priv::probed.
|
static |
Definition at line 189 of file hpm_xpi.c.
References bank, ERROR_OK, hpm_xpi_probe(), and hpm_xpi_priv::probed.
|
static |
Definition at line 299 of file hpm_xpi.c.
References working_area::address, ARRAY_SIZE, bank, buf_get_u32(), buf_set_u32(), destroy_reg_param(), ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, flash_algo, FLASH_ERASE, hpm_xpi_run_algo_flash_init(), init_reg_param(), LOG_DEBUG, LOG_ERROR, LOG_WARNING, NULL, PARAM_IN_OUT, PARAM_OUT, riscv_xlen(), SECTOR_ERASE_TIMEOUT_IN_MS, target::state, target_alloc_working_area(), target_free_working_area(), TARGET_HALTED, TARGET_PRIxADDR, target_run_algorithm(), target_write_buffer(), and reg_param::value.
|
static |
Definition at line 365 of file hpm_xpi.c.
References working_area::address, ARRAY_SIZE, bank, buf_get_u32(), buf_set_u64(), destroy_reg_param(), ERASE_CHIP_TIMEOUT_IN_MS, ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, flash_algo, hpm_xpi_run_algo_flash_init(), init_reg_param(), LOG_ERROR, LOG_WARNING, NULL, PARAM_IN_OUT, riscv_xlen(), target::state, target_alloc_working_area(), target_free_working_area(), TARGET_HALTED, TARGET_PRIxADDR, target_run_algorithm(), target_write_buffer(), and reg_param::value.
Referenced by COMMAND_HANDLER().
|
static |
Definition at line 82 of file hpm_xpi.c.
References working_area::address, ARRAY_SIZE, bank, buf_get_u32(), buf_set_u64(), destroy_reg_param(), ERROR_FAIL, ERROR_OK, ERROR_TARGET_FAILURE, ERROR_TARGET_NOT_HALTED, flash_algo, flash_info, hpm_xpi_run_algo_flash_init(), init_reg_param(), flash_sector::is_erased, flash_sector::is_protected, LOG_ERROR, LOG_WARNING, NULL, flash_sector::offset, PARAM_IN_OUT, PARAM_OUT, hpm_xpi_priv::probed, riscv_xlen(), flash_sector::size, target::state, target_alloc_working_area(), target_free_working_area(), TARGET_HALTED, TARGET_PRIxADDR, target_read_u32(), target_run_algorithm(), target_write_buffer(), TYPICAL_TIMEOUT_IN_MS, and reg_param::value.
Referenced by hpm_xpi_auto_probe().
|
static |
Definition at line 41 of file hpm_xpi.c.
References ARRAY_SIZE, bank, buf_get_u32(), buf_set_u64(), destroy_reg_param(), ERROR_OK, ERROR_TARGET_FAILURE, FLASH_INIT, hpm_xpi_priv::header, init_reg_param(), hpm_xpi_priv::io_base, LOG_ERROR, NULL, hpm_xpi_priv::opt0, hpm_xpi_priv::opt1, PARAM_IN_OUT, PARAM_OUT, riscv_xlen(), target_run_algorithm(), and TYPICAL_TIMEOUT_IN_MS.
Referenced by hpm_xpi_erase(), hpm_xpi_erase_chip(), hpm_xpi_probe(), and hpm_xpi_write().
|
static |
Definition at line 197 of file hpm_xpi.c.
References working_area::address, ARRAY_SIZE, bank, BLOCK_SIZE, buf_get_u32(), buf_set_u32(), buffer, count, destroy_reg_param(), ERROR_FLASH_OPERATION_FAILED, ERROR_OK, ERROR_TARGET_NOT_HALTED, ERROR_TARGET_RESOURCE_NOT_AVAILABLE, flash_algo, FLASH_PROGRAM, hpm_xpi_run_algo_flash_init(), init_reg_param(), LOG_ERROR, LOG_WARNING, MIN, NULL, offset, PARAM_IN_OUT, PARAM_OUT, riscv_xlen(), target::state, target_alloc_working_area(), target_free_working_area(), target_get_working_area_avail(), TARGET_HALTED, TARGET_PRIxADDR, target_run_algorithm(), target_write_buffer(), TIMEOUT_IN_MS, and reg_param::value.
|
static |
Definition at line 18 of file hpm_xpi.c.
Referenced by hpm_xpi_erase(), hpm_xpi_erase_chip(), hpm_xpi_probe(), and hpm_xpi_write().
| const struct command_registration hpm_xpi_command_handlers[] |
|
static |
| const struct flash_driver hpm_xpi_flash |