diff options
| -rw-r--r-- | flashchips.c | 349 | 
1 files changed, 314 insertions, 35 deletions
| diff --git a/flashchips.c b/flashchips.c index 465950b0..0803dd06 100644 --- a/flashchips.c +++ b/flashchips.c @@ -4729,7 +4729,26 @@ struct flashchip flashchips[] = {  		.tested		= TEST_UNTESTED,  		.probe		= probe_spi_rdid,  		.probe_timing	= TIMING_ZERO, -		.erase		= spi_chip_erase_c7, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {4 * 1024, 32} }, +				.block_erase = spi_block_erase_20, +			}, { +				.eraseblocks = { {32 * 1024, 4} }, +				.block_erase = spi_block_erase_52, +			}, { +				.eraseblocks = { {64 * 1024, 2} }, +				.block_erase = spi_block_erase_d8, +			}, { +				.eraseblocks = { {128 * 1024, 1} }, +				.block_erase = spi_block_erase_60, +			}, { +				.eraseblocks = { {128 * 1024, 1} }, +				.block_erase = spi_block_erase_c7, +			} +		},  		.write		= spi_chip_write_256,  		.read		= spi_chip_read,  	}, @@ -4745,7 +4764,26 @@ struct flashchip flashchips[] = {  		.tested		= TEST_UNTESTED,  		.probe		= probe_spi_rdid,  		.probe_timing	= TIMING_ZERO, -		.erase		= spi_chip_erase_c7, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {4 * 1024, 64} }, +				.block_erase = spi_block_erase_20, +			}, { +				.eraseblocks = { {32 * 1024, 8} }, +				.block_erase = spi_block_erase_52, +			}, { +				.eraseblocks = { {64 * 1024, 4} }, +				.block_erase = spi_block_erase_d8, +			}, { +				.eraseblocks = { {256 * 1024, 1} }, +				.block_erase = spi_block_erase_60, +			}, { +				.eraseblocks = { {256 * 1024, 1} }, +				.block_erase = spi_block_erase_c7, +			} +		},  		.write		= spi_chip_write_256,  		.read		= spi_chip_read,  	}, @@ -4758,10 +4796,29 @@ struct flashchip flashchips[] = {  		.model_id	= W_25X40,  		.total_size	= 512,  		.page_size	= 256, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_spi_rdid,  		.probe_timing	= TIMING_ZERO, -		.erase		= spi_chip_erase_c7, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {4 * 1024, 128} }, +				.block_erase = spi_block_erase_20, +			}, { +				.eraseblocks = { {32 * 1024, 16} }, +				.block_erase = spi_block_erase_52, +			}, { +				.eraseblocks = { {64 * 1024, 8} }, +				.block_erase = spi_block_erase_d8, +			}, { +				.eraseblocks = { {512 * 1024, 1} }, +				.block_erase = spi_block_erase_60, +			}, { +				.eraseblocks = { {512 * 1024, 1} }, +				.block_erase = spi_block_erase_c7, +			} +		},  		.write		= spi_chip_write_256,  		.read		= spi_chip_read,  	}, @@ -4774,10 +4831,29 @@ struct flashchip flashchips[] = {  		.model_id	= W_25X80,  		.total_size	= 1024,  		.page_size	= 256, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_spi_rdid,  		.probe_timing	= TIMING_ZERO, -		.erase		= spi_chip_erase_c7, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {4 * 1024, 256} }, +				.block_erase = spi_block_erase_20, +			}, { +				.eraseblocks = { {32 * 1024, 32} }, +				.block_erase = spi_block_erase_52, +			}, { +				.eraseblocks = { {64 * 1024, 16} }, +				.block_erase = spi_block_erase_d8, +			}, { +				.eraseblocks = { {1024 * 1024, 1} }, +				.block_erase = spi_block_erase_60, +			}, { +				.eraseblocks = { {1024 * 1024, 1} }, +				.block_erase = spi_block_erase_c7, +			} +		},  		.write		= spi_chip_write_256,  		.read		= spi_chip_read,  	}, @@ -4793,7 +4869,26 @@ struct flashchip flashchips[] = {  		.tested		= TEST_OK_PR,  		.probe		= probe_spi_rdid,  		.probe_timing	= TIMING_ZERO, -		.erase		= spi_chip_erase_c7, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {4 * 1024, 512} }, +				.block_erase = spi_block_erase_20, +			}, { +				.eraseblocks = { {32 * 1024, 64} }, +				.block_erase = spi_block_erase_52, +			}, { +				.eraseblocks = { {64 * 1024, 32} }, +				.block_erase = spi_block_erase_d8, +			}, { +				.eraseblocks = { {2 * 1024 * 1024, 1} }, +				.block_erase = spi_block_erase_60, +			}, { +				.eraseblocks = { {2 * 1024 * 1024, 1} }, +				.block_erase = spi_block_erase_c7, +			} +		},  		.write		= spi_chip_write_256,  		.read		= spi_chip_read,  	}, @@ -4809,7 +4904,26 @@ struct flashchip flashchips[] = {  		.tested		= TEST_OK_PROBE,  		.probe		= probe_spi_rdid,  		.probe_timing	= TIMING_ZERO, -		.erase		= spi_chip_erase_c7, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {4 * 1024, 1024} }, +				.block_erase = spi_block_erase_20, +			}, { +				.eraseblocks = { {32 * 1024, 128} }, +				.block_erase = spi_block_erase_52, +			}, { +				.eraseblocks = { {64 * 1024, 64} }, +				.block_erase = spi_block_erase_d8, +			}, { +				.eraseblocks = { {4 * 1024 * 1024, 1} }, +				.block_erase = spi_block_erase_60, +			}, { +				.eraseblocks = { {4 * 1024 * 1024, 1} }, +				.block_erase = spi_block_erase_c7, +			} +		},  		.write		= spi_chip_write_256,  		.read		= spi_chip_read,  	}, @@ -4825,7 +4939,26 @@ struct flashchip flashchips[] = {  		.tested		= TEST_UNTESTED,  		.probe		= probe_spi_rdid,  		.probe_timing	= TIMING_ZERO, -		.erase		= spi_chip_erase_c7, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {4 * 1024, 2048} }, +				.block_erase = spi_block_erase_20, +			}, { +				.eraseblocks = { {32 * 1024, 256} }, +				.block_erase = spi_block_erase_52, +			}, { +				.eraseblocks = { {64 * 1024, 128} }, +				.block_erase = spi_block_erase_d8, +			}, { +				.eraseblocks = { {8 * 1024 * 1024, 1} }, +				.block_erase = spi_block_erase_60, +			}, { +				.eraseblocks = { {8 * 1024 * 1024, 1} }, +				.block_erase = spi_block_erase_c7, +			} +		},  		.write		= spi_chip_write_256,  		.read		= spi_chip_read,  	}, @@ -4838,10 +4971,17 @@ struct flashchip flashchips[] = {  		.model_id	= W_29C011,  		.total_size	= 128,  		.page_size	= 128, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_jedec,  		.probe_timing	= 10,		/* used datasheet for the W29C011A */ -		.erase		= erase_chip_jedec, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {128 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_jedec,  		.read		= read_memmapped,  	}, @@ -4854,10 +4994,17 @@ struct flashchip flashchips[] = {  		.model_id	= W_29C020C,  		.total_size	= 256,  		.page_size	= 128, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_jedec,  		.probe_timing	= 10,  -		.erase		= erase_chip_jedec, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {256 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_jedec,  		.read		= read_memmapped,  	}, @@ -4870,10 +5017,17 @@ struct flashchip flashchips[] = {  		.model_id	= W_29C040P,  		.total_size	= 512,  		.page_size	= 256, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_jedec,  		.probe_timing	= 10,  -		.erase		= erase_chip_jedec, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {512 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_jedec,  		.read		= read_memmapped,  	}, @@ -4886,10 +5040,17 @@ struct flashchip flashchips[] = {  		.model_id	= W_29C011,  		.total_size	= 128,  		.page_size	= 128, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_w29ee011,  		.probe_timing	= TIMING_IGNORED, /* routine don't use probe_timing (w29ee011.c) */ -		.erase		= erase_chip_jedec, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {128 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_jedec,  		.read		= read_memmapped,  	}, @@ -4902,10 +5063,20 @@ struct flashchip flashchips[] = {  		.model_id	= W_39V040A,  		.total_size	= 512,  		.page_size	= 64 * 1024, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_jedec,  		.probe_timing	= 10,  -		.erase		= erase_chip_jedec, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {64 * 1024, 8} }, +				.block_erase = erase_sector_jedec, +			}, { +				.eraseblocks = { {512 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_49f002,  		.read		= read_memmapped,  	}, @@ -4918,10 +5089,20 @@ struct flashchip flashchips[] = {  		.model_id	= W_39V040B,  		.total_size	= 512,  		.page_size	= 64 * 1024, -		.tested		= TEST_OK_PR | TEST_BAD_ERASE | TEST_BAD_WRITE, +		.tested		= TEST_OK_PR | TEST_BAD_WRITE,  		.probe		= probe_jedec,  		.probe_timing	= 10,  -		.erase		= erase_chip_jedec, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {64 * 1024, 8} }, +				.block_erase = erase_sector_jedec, +			}, { +				.eraseblocks = { {512 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_49f002,  		.read		= read_memmapped,  	}, @@ -4934,10 +5115,20 @@ struct flashchip flashchips[] = {  		.model_id	= W_39V040C,  		.total_size	= 512,  		.page_size	= 64 * 1024, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_w39v040c,  		.probe_timing	= TIMING_FIXME, -		.erase		= erase_w39v040c, +		.erase		= NULL, /* Was erase_w39v040c */ +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {64 * 1024, 8} }, +				.block_erase = erase_sector_jedec, +			}, { +				.eraseblocks = { {512 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_w39v040c,  		.read		= read_memmapped,  	}, @@ -4950,10 +5141,23 @@ struct flashchip flashchips[] = {  		.model_id	= W_39V040FA,  		.total_size	= 512,  		.page_size	= 64 * 1024, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_jedec,  		.probe_timing	= 10,  -		.erase		= erase_chip_jedec, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {4 * 1024, 128} }, +				.block_erase = erase_block_jedec, +			}, { +				.eraseblocks = { {64 * 1024, 8} }, +				.block_erase = erase_sector_jedec, +			}, { +				.eraseblocks = { {512 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_49f002,  		.read		= read_memmapped,  	}, @@ -4966,10 +5170,20 @@ struct flashchip flashchips[] = {  		.model_id	= W_39V080A,  		.total_size	= 1024,  		.page_size	= 64 * 1024, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_jedec,  		.probe_timing	= 10,  -		.erase		= erase_chip_jedec, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {64 * 1024, 16} }, +				.block_erase = erase_sector_jedec, +			}, { +				.eraseblocks = { {1024 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_49f002,  		.read		= read_memmapped,  	}, @@ -4982,10 +5196,25 @@ struct flashchip flashchips[] = {  		.model_id	= W_49F002U,  		.total_size	= 256,  		.page_size	= 128, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_jedec,  		.probe_timing	= 10, -		.erase		= erase_chip_jedec, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { +					{128 * 1024, 1}, +					{96 * 1024, 1}, +					{8 * 1024, 2}, +					{16 * 1024, 1}, +				}, +				.block_erase = erase_sector_jedec, +			}, { +				.eraseblocks = { {256 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_49f002,  		.read		= read_memmapped,  	}, @@ -4998,10 +5227,25 @@ struct flashchip flashchips[] = {  		.model_id	= W_49V002A,  		.total_size	= 256,  		.page_size	= 128, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_jedec,  		.probe_timing	= 10,  -		.erase		= erase_chip_jedec, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { +					{64 * 1024, 3}, +					{32 * 1024, 1}, +					{8 * 1024, 2}, +					{16 * 1024, 1}, +				}, +				.block_erase = erase_sector_jedec, +			}, { +				.eraseblocks = { {256 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_49f002,  		.read		= read_memmapped,  	}, @@ -5017,7 +5261,22 @@ struct flashchip flashchips[] = {  		.tested		= TEST_UNTESTED,  		.probe		= probe_jedec,  		.probe_timing	= 10, -		.erase		= erase_chip_jedec, +		.erase		= NULL, +		.block_erasers	= +		{ +			{ +				.eraseblocks = { +					{64 * 1024, 3}, +					{32 * 1024, 1}, +					{8 * 1024, 2}, +					{16 * 1024, 1}, +				}, +				.block_erase = erase_sector_jedec, +			}, { +				.eraseblocks = { {256 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_49f002,  		.read		= read_memmapped,  	}, @@ -5031,10 +5290,20 @@ struct flashchip flashchips[] = {  		.total_size	= 1024,  		.page_size	= 64 * 1024,  		.feature_bits	= FEATURE_REGISTERMAP, -		.tested		= TEST_OK_PREW, +		.tested		= TEST_OK_PRW,  		.probe		= probe_jedec,  		.probe_timing	= TIMING_FIXME, -		.erase		= erase_winbond_fwhub, +		.erase		= NULL, /* Was erase_winbond_fwhub */ +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {64 * 1024, 16}, }, +				.block_erase = erase_sector_jedec, +			}, { +				.eraseblocks = { {1024 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_winbond_fwhub,  		.read		= read_memmapped,  	}, @@ -5051,7 +5320,17 @@ struct flashchip flashchips[] = {  		.tested		= TEST_UNTESTED,  		.probe		= probe_jedec,  		.probe_timing	= TIMING_FIXME, -		.erase		= erase_winbond_fwhub, +		.erase		= NULL, /* Was erase_winbond_fwhub */ +		.block_erasers	= +		{ +			{ +				.eraseblocks = { {64 * 1024, 8}, }, +				.block_erase = erase_sector_jedec, +			}, { +				.eraseblocks = { {512 * 1024, 1} }, +				.block_erase = erase_chip_block_jedec, +			} +		},  		.write		= write_winbond_fwhub,  		.read		= read_memmapped,  	}, | 
