OpenOCD
orion.c File Reference
Include dependency graph for orion.c:

Go to the source code of this file.

Data Structures

struct  orion_nand_controller
 

Macros

#define CHECK_HALTED
 

Functions

 NAND_DEVICE_COMMAND_HANDLER (orion_nand_device_command)
 
static int orion_nand_address (struct nand_device *nand, uint8_t address)
 
static int orion_nand_command (struct nand_device *nand, uint8_t command)
 
static int orion_nand_fast_block_write (struct nand_device *nand, uint8_t *data, int size)
 
static int orion_nand_init (struct nand_device *nand)
 
static int orion_nand_read (struct nand_device *nand, void *data)
 
static int orion_nand_reset (struct nand_device *nand)
 
static int orion_nand_slow_block_write (struct nand_device *nand, uint8_t *data, int size)
 
static int orion_nand_write (struct nand_device *nand, uint16_t data)
 

Variables

struct nand_flash_controller orion_nand_controller
 

Macro Definition Documentation

◆ CHECK_HALTED

#define CHECK_HALTED
Value:
do { \
if (target->state != TARGET_HALTED) { \
LOG_ERROR("NAND flash access requires halted target"); \
} \
} while (0)
#define ERROR_NAND_OPERATION_FAILED
Definition: nand/core.h:217
Definition: target.h:116
enum target_state state
Definition: target.h:157
@ TARGET_HALTED
Definition: target.h:56

Definition at line 28 of file orion.c.

Function Documentation

◆ NAND_DEVICE_COMMAND_HANDLER()

◆ orion_nand_address()

static int orion_nand_address ( struct nand_device nand,
uint8_t  address 
)
static

◆ orion_nand_command()

static int orion_nand_command ( struct nand_device nand,
uint8_t  command 
)
static

◆ orion_nand_fast_block_write()

static int orion_nand_fast_block_write ( struct nand_device nand,
uint8_t *  data,
int  size 
)
static

◆ orion_nand_init()

static int orion_nand_init ( struct nand_device nand)
static

Definition at line 134 of file orion.c.

◆ orion_nand_read()

static int orion_nand_read ( struct nand_device nand,
void *  data 
)
static

◆ orion_nand_reset()

static int orion_nand_reset ( struct nand_device nand)
static

Definition at line 97 of file orion.c.

References NAND_CMD_RESET, and orion_nand_command().

◆ orion_nand_slow_block_write()

static int orion_nand_slow_block_write ( struct nand_device nand,
uint8_t *  data,
int  size 
)
static

Definition at line 76 of file orion.c.

References ERROR_OK, orion_nand_write(), and size.

Referenced by orion_nand_fast_block_write().

◆ orion_nand_write()

static int orion_nand_write ( struct nand_device nand,
uint16_t  data 
)
static

Variable Documentation

◆ orion_nand_controller

Initial value:
= {
.name = "orion",
.usage = "<target_id> <NAND_address>",
.command = orion_nand_command,
.address = orion_nand_address,
.read_data = orion_nand_read,
.write_data = orion_nand_write,
.write_block_data = orion_nand_fast_block_write,
.reset = orion_nand_reset,
.nand_device_command = orion_nand_device_command,
.init = orion_nand_init,
}
static int orion_nand_read(struct nand_device *nand, void *data)
Definition: orion.c:56
static int orion_nand_write(struct nand_device *nand, uint16_t data)
Definition: orion.c:66
static int orion_nand_command(struct nand_device *nand, uint8_t command)
Definition: orion.c:36
static int orion_nand_fast_block_write(struct nand_device *nand, uint8_t *data, int size)
Definition: orion.c:83
static int orion_nand_address(struct nand_device *nand, uint8_t address)
Definition: orion.c:46
static int orion_nand_reset(struct nand_device *nand)
Definition: orion.c:97
static int orion_nand_init(struct nand_device *nand)
Definition: orion.c:134

Definition at line 134 of file orion.c.