90 uint8_t *data,
int data_size)
114 uint8_t *data,
int data_size)
163 LOG_ERROR(
"no memory for nand controller");
167 nand->controller_priv = nuc910_nand;
183 if (bus_width != 8) {
184 LOG_ERROR(
"nuc910 only supports 8 bit bus width, not %i", bus_width);
214 .nand_device_command = nuc910_nand_device_command,
Holds the interface to ARM cores.
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.
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 ho...
@ ARM_NAND_NONE
No operation performed.
void alive_sleep(uint64_t ms)
#define LOG_ERROR(expr ...)
#define ERROR_NAND_NO_BUFFER
#define ERROR_NAND_OPERATION_FAILED
#define ERROR_NAND_OPERATION_NOT_SUPPORTED
#define ERROR_NAND_DEVICE_INVALID
static int nuc910_nand_read_block_data(struct nand_device *nand, uint8_t *data, int data_size)
static int nuc910_nand_write_block_data(struct nand_device *nand, uint8_t *data, int data_size)
static int nuc910_nand_command(struct nand_device *nand, uint8_t command)
static int nuc910_nand_ready(struct nand_device *nand, int timeout)
static int nuc910_nand_init(struct nand_device *nand)
static int validate_target_state(struct nand_device *nand)
NAND_DEVICE_COMMAND_HANDLER(nuc910_nand_device_command)
static int nuc910_nand_reset(struct nand_device *nand)
static int nuc910_nand_read(struct nand_device *nand, void *data)
static int nuc910_nand_write(struct nand_device *nand, uint16_t data)
static int nuc910_nand_address(struct nand_device *nand, uint8_t address)
#define NUC910_SMADDR_EOA
#define NUC910_FMICSR_SM_EN
The arm_nand_data struct is used for defining NAND I/O operations on an ARM core.
struct target * target
Target is proxy for some ARM core.
unsigned chunk_size
The chunk size is the page size or ECC chunk.
enum arm_nand_op op
Last operation executed using this struct.
uint32_t data
Where data is read from or written to.
Interface for NAND flash controllers.
int target_write_u8(struct target *target, target_addr_t address, uint8_t value)
int target_read_u8(struct target *target, target_addr_t address, uint8_t *value)
int target_write_u32(struct target *target, target_addr_t address, uint32_t value)
int target_read_u32(struct target *target, target_addr_t address, uint32_t *value)