diff loadtools/ltflash.c @ 401:7ceeec049be4

fc-loadtool flash: bank configurations for CFI
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 15 Jun 2014 20:24:51 +0000
parents f027c6fbe37e
children
line wrap: on
line diff
--- a/loadtools/ltflash.c	Sun Jun 15 20:05:54 2014 +0000
+++ b/loadtools/ltflash.c	Sun Jun 15 20:24:51 2014 +0000
@@ -60,9 +60,21 @@
 	{0x800000, &pl129n_ce2_hardcfi, pl129n_idcheck, 4}
 };
 
+/* bank configurations for CFI */
+
+static struct flash_bank_desc cfi_4M_bankdesc = {
+	0x400000, 0, 0, 0
+};
+
+static struct flash_bank_desc cfi_8M_bankdesc = {
+	0x800000, 0, 0, 0
+};
+
 /* list of supported flash devices */
 
 struct flash_device_desc flash_device_list[] = {
+	{"cfi-4M", &cfi_4M_bankdesc, 1},
+	{"cfi-8M", &cfi_8M_bankdesc, 1},
 	{"k5a32xx_t", &k5a32xx_topboot_bankdesc, 1},
 	{"pl129n", pl129n_banks, 2},
 	{0, 0, 0}	/* array terminator */
@@ -277,6 +289,7 @@
 	printf("Bank %d total size: %lx\n", bank, (u_long) bi->cfi->total_size);
 	printf("Sectors in bank %d: %u (%u regions)\n", bank,
 		bi->cfi->total_sectors, bi->cfi->nregions);
+	printf("Command set style: %04X\n", bi->cfi->cmdset_style);
 	flash_id_check(bank, 1);
 	if (selected_flash_device->nbanks == 2 && !bank)
 	    printf("\nFlash device has 2 banks; flash2 command available\n");