13 #ifndef OPENOCD_FLASH_NAND_CORE_H
14 #define OPENOCD_FLASH_NAND_CORE_H
187 uint8_t
cmd,
bool oob_only);
191 uint8_t *data, uint32_t
size);
196 uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size);
198 uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size);
203 const uint8_t *dat, uint8_t *ecc_code);
205 const uint8_t *dat, uint8_t *ecc_code);
207 u_char *read_ecc, u_char *calc_ecc);
216 #define ERROR_NAND_DEVICE_INVALID (-1100)
217 #define ERROR_NAND_OPERATION_FAILED (-1101)
218 #define ERROR_NAND_OPERATION_TIMEOUT (-1102)
219 #define ERROR_NAND_OPERATION_NOT_SUPPORTED (-1103)
220 #define ERROR_NAND_DEVICE_NOT_PROBED (-1104)
221 #define ERROR_NAND_ERROR_CORRECTION_FAILED (-1105)
222 #define ERROR_NAND_NO_BUFFER (-1106)
COMMAND_HELPER(nand_command_get_device, unsigned int name_index, struct nand_device **nand)
helper for parsing a nand device command argument string
int nand_write_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_calculate_ecc_kw(struct nand_device *nand, const uint8_t *dat, uint8_t *ecc_code)
int nand_read_data_page(struct nand_device *nand, uint8_t *data, uint32_t size)
struct nand_device * nand_devices
int nand_correct_data(struct nand_device *nand, u_char *dat, u_char *read_ecc, u_char *calc_ecc)
nand_correct_data - Detect and correct a 1 bit error for 256 byte block
int nand_calculate_ecc(struct nand_device *nand, const uint8_t *dat, uint8_t *ecc_code)
int nand_read_status(struct nand_device *nand, uint8_t *status)
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)
@ NAND_SAMSUNG_LP_OPTIONS
struct nand_device * get_nand_device_by_num(int num)
int nand_register_commands(struct command_context *cmd_ctx)
int nand_page_command(struct nand_device *nand, uint32_t page, uint8_t cmd, bool oob_only)
size_t size
Size of the control block search area.
Representation of a single NAND block in a NAND device.
int is_erased
True if the block has been erased.
uint32_t offset
Offset to the block.
int is_bad
True if the block is bad.
uint32_t size
Size of the block.
struct nand_flash_controller * controller
struct nand_device * next
struct nand_block * blocks
struct nand_manufacturer * manufacturer
struct nand_info * device
struct nand_oobfree oobfree[2]
Interface for NAND flash controllers.