OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | arm_nand_data |
The arm_nand_data struct is used for defining NAND I/O operations on an ARM core. More... | |
Enumerations | |
enum | arm_nand_op { ARM_NAND_NONE , ARM_NAND_READ , ARM_NAND_WRITE } |
Available operational states the arm_nand_data struct can be in. More... | |
Functions | |
int | arm_nandread (struct arm_nand_data *nand, uint8_t *data, uint32_t size) |
Uses an on-chip algorithm for an ARM device to read from a NAND device and store the data into the host machine's memory. More... | |
int | arm_nandwrite (struct arm_nand_data *nand, uint8_t *data, int size) |
ARM-specific bulk write from buffer to address of 8-bit wide NAND. More... | |
enum arm_nand_op |
Available operational states the arm_nand_data struct can be in.
Enumerator | |
---|---|
ARM_NAND_NONE | No operation performed. |
ARM_NAND_READ | Read operation performed. |
ARM_NAND_WRITE | Write operation performed. |
int arm_nandread | ( | struct arm_nand_data * | nand, |
uint8_t * | data, | ||
uint32_t | size | ||
) |
Uses an on-chip algorithm for an ARM device to read from a NAND device and store the data into the host machine's memory.
nand | Pointer to the arm_nand_data struct that defines the I/O |
data | Pointer to the data buffer to store the read data |
size | Amount of data to be stored to the buffer. |
Definition at line 190 of file arm_io.c.
References working_area::address, arm::arch, target::arch_info, ARM_ARCH_V4, arm_code_to_working_area(), ARM_COMMON_MAGIC, ARM_MODE_SVC, ARM_MODE_THREAD, ARM_NAND_READ, ARM_STATE_ARM, ARMV7M_COMMON_MAGIC, buf_set_u32(), arm_nand_data::chunk_size, arm_algorithm::common_magic, armv7m_algorithm::common_magic, arm_nand_data::copy_area, arm_algorithm::core_mode, armv7m_algorithm::core_mode, arm_algorithm::core_state, arm_nand_data::data, destroy_reg_param(), ERROR_OK, init_reg_param(), is_armv7m(), LOG_ERROR, NULL, arm_nand_data::op, PARAM_IN, size, arm_nand_data::target, target_read_buffer(), target_run_algorithm(), target_to_armv7m(), and reg_param::value.
Referenced by at91sam9_read_block_data(), and nuc910_nand_read_block_data().
int arm_nandwrite | ( | struct arm_nand_data * | nand, |
uint8_t * | data, | ||
int | size | ||
) |
ARM-specific bulk write from buffer to address of 8-bit wide NAND.
For now this supports ARMv4,ARMv5 and ARMv7-M cores.
Enhancements to target_run_algorithm() could enable:
Different code fragments could handle:
nand | Pointer to the arm_nand_data struct that defines the I/O |
data | Pointer to the data to be copied to flash |
size | Size of the data being copied |
Definition at line 80 of file arm_io.c.
References working_area::address, arm::arch, target::arch_info, ARM_ARCH_V4, arm_code_to_working_area(), ARM_COMMON_MAGIC, ARM_MODE_SVC, ARM_MODE_THREAD, ARM_NAND_WRITE, ARM_STATE_ARM, ARMV7M_COMMON_MAGIC, buf_set_u32(), arm_nand_data::chunk_size, arm_algorithm::common_magic, armv7m_algorithm::common_magic, arm_nand_data::copy_area, arm_algorithm::core_mode, armv7m_algorithm::core_mode, arm_algorithm::core_state, arm_nand_data::data, destroy_reg_param(), ERROR_OK, init_reg_param(), is_armv7m(), LOG_ERROR, NULL, arm_nand_data::op, PARAM_IN, size, arm_nand_data::target, target_run_algorithm(), target_to_armv7m(), target_write_buffer(), and reg_param::value.
Referenced by at91sam9_write_block_data(), davinci_write_block_data(), nuc910_nand_write_block_data(), and orion_nand_fast_block_write().