OpenOCD
nand_flash_controller Struct Reference

Interface for NAND flash controllers. More...

Collaboration diagram for nand_flash_controller:

Public Member Functions

 __NAND_DEVICE_COMMAND ((*nand_device_command))
 NAND device command called when driver is instantiated during configuration. More...
 

Data Fields

int(* address )(struct nand_device *nand, uint8_t address)
 Write an address to the NAND device. More...
 
int(* command )(struct nand_device *nand, uint8_t command)
 Issue a command to the NAND device. More...
 
const struct command_registrationcommands
 
int(* init )(struct nand_device *nand)
 Initialize the NAND device. More...
 
const char * name
 Driver name that is used to select it from configuration files. More...
 
int(* nand_ready )(struct nand_device *nand, int timeout)
 Check if the NAND device is ready for more instructions with timeout. More...
 
int(* read_block_data )(struct nand_device *nand, uint8_t *data, int size)
 Read a block of data from the NAND device. More...
 
int(* read_data )(struct nand_device *nand, void *data)
 Read word of data from the NAND device. More...
 
int(* read_page )(struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size)
 Read a page from the NAND device. More...
 
int(* reset )(struct nand_device *nand)
 Reset the NAND device. More...
 
const char * usage
 Usage of flash command registration. More...
 
int(* write_block_data )(struct nand_device *nand, uint8_t *data, int size)
 Write a block of data to the NAND device. More...
 
int(* write_data )(struct nand_device *nand, uint16_t data)
 Write word of data to the NAND device. More...
 
int(* write_page )(struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size)
 Write a page to the NAND device. More...
 

Detailed Description

Interface for NAND flash controllers.

Not all of these functions are required for full functionality of the NAND driver, but better performance can be achieved by implementing each function.

Definition at line 23 of file nand/driver.h.

Member Function Documentation

◆ __NAND_DEVICE_COMMAND()

nand_flash_controller::__NAND_DEVICE_COMMAND ( nand_device_command)

NAND device command called when driver is instantiated during configuration.

Field Documentation

◆ address

int(* nand_flash_controller::address) (struct nand_device *nand, uint8_t address)

Write an address to the NAND device.

Definition at line 45 of file nand/driver.h.

Referenced by nand_erase(), nand_page_command(), and nand_probe().

◆ command

int(* nand_flash_controller::command) (struct nand_device *nand, uint8_t command)

Issue a command to the NAND device.

Definition at line 42 of file nand/driver.h.

Referenced by nand_erase(), nand_page_command(), nand_poll_ready(), nand_probe(), nand_read_status(), and nand_write_finish().

◆ commands

const struct command_registration* nand_flash_controller::commands

Definition at line 30 of file nand/driver.h.

Referenced by COMMAND_HELPER().

◆ init

int(* nand_flash_controller::init) (struct nand_device *nand)

Initialize the NAND device.

Definition at line 36 of file nand/driver.h.

Referenced by nand_probe().

◆ name

const char* nand_flash_controller::name

Driver name that is used to select it from configuration files.

Definition at line 25 of file nand/driver.h.

Referenced by COMMAND_HELPER(), get_nand_device_by_name(), nand_driver_find_by_name(), and nand_list_walker().

◆ nand_ready

int(* nand_flash_controller::nand_ready) (struct nand_device *nand, int timeout)

Check if the NAND device is ready for more instructions with timeout.

Definition at line 68 of file nand/driver.h.

Referenced by nand_erase(), nand_page_command(), and nand_write_finish().

◆ read_block_data

int(* nand_flash_controller::read_block_data) (struct nand_device *nand, uint8_t *data, int size)

Read a block of data from the NAND device.

Definition at line 57 of file nand/driver.h.

Referenced by nand_read_data_page().

◆ read_data

int(* nand_flash_controller::read_data) (struct nand_device *nand, void *data)

Read word of data from the NAND device.

Definition at line 51 of file nand/driver.h.

Referenced by nand_poll_ready(), nand_probe(), nand_read_data_page(), and nand_read_status().

◆ read_page

int(* nand_flash_controller::read_page) (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size)

Read a page from the NAND device.

Definition at line 64 of file nand/driver.h.

Referenced by nand_read_page().

◆ reset

int(* nand_flash_controller::reset) (struct nand_device *nand)

Reset the NAND device.

Definition at line 39 of file nand/driver.h.

Referenced by nand_probe().

◆ usage

const char* nand_flash_controller::usage

Usage of flash command registration.

Definition at line 28 of file nand/driver.h.

Referenced by COMMAND_HELPER().

◆ write_block_data

int(* nand_flash_controller::write_block_data) (struct nand_device *nand, uint8_t *data, int size)

Write a block of data to the NAND device.

Definition at line 54 of file nand/driver.h.

Referenced by nand_write_data_page().

◆ write_data

int(* nand_flash_controller::write_data) (struct nand_device *nand, uint16_t data)

Write word of data to the NAND device.

Definition at line 48 of file nand/driver.h.

Referenced by nand_write_data_page().

◆ write_page

int(* nand_flash_controller::write_page) (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size)

Write a page to the NAND device.

Definition at line 60 of file nand/driver.h.

Referenced by nand_write_page().


The documentation for this struct was generated from the following file: