diff options
Diffstat (limited to 'src/flash')
-rw-r--r-- | src/flash/nand/at91sam9.c | 14 | ||||
-rw-r--r-- | src/flash/nand/lpc3180.c | 34 | ||||
-rw-r--r-- | src/flash/nand/tcl.c | 50 |
3 files changed, 50 insertions, 48 deletions
diff --git a/src/flash/nand/at91sam9.c b/src/flash/nand/at91sam9.c index 5cfbb0a3..92ab047f 100644 --- a/src/flash/nand/at91sam9.c +++ b/src/flash/nand/at91sam9.c @@ -697,28 +697,30 @@ static const struct command_registration at91sam9_sub_command_handlers[] = { .handler = handle_at91sam9_cle_command, .mode = COMMAND_CONFIG, .help = "set command latch enable address line (default is 22)", - .usage = "<device_id> <address_line>", + .usage = "bank_id address_line", }, { .name = "ale", .handler = handle_at91sam9_ale_command, .mode = COMMAND_CONFIG, .help = "set address latch enable address line (default is 21)", - .usage = "<device_id> <address_line>", + .usage = "bank_id address_line", }, { .name = "rdy_busy", .handler = handle_at91sam9_rdy_busy_command, .mode = COMMAND_CONFIG, - .help = "set the input pin connected to RDY/~BUSY signal (no default)", - .usage = "<device_id> <base_pioc> <pin_num>", + .help = "set the GPIO input pin connected to " + "the RDY/~BUSY signal (no default)", + .usage = "bank_id pio_base_addr pin_num", }, { .name = "ce", .handler = handle_at91sam9_ce_command, .mode = COMMAND_CONFIG, - .help = "set the output pin connected to chip enable signal (no default)", - .usage = "<device_id> <base_pioc> <pin_num>", + .help = "set the GPIO output pin connected to " + "the chip enable signal (no default)", + .usage = "bank_id pio_base_addr pin_num", }, COMMAND_REGISTRATION_DONE }; diff --git a/src/flash/nand/lpc3180.c b/src/flash/nand/lpc3180.c index 4268b66e..51ab34bc 100644 --- a/src/flash/nand/lpc3180.c +++ b/src/flash/nand/lpc3180.c @@ -878,10 +878,10 @@ COMMAND_HANDLER(handle_lpc3180_select_command) static const struct command_registration lpc3180_exec_command_handlers[] = { { .name = "select", - .handler = &handle_lpc3180_select_command, + .handler = handle_lpc3180_select_command, .mode = COMMAND_EXEC, - .help = "select <'mlc'|'slc'> controller (default is mlc)", - .usage = "<device_id> (mlc|slc)", + .help = "select MLC or SLC controller (default is MLC)", + .usage = "bank_id ['mlc'|'slc']", }, COMMAND_REGISTRATION_DONE }; @@ -896,17 +896,17 @@ static const struct command_registration lpc3180_command_handler[] = { }; struct nand_flash_controller lpc3180_nand_controller = { - .name = "lpc3180", - .commands = lpc3180_command_handler, - .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, - .controller_ready = lpc3180_controller_ready, - .nand_ready = lpc3180_nand_ready, - }; + .name = "lpc3180", + .commands = lpc3180_command_handler, + .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, + .controller_ready = lpc3180_controller_ready, + .nand_ready = lpc3180_nand_ready, +}; diff --git a/src/flash/nand/tcl.c b/src/flash/nand/tcl.c index 4f90c7b1..29b4b69d 100644 --- a/src/flash/nand/tcl.c +++ b/src/flash/nand/tcl.c @@ -446,68 +446,67 @@ COMMAND_HANDLER(handle_nand_raw_access_command) static const struct command_registration nand_exec_command_handlers[] = { { .name = "list", - .handler = &handle_nand_list_command, + .handler = handle_nand_list_command, .mode = COMMAND_EXEC, .help = "list configured NAND flash devices", }, { .name = "info", - .handler = &handle_nand_info_command, + .handler = handle_nand_info_command, .mode = COMMAND_EXEC, - .usage = "<bank>", - .help = "print info about a NAND flash device", + .usage = "[banknum | first_bank_num last_bank_num]", + .help = "print info about one or more NAND flash devices", }, { .name = "probe", - .handler = &handle_nand_probe_command, + .handler = handle_nand_probe_command, .mode = COMMAND_EXEC, - .usage = "<bank>", - .help = "identify NAND flash device <num>", - + .usage = "bank_id", + .help = "identify NAND flash device", }, { .name = "check_bad_blocks", - .handler = &handle_nand_check_bad_blocks_command, + .handler = handle_nand_check_bad_blocks_command, .mode = COMMAND_EXEC, - .usage = "<bank> [<offset> <length>]", - .help = "check NAND flash device <num> for bad blocks", + .usage = "bank_id [offset length]", + .help = "check all or part of NAND flash device for bad blocks", }, { .name = "erase", - .handler = &handle_nand_erase_command, + .handler = handle_nand_erase_command, .mode = COMMAND_EXEC, - .usage = "<bank> [<offset> <length>]", - .help = "erase blocks on NAND flash device", + .usage = "bank_id [offset length]", + .help = "erase all or subset of blocks on NAND flash device", }, { .name = "dump", - .handler = &handle_nand_dump_command, + .handler = handle_nand_dump_command, .mode = COMMAND_EXEC, - .usage = "<bank> <filename> <offset> <length> " - "[oob_raw | oob_only]", + .usage = "bank_id filename offset length " + "['oob_raw'|'oob_only']", .help = "dump from NAND flash device", }, { .name = "verify", - .handler = &handle_nand_verify_command, + .handler = handle_nand_verify_command, .mode = COMMAND_EXEC, - .usage = "<bank> <filename> <offset> " - "[oob_raw | oob_only | oob_softecc | oob_softecc_kw]", + .usage = "bank_id filename offset " + "['oob_raw'|'oob_only'|'oob_softecc'|'oob_softecc_kw']", .help = "verify NAND flash device", }, { .name = "write", - .handler = &handle_nand_write_command, + .handler = handle_nand_write_command, .mode = COMMAND_EXEC, - .usage = "<bank> <filename> <offset> " - "[oob_raw | oob_only | oob_softecc | oob_softecc_kw]", + .usage = "bank_id filename offset " + "['oob_raw'|'oob_only'|'oob_softecc'|'oob_softecc_kw']", .help = "write to NAND flash device", }, { .name = "raw_access", - .handler = &handle_nand_raw_access_command, + .handler = handle_nand_raw_access_command, .mode = COMMAND_EXEC, - .usage = "<num> ['enable'|'disable']", + .usage = "bank_id ['enable'|'disable']", .help = "raw access to NAND flash device", }, COMMAND_REGISTRATION_DONE @@ -614,6 +613,7 @@ static const struct command_registration nand_config_command_handlers[] = { .handler = &handle_nand_device_command, .mode = COMMAND_CONFIG, .help = "defines a new NAND bank", + .usage = "bank_id driver target [driver_options ...]", }, { .name = "drivers", |