Re: [Openocd-development] [patch] nand cleanups

2009-05-22 Thread Rick Altherr


Committed revision 1883.

On May 22, 2009, at 1:31 AM, David Brownell wrote:


Remove un-implemented and dubious "nand copy" command.

Doing this efficiently would mean doing the copying on
the target CPU, instead of back and forth through JTAG.
If anyone ever needs this functionality, that's what
they should implement.

Also, update on-line "help" for "nand dump" to display
its two optional flags; and for "nand write" to display
a recently added flag.

---
src/flash/nand.c |   31 +++
1 file changed, 3 insertions(+), 28 deletions(-)

___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


--
Rick Altherr
kc8...@kc8apf.net

"He said he hadn't had a byte in three days. I had a short, so I split  
it with him."

 -- Unsigned





smime.p7s
Description: S/MIME cryptographic signature
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


[Openocd-development] [patch] nand cleanups

2009-05-22 Thread David Brownell
Remove un-implemented and dubious "nand copy" command.

Doing this efficiently would mean doing the copying on
the target CPU, instead of back and forth through JTAG.
If anyone ever needs this functionality, that's what
they should implement.

Also, update on-line "help" for "nand dump" to display
its two optional flags; and for "nand write" to display
a recently added flag.

---
 src/flash/nand.c |   31 +++
 1 file changed, 3 insertions(+), 28 deletions(-)

Remove un-implemented and dubious "nand copy" command.

Doing this efficiently would mean doing the copying on
the target CPU, instead of back and forth through JTAG.
If anyone ever needs this functionality, that's what
they should implement.

Also, update on-line "help" for "nand dump" to display
its two optional flags; and for "nand write" to display
a recently added flag.

---
 src/flash/nand.c |   31 +++
 1 file changed, 3 insertions(+), 28 deletions(-)

--- a/src/flash/nand.c
+++ b/src/flash/nand.c
@@ -35,7 +35,6 @@ static int handle_nand_list_command(stru
 static int handle_nand_probe_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 static int handle_nand_check_bad_blocks_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 static int handle_nand_info_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
-static int handle_nand_copy_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 static int handle_nand_write_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 static int handle_nand_dump_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 static int handle_nand_erase_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
@@ -311,12 +310,11 @@ int nand_init(struct command_context_s *
 		 "check NAND flash device  for bad blocks [ ]");
 		register_command(cmd_ctx, nand_cmd, "erase", handle_nand_erase_command, COMMAND_EXEC,
 		 "erase blocks on NAND flash device   ");
-		register_command(cmd_ctx, nand_cmd, "copy", handle_nand_copy_command, COMMAND_EXEC,
-		 "copy from NAND flash device");
 		register_command(cmd_ctx, nand_cmd, "dump", handle_nand_dump_command, COMMAND_EXEC,
-		 "dump from NAND flash device [options]");
+		 "dump from NAND flash device   "
+		 "  [oob_raw|oob_only]");
 		register_command(cmd_ctx, nand_cmd, "write", handle_nand_write_command, COMMAND_EXEC,
-		 "write to NAND flash device[oob_raw|oob_only|oob_softecc]");
+		 "write to NAND flash device[oob_raw|oob_only|oob_softecc|oob_softecc_kw]");
 		register_command(cmd_ctx, nand_cmd, "raw_access", handle_nand_raw_access_command, COMMAND_EXEC,
 		 "raw access to NAND flash device  ['enable'|'disable']");
 	}
@@ -1270,29 +1268,6 @@ int handle_nand_check_bad_blocks_command
 	return ERROR_OK;
 }
 
-static int handle_nand_copy_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
-{
-	nand_device_t *p;
-
-	if (argc != 4)
-	{
-		return ERROR_COMMAND_SYNTAX_ERROR;
-
-	}
-
-	p = get_nand_device_by_num(strtoul(args[0], NULL, 0));
-	if (p)
-	{
-
-	}
-	else
-	{
-		command_print(cmd_ctx, "NAND flash device '#%s' is out of bounds", args[0]);
-	}
-
-	return ERROR_OK;
-}
-
 static int handle_nand_write_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
 {
 	u32 offset;
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development