diff loadtools/flmain.c @ 325:545e1718f5fb

fc-loadtool: support for 28F640W30B flash chip with partition quirks
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 20 Jan 2018 05:20:40 +0000
parents e7502631a0f9
children 0dd2c87c1b63
line wrap: on
line diff
--- a/loadtools/flmain.c	Fri Dec 29 20:38:39 2017 +0000
+++ b/loadtools/flmain.c	Sat Jan 20 05:20:40 2018 +0000
@@ -57,6 +57,24 @@
 	{0x800000, &pl129n_ce2_geom, pl129n_idcheck, 4}
 };
 
+/* 28F640W30B device description */
+
+static struct flash_geom f640w30b_geom = {
+	.total_size	= 0x800000,
+	.nregions	= 2,
+	.regions	= {0x2000, 8, 0x10000, 127},
+	.total_sectors	= 135,
+};
+
+static struct flash_idcheck f640w30b_idcheck[2] = {
+	{0x00, 0x0089},
+	{0x02, 0x8855}
+};
+
+static struct flash_bank_desc f640w30b_bankdesc = {
+	0x800000, &f640w30b_geom, f640w30b_idcheck, 2
+};
+
 /* bank configurations for CFI */
 
 static struct flash_bank_desc cfi_4M_bankdesc = {
@@ -70,12 +88,14 @@
 /* list of supported flash devices */
 
 extern struct flash_cmdset flash_cmdset_amd;
+extern struct flash_cmdset flash_cmdset_intel_w30;
 
 struct flash_device_desc flash_device_list[] = {
 	{"cfi-4M", &cfi_4M_bankdesc, 1, 0},
 	{"cfi-8M", &cfi_8M_bankdesc, 1, 0},
 	{"k5a32xx_t", &k5a32xx_topboot_bankdesc, 1, &flash_cmdset_amd},
 	{"pl129n", pl129n_banks, 2, &flash_cmdset_amd},
+	{"28f640w30b", &f640w30b_bankdesc, 1, &flash_cmdset_intel_w30},
 	{0, 0, 0, 0}	/* array terminator */
 };