13 #ifndef OPENOCD_FLASH_NAND_CORE_H
14 #define OPENOCD_FLASH_NAND_CORE_H
186 uint8_t
cmd,
bool oob_only);
190 uint8_t *data, uint32_t
size);
195 uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size);
197 uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size);
202 const uint8_t *dat, uint8_t *ecc_code);
204 const uint8_t *dat, uint8_t *ecc_code);
213 #define ERROR_NAND_DEVICE_INVALID (-1100)
214 #define ERROR_NAND_OPERATION_FAILED (-1101)
215 #define ERROR_NAND_OPERATION_TIMEOUT (-1102)
216 #define ERROR_NAND_OPERATION_NOT_SUPPORTED (-1103)
217 #define ERROR_NAND_DEVICE_NOT_PROBED (-1104)
218 #define ERROR_NAND_ERROR_CORRECTION_FAILED (-1105)
219 #define ERROR_NAND_NO_BUFFER (-1106)
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)
COMMAND_HELPER(nand_command_get_device, unsigned name_index, struct nand_device **nand)
helper for parsing a nand device command argument string
int nand_read_data_page(struct nand_device *nand, uint8_t *data, uint32_t size)
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.