# HG changeset patch
# User Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
# Date 1402863891 0
# Node ID 7ceeec049be4b361131d4d1bc48b16ec9430b97a
# Parent  f027c6fbe37efc9bf80ccdb552760bb2c4654ec2
fc-loadtool flash: bank configurations for CFI

diff -r f027c6fbe37e -r 7ceeec049be4 loadtools/ltflash.c
--- 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");