OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | nand_block |
Representation of a single NAND block in a NAND device. More... | |
struct | nand_device |
struct | nand_ecclayout |
struct | nand_info |
struct | nand_manufacturer |
struct | nand_oobfree |
Macros | |
#define | ERROR_NAND_DEVICE_INVALID (-1100) |
#define | ERROR_NAND_DEVICE_NOT_PROBED (-1104) |
#define | ERROR_NAND_ERROR_CORRECTION_FAILED (-1105) |
#define | ERROR_NAND_NO_BUFFER (-1106) |
#define | ERROR_NAND_OPERATION_FAILED (-1101) |
#define | ERROR_NAND_OPERATION_NOT_SUPPORTED (-1103) |
#define | ERROR_NAND_OPERATION_TIMEOUT (-1102) |
Functions | |
COMMAND_HELPER (nand_command_get_device, unsigned name_index, struct nand_device **nand) | |
helper for parsing a nand device command argument string More... | |
struct nand_device * | get_nand_device_by_num (int num) |
int | nand_calculate_ecc (struct nand_device *nand, const uint8_t *dat, uint8_t *ecc_code) |
int | nand_calculate_ecc_kw (struct nand_device *nand, const uint8_t *dat, uint8_t *ecc_code) |
int | nand_page_command (struct nand_device *nand, uint32_t page, uint8_t cmd, bool oob_only) |
int | nand_read_data_page (struct nand_device *nand, uint8_t *data, uint32_t size) |
int | nand_read_page_raw (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size) |
int | nand_read_status (struct nand_device *nand, uint8_t *status) |
int | nand_register_commands (struct command_context *cmd_ctx) |
int | nand_write_data_page (struct nand_device *nand, uint8_t *data, uint32_t size) |
int | nand_write_finish (struct nand_device *nand) |
int | nand_write_page_raw (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size) |
#define ERROR_NAND_DEVICE_INVALID (-1100) |
Definition at line 213 of file nand/core.h.
#define ERROR_NAND_DEVICE_NOT_PROBED (-1104) |
Definition at line 217 of file nand/core.h.
#define ERROR_NAND_ERROR_CORRECTION_FAILED (-1105) |
Definition at line 218 of file nand/core.h.
#define ERROR_NAND_NO_BUFFER (-1106) |
Definition at line 219 of file nand/core.h.
#define ERROR_NAND_OPERATION_FAILED (-1101) |
Definition at line 214 of file nand/core.h.
#define ERROR_NAND_OPERATION_NOT_SUPPORTED (-1103) |
Definition at line 216 of file nand/core.h.
#define ERROR_NAND_OPERATION_TIMEOUT (-1102) |
Definition at line 215 of file nand/core.h.
anonymous enum |
Enumerator | |
---|---|
NAND_MFR_TOSHIBA | |
NAND_MFR_SAMSUNG | |
NAND_MFR_FUJITSU | |
NAND_MFR_NATIONAL | |
NAND_MFR_RENESAS | |
NAND_MFR_STMICRO | |
NAND_MFR_HYNIX | |
NAND_MFR_MICRON |
Definition at line 66 of file nand/core.h.
anonymous enum |
Enumerator | |
---|---|
NAND_NO_AUTOINCR | |
NAND_BUSWIDTH_16 | |
NAND_NO_PADDING | |
NAND_CACHEPRG | |
NAND_COPYBACK | |
NAND_IS_AND | |
NAND_4PAGE_ARRAY | |
BBT_AUTO_REFRESH | |
NAND_NO_READRDY | |
NAND_SAMSUNG_LP_OPTIONS | |
LP_OPTIONS | |
LP_OPTIONS16 |
Definition at line 94 of file nand/core.h.
anonymous enum |
Definition at line 138 of file nand/core.h.
anonymous enum |
Enumerator | |
---|---|
NAND_STATUS_FAIL | |
NAND_STATUS_FAIL_N1 | |
NAND_STATUS_TRUE_READY | |
NAND_STATUS_READY | |
NAND_STATUS_WP |
Definition at line 161 of file nand/core.h.
enum oob_formats |
Enumerator | |
---|---|
NAND_OOB_NONE | |
NAND_OOB_RAW | |
NAND_OOB_ONLY | |
NAND_OOB_SW_ECC | |
NAND_OOB_HW_ECC | |
NAND_OOB_SW_ECC_KW | |
NAND_OOB_JFFS2 | |
NAND_OOB_YAFFS2 |
Definition at line 170 of file nand/core.h.
COMMAND_HELPER | ( | nand_command_get_device | , |
unsigned | name_index, | ||
struct nand_device ** | nand | ||
) |
helper for parsing a nand device command argument string
Definition at line 197 of file flash/nand/core.c.
References CMD, CMD_ARGV, COMMAND_PARSE_NUMBER, command_print(), ERROR_COMMAND_SYNTAX_ERROR, ERROR_OK, get_nand_device_by_name(), and get_nand_device_by_num().
struct nand_device* get_nand_device_by_num | ( | int | num | ) |
Definition at line 184 of file flash/nand/core.c.
References nand_devices, nand_device::next, and NULL.
Referenced by COMMAND_HANDLER(), and COMMAND_HELPER().
int nand_calculate_ecc | ( | struct nand_device * | nand, |
const uint8_t * | dat, | ||
uint8_t * | ecc_code | ||
) |
Definition at line 48 of file ecc.c.
References nand_ecc_precalc_table.
Referenced by nand_fileio_read().
int nand_calculate_ecc_kw | ( | struct nand_device * | nand, |
const uint8_t * | dat, | ||
uint8_t * | ecc_code | ||
) |
Definition at line 93 of file ecc_kw.c.
References gf_build_log_exp_table(), gf_exp, and gf_log.
Referenced by nand_fileio_read().
int nand_page_command | ( | struct nand_device * | nand, |
uint32_t | page, | ||
uint8_t | cmd, | ||
bool | oob_only | ||
) |
Definition at line 693 of file flash/nand/core.c.
References nand_flash_controller::address, nand_device::address_cycles, alive_sleep(), cmd, nand_flash_controller::command, nand_device::controller, nand_device::device, ERROR_NAND_DEVICE_NOT_PROBED, ERROR_NAND_OPERATION_TIMEOUT, ERROR_OK, NAND_CMD_READ0, NAND_CMD_READOOB, NAND_CMD_READSTART, nand_flash_controller::nand_ready, and nand_device::page_size.
Referenced by at91sam9_read_page(), at91sam9_write_page(), lpc3180_read_page(), lpc3180_write_page(), lpc32xx_read_page_slc(), lpc32xx_write_page_slc(), nand_read_page_raw(), and nand_write_page_raw().
int nand_read_data_page | ( | struct nand_device * | nand, |
uint8_t * | data, | ||
uint32_t | size | ||
) |
Definition at line 757 of file flash/nand/core.c.
References nand_device::controller, nand_device::device, ERROR_NAND_NO_BUFFER, ERROR_OK, NAND_BUSWIDTH_16, nand_info::options, nand_flash_controller::read_block_data, nand_flash_controller::read_data, and size.
Referenced by at91sam9_read_page(), and nand_read_page_raw().
int nand_read_page_raw | ( | struct nand_device * | nand, |
uint32_t | page, | ||
uint8_t * | data, | ||
uint32_t | data_size, | ||
uint8_t * | oob, | ||
uint32_t | oob_size | ||
) |
Definition at line 778 of file flash/nand/core.c.
References ERROR_OK, NAND_CMD_READ0, nand_page_command(), and nand_read_data_page().
Referenced by lpc3180_read_page(), and nand_read_page().
int nand_read_status | ( | struct nand_device * | nand, |
uint8_t * | status | ||
) |
Definition at line 249 of file flash/nand/core.c.
References alive_sleep(), nand_flash_controller::command, nand_device::controller, nand_device::device, ERROR_NAND_DEVICE_NOT_PROBED, ERROR_OK, NAND_BUSWIDTH_16, NAND_CMD_STATUS, nand_info::options, nand_flash_controller::read_data, and status.
Referenced by davinci_writepage_tail(), lpc3180_write_page(), lpc32xx_write_page_mlc(), nand_erase(), and nand_write_finish().
int nand_register_commands | ( | struct command_context * | cmd_ctx | ) |
Definition at line 614 of file flash/nand/tcl.c.
References nand_command_handlers, NULL, and register_commands().
Referenced by setup_command_handler().
int nand_write_data_page | ( | struct nand_device * | nand, |
uint8_t * | data, | ||
uint32_t | size | ||
) |
Definition at line 797 of file flash/nand/core.c.
References nand_device::controller, nand_device::device, ERROR_NAND_NO_BUFFER, ERROR_OK, le_to_h_u16(), NAND_BUSWIDTH_16, nand_info::options, size, nand_flash_controller::write_block_data, write_data(), and nand_flash_controller::write_data.
Referenced by at91sam9_write_page(), and nand_write_page_raw().
int nand_write_finish | ( | struct nand_device * | nand | ) |
Definition at line 827 of file flash/nand/core.c.
References nand_flash_controller::command, nand_device::controller, ERROR_NAND_OPERATION_FAILED, ERROR_NAND_OPERATION_TIMEOUT, ERROR_OK, LOG_ERROR, NAND_CMD_PAGEPROG, nand_poll_ready(), nand_read_status(), nand_flash_controller::nand_ready, NAND_STATUS_FAIL, and status.
Referenced by at91sam9_write_page(), lpc3180_write_page(), lpc32xx_write_page_slc(), and nand_write_page_raw().
int nand_write_page_raw | ( | struct nand_device * | nand, |
uint32_t | page, | ||
uint8_t * | data, | ||
uint32_t | data_size, | ||
uint8_t * | oob, | ||
uint32_t | oob_size | ||
) |
Definition at line 855 of file flash/nand/core.c.
References ERROR_OK, LOG_ERROR, NAND_CMD_SEQIN, nand_page_command(), nand_write_data_page(), and nand_write_finish().
Referenced by lpc3180_write_page(), lpc32xx_write_page(), and nand_write_page().