Minor NAND updates:

 - Comment which IDs are "museum" IDs:  obsolete first-gen parts,
   some with IDs that are reused with newer parts, 256-byte pages.
   Linux doesn't support these by default, and OpenOCD rejects
   the 256-byte pages.

 - Recognize Micron as a NAND manufacturer.

 - For "nand list", part numbers are the same whether or not the
   part has been probed yet.



Minor NAND updates:

 - Comment which IDs are "museum" IDs:  obsolete first-gen parts,
   some with IDs that are reused with newer parts, 256-byte pages.
   (Linux doesn't support these by default.)

 - Recognize Micron as a NAND manufacturer.

 - For "nand list", part numbers are the same whether or not the
   part has been probed yet.

--- a/src/flash/nand.c
+++ b/src/flash/nand.c
@@ -86,6 +88,7 @@ static command_t *nand_cmd;
  */
 static nand_info_t nand_flash_ids[] =
 {
+	/* start "museum" IDs */
 	{"NAND 1MiB 5V 8-bit",		0x6e, 256, 1, 0x1000, 0},
 	{"NAND 2MiB 5V 8-bit",		0x64, 256, 2, 0x1000, 0},
 	{"NAND 4MiB 5V 8-bit",		0x6b, 512, 4, 0x2000, 0},
@@ -101,6 +104,7 @@ static nand_info_t nand_flash_ids[] =
 	{"NAND 8MiB 3,3V 8-bit",	0xe6, 512, 8, 0x2000, 0},
 	{"NAND 8MiB 1,8V 16-bit",	0x49, 512, 8, 0x2000, NAND_BUSWIDTH_16},
 	{"NAND 8MiB 3,3V 16-bit",	0x59, 512, 8, 0x2000, NAND_BUSWIDTH_16},
+	/* end "museum" IDs */
 
 	{"NAND 16MiB 1,8V 8-bit",	0x33, 512, 16, 0x4000, 0},
 	{"NAND 16MiB 3,3V 8-bit",	0x73, 512, 16, 0x4000, 0},
@@ -172,6 +176,7 @@ static nand_manufacturer_t nand_manuf_id
 	{NAND_MFR_RENESAS, "Renesas"},
 	{NAND_MFR_STMICRO, "ST Micro"},
 	{NAND_MFR_HYNIX, "Hynix"},
+	{NAND_MFR_MICRON, "Micron"},
 	{0x0, NULL},
 };
 
@@ -1062,7 +1067,7 @@ int nand_write_page_raw(struct nand_devi
 int handle_nand_list_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc)
 {
 	nand_device_t *p;
-	int i = 0;
+	int i;
 
 	if (!nand_devices)
 	{
@@ -1070,13 +1075,13 @@ int handle_nand_list_command(struct comm
 		return ERROR_OK;
 	}
 
-	for (p = nand_devices; p; p = p->next)
+	for (p = nand_devices, i = 0; p; p = p->next, i++)
 	{
 		if (p->device)
 			command_print(cmd_ctx, "#%i: %s (%s) pagesize: %i, buswidth: %i, erasesize: %i",
-				i++, p->device->name, p->manufacturer->name, p->page_size, p->bus_width, p->erase_size);
+				i, p->device->name, p->manufacturer->name, p->page_size, p->bus_width, p->erase_size);
 		else
-			command_print(cmd_ctx, "#%i: not probed");
+			command_print(cmd_ctx, "#%i: not probed", i);
 	}
 
 	return ERROR_OK;
--- a/src/flash/nand.h
+++ b/src/flash/nand.h
@@ -95,6 +95,7 @@ enum
 	NAND_MFR_RENESAS = 0x07,
 	NAND_MFR_STMICRO = 0x20,
 	NAND_MFR_HYNIX = 0xad,
+	NAND_MFR_MICRON = 0x2c,
 };
 
 typedef struct nand_manufacturer_s
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to