OpenOCD
|
Go to the source code of this file.
Functions | |
static int | do_data_output (struct nand_device *nand) |
static int | get_next_byte_from_sram_buffer (struct target *target, uint8_t *value) |
static int | get_next_halfword_from_sram_buffer (struct target *target, uint16_t *value) |
static int | imx31_address (struct nand_device *nand, uint8_t address) |
static int | imx31_command (struct nand_device *nand, uint8_t command) |
static int | imx31_init (struct nand_device *nand) |
static int | imx31_nand_ready (struct nand_device *nand, int tout) |
static int | imx31_read_data (struct nand_device *nand, void *data) |
static int | imx31_read_page (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size) |
static int | imx31_reset (struct nand_device *nand) |
static int | imx31_write_data (struct nand_device *nand, uint16_t data) |
static int | imx31_write_page (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size) |
static int | initialize_nf_controller (struct nand_device *nand) |
NAND_DEVICE_COMMAND_HANDLER (imx31_nand_device_command) | |
static int | poll_for_complete_op (struct target *target, const char *text) |
static int | test_iomux_settings (struct target *target, uint32_t value, uint32_t mask, const char *text) |
static int | validate_target_state (struct nand_device *nand) |
Variables | |
static const char | data_block_size_err_msg [] |
static const char | get_status_register_err_msg [] = "can't get NAND status" |
struct nand_flash_controller | imx31_nand_flash_controller |
static uint32_t | in_sram_address |
static unsigned char | sign_of_sequental_byte_read |
static const char | sram_buffer_bounds_err_msg [] |
static const char | target_not_halted_err_msg [] |
|
static |
Definition at line 645 of file mx3.c.
References nand_device::controller_priv, ERROR_NAND_OPERATION_FAILED, ERROR_OK, mx3_nf_controller::fin, mx3_nf_controller::flags, mx3_nf_flags::hw_ecc_enabled, LOG_DEBUG, MX3_NF_BIT_DATAOUT_TYPE, MX3_NF_CFG2, MX3_NF_DATAOUT_PAGE, MX3_NF_ECCSTATUS, MX3_NF_FIN_DATAOUT, MX3_NF_FIN_NONE, mx3_nf_controller::optype, poll_for_complete_op(), nand_device::target, target_read_u16(), and target_write_u16().
Referenced by imx31_init(), imx31_read_data(), imx31_read_page(), and imx31_write_page().
|
static |
Definition at line 565 of file mx3.c.
References ERROR_NAND_OPERATION_FAILED, ERROR_OK, in_sram_address, LOG_ERROR, MX3_NF_LAST_BUFFER_ADDR, sign_of_sequental_byte_read, sram_buffer_bounds_err_msg, and target_read_u16().
Referenced by imx31_read_data().
|
static |
Definition at line 595 of file mx3.c.
References ERROR_NAND_OPERATION_FAILED, ERROR_OK, in_sram_address, LOG_ERROR, MX3_NF_LAST_BUFFER_ADDR, sram_buffer_bounds_err_msg, and target_read_u16().
Referenced by imx31_read_data().
|
static |
Definition at line 312 of file mx3.c.
References ERROR_OK, MX3_NF_BIT_OP_FAI, MX3_NF_CFG2, MX3_NF_FADDR, poll_for_complete_op(), nand_device::target, target_write_u16(), and validate_target_state().
Referenced by imx31_init(), imx31_read_page(), and imx31_write_page().
|
static |
Definition at line 244 of file mx3.c.
References nand_device::controller_priv, ERROR_OK, mx3_nf_controller::fin, in_sram_address, MX3_NF_BIT_OP_FCI, MX3_NF_CFG2, MX3_NF_DATAOUT_NANDID, MX3_NF_DATAOUT_NANDSTATUS, MX3_NF_DATAOUT_PAGE, MX3_NF_FCMD, MX3_NF_FIN_DATAOUT, MX3_NF_MAIN_BUFFER0, MX3_NF_SPARE_BUFFER0, NAND_CMD_READ0, NAND_CMD_READ1, NAND_CMD_READID, NAND_CMD_READOOB, NAND_CMD_STATUS, mx3_nf_controller::optype, nand_device::page_size, poll_for_complete_op(), sign_of_sequental_byte_read, nand_device::target, target_write_u16(), and validate_target_state().
Referenced by imx31_init(), imx31_read_page(), and imx31_write_page().
|
static |
Definition at line 85 of file mx3.c.
References nand_device::bus_width, nand_device::controller_priv, do_data_output(), ERROR_FAIL, ERROR_OK, mx3_nf_controller::flags, get_status_register_err_msg, imx31_address(), imx31_command(), initialize_nf_controller(), LOG_ERROR, LOG_INFO, MX3_CCM_CGR2, MX3_GPR, MX3_NF_BUFSIZ, MX3_NF_MAIN_BUFFER0, MX3_PCSR, NAND_CMD_STATUS, mx3_nf_flags::nand_readonly, mx3_nf_flags::one_kb_sram, nand_device::page_size, nand_device::target, target_read_u16(), target_read_u32(), target_write_u32(), test_iomux_settings(), and validate_target_state().
|
static |
Definition at line 339 of file mx3.c.
References alive_sleep(), ERROR_OK, MX3_NF_BIT_OP_DONE, MX3_NF_CFG2, nand_device::target, target_read_u16(), and validate_target_state().
|
static |
Definition at line 194 of file mx3.c.
References nand_device::bus_width, do_data_output(), ERROR_OK, get_next_byte_from_sram_buffer(), get_next_halfword_from_sram_buffer(), nand_device::target, and validate_target_state().
|
static |
Definition at line 452 of file mx3.c.
References nand_device::address_cycles, data_block_size_err_msg, do_data_output(), ERROR_NAND_OPERATION_FAILED, ERROR_OK, imx31_address(), imx31_command(), LOG_ERROR, MX3_NF_MAIN_BUFFER0, MX3_NF_SPARE_BUFFER0, NAND_CMD_READ0, NAND_CMD_READSTART, nand_device::target, target_read_buffer(), and validate_target_state().
|
static |
Definition at line 231 of file mx3.c.
References ERROR_OK, initialize_nf_controller(), and validate_target_state().
|
static |
Definition at line 225 of file mx3.c.
References ERROR_NAND_OPERATION_FAILED, and LOG_ERROR.
|
static |
Definition at line 363 of file mx3.c.
References nand_device::address_cycles, nand_device::controller_priv, data_block_size_err_msg, do_data_output(), ERROR_NAND_OPERATION_FAILED, ERROR_OK, mx3_nf_controller::flags, get_status_register_err_msg, mx3_nf_flags::hw_ecc_enabled, imx31_address(), imx31_command(), LOG_DEBUG, LOG_ERROR, MX3_NF_BIT_OP_FDI, MX3_NF_CFG2, MX3_NF_MAIN_BUFFER0, MX3_NF_SPARE_BUFFER0, NAND_CMD_PAGEPROG, NAND_CMD_SEQIN, NAND_CMD_STATUS, poll_for_complete_op(), nand_device::target, target_read_u16(), target_write_buffer(), target_write_u16(), and validate_target_state().
|
static |
Definition at line 517 of file mx3.c.
References nand_device::controller_priv, target::endianness, ERROR_FAIL, ERROR_OK, mx3_nf_controller::flags, mx3_nf_flags::hw_ecc_enabled, in_sram_address, LOG_ERROR, MX3_NF_BIT_BE_EN, MX3_NF_BIT_ECC_EN, MX3_NF_BIT_INT_DIS, MX3_NF_BIT_RESET_EN, MX3_NF_BUFADDR, MX3_NF_BUFCFG, MX3_NF_CFG1, MX3_NF_FWP, MX3_NF_LOCKEND, MX3_NF_LOCKSTART, MX3_NF_MAIN_BUFFER0, sign_of_sequental_byte_read, nand_device::target, TARGET_BIG_ENDIAN, target_read_u16(), and target_write_u16().
Referenced by imx31_init(), and imx31_reset().
NAND_DEVICE_COMMAND_HANDLER | ( | imx31_nand_device_command | ) |
Definition at line 52 of file mx3.c.
References CMD_ARGC, CMD_ARGV, ERROR_COMMAND_SYNTAX_ERROR, ERROR_FAIL, ERROR_OK, mx3_nf_controller::fin, mx3_nf_controller::flags, mx3_nf_flags::hw_ecc_enabled, LOG_ERROR, MX3_NF_DATAOUT_PAGE, MX3_NF_FIN_NONE, mx3_nf_controller::optype, mx3_nf_flags::target_little_endian, and TARGET_LITTLE_ENDIAN.
|
static |
Definition at line 609 of file mx3.c.
References ERROR_NAND_OPERATION_FAILED, ERROR_OK, LOG_ERROR, MX3_NF_BIT_OP_DONE, MX3_NF_CFG2, and target_read_u16().
Referenced by do_data_output(), imx31_address(), imx31_command(), and imx31_write_page().
|
static |
Definition at line 505 of file mx3.c.
References ERROR_FAIL, ERROR_OK, LOG_ERROR, mask, and target_read_u32().
Referenced by imx31_init().
|
static |
Definition at line 625 of file mx3.c.
References nand_device::controller_priv, target::endianness, ERROR_NAND_OPERATION_FAILED, ERROR_OK, mx3_nf_controller::flags, LOG_ERROR, target::state, nand_device::target, TARGET_HALTED, mx3_nf_flags::target_little_endian, TARGET_LITTLE_ENDIAN, and target_not_halted_err_msg.
Referenced by imx31_address(), imx31_command(), imx31_init(), imx31_nand_ready(), imx31_read_data(), imx31_read_page(), imx31_reset(), and imx31_write_page().
|
static |
Definition at line 31 of file mx3.c.
Referenced by imx31_read_page(), and imx31_write_page().
|
static |
Definition at line 35 of file mx3.c.
Referenced by imx31_init(), and imx31_write_page().
struct nand_flash_controller imx31_nand_flash_controller |
|
static |
Definition at line 36 of file mx3.c.
Referenced by get_next_byte_from_sram_buffer(), get_next_halfword_from_sram_buffer(), imx31_command(), and initialize_nf_controller().
|
static |
Definition at line 37 of file mx3.c.
Referenced by get_next_byte_from_sram_buffer(), imx31_command(), and initialize_nf_controller().
|
static |
Definition at line 33 of file mx3.c.
Referenced by get_next_byte_from_sram_buffer(), and get_next_halfword_from_sram_buffer().
|
static |
Definition at line 29 of file mx3.c.
Referenced by validate_target_state().