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

Go to the source code of this file.

Macros

#define DATA_OFFS   0x200
 
#define ECC_OFFS   0x120
 
#define SPARE_OFFS   0x140
 

Functions

 COMMAND_HANDLER (handle_lpc3180_select_command)
 
static int lpc3180_address (struct nand_device *nand, uint8_t address)
 
static int lpc3180_command (struct nand_device *nand, uint8_t command)
 
static int lpc3180_controller_ready (struct nand_device *nand, int timeout)
 
static float lpc3180_cycle_time (struct nand_device *nand)
 
static int lpc3180_init (struct nand_device *nand)
 
static int lpc3180_nand_ready (struct nand_device *nand, int timeout)
 
static int lpc3180_pll (int fclkin, uint32_t pll_ctrl)
 
static int lpc3180_read_data (struct nand_device *nand, void *data)
 
static int lpc3180_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 lpc3180_reset (struct nand_device *nand)
 
static int lpc3180_tc_ready (struct nand_device *nand, int timeout)
 
static int lpc3180_write_data (struct nand_device *nand, uint16_t data)
 
static int lpc3180_write_page (struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size)
 
 NAND_DEVICE_COMMAND_HANDLER (lpc3180_nand_device_command)
 

Variables

static const struct command_registration lpc3180_command_handler []
 
static const struct command_registration lpc3180_exec_command_handlers []
 
struct nand_flash_controller lpc3180_nand_controller
 

Macro Definition Documentation

◆ DATA_OFFS

#define DATA_OFFS   0x200

Definition at line 25 of file lpc3180.c.

◆ ECC_OFFS

#define ECC_OFFS   0x120

Definition at line 23 of file lpc3180.c.

◆ SPARE_OFFS

#define SPARE_OFFS   0x140

Definition at line 24 of file lpc3180.c.

Function Documentation

◆ COMMAND_HANDLER()

◆ lpc3180_address()

◆ lpc3180_command()

◆ lpc3180_controller_ready()

◆ lpc3180_cycle_time()

static float lpc3180_cycle_time ( struct nand_device nand)
static

◆ lpc3180_init()

◆ lpc3180_nand_ready()

◆ lpc3180_pll()

static int lpc3180_pll ( int  fclkin,
uint32_t  pll_ctrl 
)
static

Definition at line 55 of file lpc3180.c.

References LOG_WARNING.

Referenced by lpc3180_cycle_time().

◆ lpc3180_read_data()

◆ lpc3180_read_page()

◆ lpc3180_reset()

◆ lpc3180_tc_ready()

◆ lpc3180_write_data()

◆ lpc3180_write_page()

◆ NAND_DEVICE_COMMAND_HANDLER()

Variable Documentation

◆ lpc3180_command_handler

const struct command_registration lpc3180_command_handler[]
static
Initial value:
= {
{
.name = "lpc3180",
.mode = COMMAND_ANY,
.help = "LPC3180 NAND flash controller commands",
.usage = "",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:253
@ COMMAND_ANY
Definition: command.h:42
static const struct command_registration lpc3180_exec_command_handlers[]
Definition: lpc3180.c:1312

Definition at line 1267 of file lpc3180.c.

◆ lpc3180_exec_command_handlers

const struct command_registration lpc3180_exec_command_handlers[]
static
Initial value:
= {
{
.name = "select",
.handler = handle_lpc3180_select_command,
.mode = COMMAND_EXEC,
.help =
"select MLC or SLC controller (default is MLC), SLC can be set to bulk mode",
.usage = "bank_id ['mlc'|'slc' ['bulk'] ]",
},
}
@ COMMAND_EXEC
Definition: command.h:40

Definition at line 1267 of file lpc3180.c.

◆ lpc3180_nand_controller

Initial value:
= {
.name = "lpc3180",
.nand_device_command = lpc3180_nand_device_command,
.init = lpc3180_init,
.reset = lpc3180_reset,
.command = lpc3180_command,
.address = lpc3180_address,
.write_data = lpc3180_write_data,
.read_data = lpc3180_read_data,
.write_page = lpc3180_write_page,
.read_page = lpc3180_read_page,
.nand_ready = lpc3180_nand_ready,
}
static int lpc3180_init(struct nand_device *nand)
Definition: lpc3180.c:127
static int lpc3180_read_page(struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size)
Definition: lpc3180.c:796
static int lpc3180_read_data(struct nand_device *nand, void *data)
Definition: lpc3180.c:366
static int lpc3180_command(struct nand_device *nand, uint8_t command)
Definition: lpc3180.c:294
static int lpc3180_write_page(struct nand_device *nand, uint32_t page, uint8_t *data, uint32_t data_size, uint8_t *oob, uint32_t oob_size)
Definition: lpc3180.c:412
static int lpc3180_write_data(struct nand_device *nand, uint16_t data)
Definition: lpc3180.c:342
static int lpc3180_address(struct nand_device *nand, uint8_t address)
Definition: lpc3180.c:318
static int lpc3180_reset(struct nand_device *nand)
Definition: lpc3180.c:260
static int lpc3180_nand_ready(struct nand_device *nand, int timeout)
Definition: lpc3180.c:1192
static const struct command_registration lpc3180_command_handler[]
Definition: lpc3180.c:1323

Definition at line 1267 of file lpc3180.c.