OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | davinci_nand |
Macros | |
#define | NAND4BITECC 0xc0 /* 4-bit ECC data, 1st of 4 */ |
#define | NAND4BITECCLOAD 0xbc /* 4-bit ECC, load saved values */ |
#define | NANDERRADDR 0xd0 /* 4-bit ECC err addr, 1st of 2 */ |
#define | NANDERRVAL 0xd8 /* 4-bit ECC err value, 1st of 2 */ |
#define | NANDFCR 0x60 /* flash control register */ |
#define | NANDFECC 0x70 /* 1-bit ECC data, CS0, 1st of 4 */ |
#define | NANDFSR 0x64 /* flash status register */ |
Enumerations | |
enum | ecc { HWECC1 , HWECC4 , HWECC4_INFIX } |
Functions | |
static int | davinci_address (struct nand_device *nand, uint8_t address) |
static int | davinci_command (struct nand_device *nand, uint8_t command) |
static int | davinci_init (struct nand_device *nand) |
static int | davinci_nand_ready (struct nand_device *nand, int timeout) |
static int | davinci_read_block_data (struct nand_device *nand, uint8_t *data, int data_size) |
static int | davinci_read_data (struct nand_device *nand, void *data) |
static int | davinci_read_page (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size) |
static int | davinci_read_page_ecc4infix (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size) |
static int | davinci_reset (struct nand_device *nand) |
static int | davinci_seek_column (struct nand_device *nand, uint16_t column) |
static int | davinci_write_block_data (struct nand_device *nand, uint8_t *data, int data_size) |
static int | davinci_write_data (struct nand_device *nand, uint16_t data) |
static int | davinci_write_page (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size) |
static int | davinci_write_page_ecc1 (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size) |
static int | davinci_write_page_ecc4 (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size) |
static int | davinci_write_page_ecc4infix (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size) |
static void | davinci_write_pagecmd (struct nand_device *nand, uint8_t cmd, uint32_t page) |
static int | davinci_writepage_tail (struct nand_device *nand, uint8_t *oob, uint32_t oob_size) |
static int | halted (struct target *target, const char *label) |
NAND_DEVICE_COMMAND_HANDLER (davinci_nand_device_command) | |
Variables | |
struct nand_flash_controller | davinci_nand_controller |
#define NANDERRVAL 0xd8 /* 4-bit ECC err value, 1st of 2 */ |
|
static |
Definition at line 132 of file davinci.c.
References nand_device::controller_priv, ERROR_NAND_OPERATION_FAILED, ERROR_OK, halted(), info, nand_device::target, and target_write_u8().
|
static |
Definition at line 120 of file davinci.c.
References nand_device::controller_priv, ERROR_NAND_OPERATION_FAILED, ERROR_OK, halted(), info, nand_device::target, and target_write_u8().
Referenced by davinci_read_page_ecc4infix().
|
static |
Definition at line 67 of file davinci.c.
References nand_device::controller_priv, ERROR_NAND_OPERATION_FAILED, ERROR_OK, halted(), info, LOG_ERROR, NANDFCR, nand_device::target, and target_read_u32().
|
static |
Definition at line 97 of file davinci.c.
References alive_sleep(), nand_device::controller_priv, halted(), info, NANDFSR, nand_device::target, and target_read_u32().
Referenced by davinci_read_page_ecc4infix(), davinci_seek_column(), and davinci_writepage_tail().
|
static |
Definition at line 170 of file davinci.c.
References nand_device::controller_priv, ERROR_NAND_OPERATION_FAILED, ERROR_OK, halted(), info, nand_device::target, target_read_u32(), and target_read_u8().
Referenced by davinci_read_page_ecc4infix().
|
static |
Definition at line 156 of file davinci.c.
References nand_device::controller_priv, ERROR_NAND_OPERATION_FAILED, ERROR_OK, halted(), info, nand_device::target, and target_read_u8().
|
static |
Definition at line 290 of file davinci.c.
References nand_device::controller_priv, davinci_nand::data, nand_device::device, ERROR_NAND_DEVICE_NOT_PROBED, ERROR_NAND_OPERATION_FAILED, halted(), info, and nand_device::target.
|
static |
Definition at line 603 of file davinci.c.
References davinci_command(), davinci_nand_ready(), davinci_read_block_data(), davinci_seek_column(), davinci_write_pagecmd(), ERROR_NAND_OPERATION_TIMEOUT, ERROR_OK, NAND_CMD_READ0, NAND_CMD_READSTART, and nand_device::page_size.
|
static |
|
static |
Definition at line 326 of file davinci.c.
References nand_device::controller_priv, davinci_nand_ready(), ERROR_NAND_OPERATION_TIMEOUT, ERROR_OK, info, NAND_CMD_RNDOUT, NAND_CMD_RNDOUTSTART, nand_device::page_size, nand_device::target, and target_write_u8().
Referenced by davinci_read_page_ecc4infix().
|
static |
Definition at line 203 of file davinci.c.
References arm_nandwrite(), nand_device::controller_priv, ERROR_NAND_NO_BUFFER, ERROR_NAND_OPERATION_FAILED, ERROR_OK, halted(), info, le_to_h_u32(), status, nand_device::target, target_write_u32(), and target_write_u8().
Referenced by davinci_write_page_ecc1(), davinci_write_page_ecc4(), davinci_write_page_ecc4infix(), and davinci_writepage_tail().
|
static |
Definition at line 144 of file davinci.c.
References nand_device::controller_priv, ERROR_NAND_OPERATION_FAILED, ERROR_OK, halted(), info, nand_device::target, and target_write_u8().
|
static |
Definition at line 239 of file davinci.c.
References nand_device::controller_priv, davinci_nand::data, nand_device::device, ERROR_NAND_DEVICE_NOT_PROBED, ERROR_NAND_OPERATION_FAILED, halted(), info, LOG_ERROR, NULL, nand_device::page_size, status, and nand_device::target.
|
static |
Definition at line 379 of file davinci.c.
References nand_device::controller_priv, davinci_write_block_data(), davinci_write_pagecmd(), davinci_writepage_tail(), info, NAND_CMD_SEQIN, NANDFCR, NANDFECC, nand_device::page_size, nand_device::target, target_read_u32(), and target_write_u32().
|
static |
Definition at line 446 of file davinci.c.
References nand_device::controller_priv, davinci_write_block_data(), davinci_write_pagecmd(), davinci_writepage_tail(), info, NAND4BITECC, NAND_CMD_SEQIN, NANDERRVAL, NANDFCR, nand_device::page_size, nand_device::target, target_read_u32(), and target_write_u32().
|
static |
Definition at line 548 of file davinci.c.
References nand_device::controller_priv, davinci_write_block_data(), davinci_write_pagecmd(), davinci_writepage_tail(), info, NAND4BITECC, NAND_CMD_SEQIN, NANDERRVAL, NANDFCR, NULL, nand_device::target, target_read_u32(), and target_write_u32().
|
static |
Definition at line 303 of file davinci.c.
References nand_device::address_cycles, cmd, nand_device::controller_priv, info, nand_device::page_size, nand_device::target, and target_write_u8().
Referenced by davinci_read_page_ecc4infix(), davinci_write_page_ecc1(), davinci_write_page_ecc4(), and davinci_write_page_ecc4infix().
|
static |
Definition at line 347 of file davinci.c.
References nand_device::controller_priv, davinci_nand_ready(), davinci_write_block_data(), ERROR_NAND_OPERATION_FAILED, ERROR_NAND_OPERATION_TIMEOUT, ERROR_OK, info, LOG_ERROR, NAND_CMD_PAGEPROG, nand_read_status(), NAND_STATUS_FAIL, status, nand_device::target, and target_write_u8().
Referenced by davinci_write_page_ecc1(), davinci_write_page_ecc4(), and davinci_write_page_ecc4infix().
|
static |
Definition at line 58 of file davinci.c.
References label, LOG_ERROR, target::state, and TARGET_HALTED.
Referenced by aarch64_halt_smp(), aarch64_wait_halt_one(), check_not_halted(), cortex_m_poll_smp(), davinci_address(), davinci_command(), davinci_init(), davinci_nand_ready(), davinci_read_block_data(), davinci_read_data(), davinci_read_page(), davinci_write_block_data(), davinci_write_data(), davinci_write_page(), and examine().
NAND_DEVICE_COMMAND_HANDLER | ( | davinci_nand_device_command | ) |
struct nand_flash_controller davinci_nand_controller |