summaryrefslogtreecommitdiffstats
path: root/spi25.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-06-20 11:02:33 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-06-20 11:02:33 +0000
commit3a25fea9e7726109df0c09aaacefb446ab1a9d0d (patch)
tree7e0d39872f7c96eec1cc3be521eb99b33ac91fd2 /spi25.c
parent1b0ba893529cf93ae54b91607d93d3ad49c259e5 (diff)
downloadflashrom-3a25fea9e7726109df0c09aaacefb446ab1a9d0d.tar.gz
flashrom-3a25fea9e7726109df0c09aaacefb446ab1a9d0d.tar.bz2
flashrom-3a25fea9e7726109df0c09aaacefb446ab1a9d0d.zip
The SPI opcode 0xd8 is not a chip erase opcode on any chip out there
Besides that, the function as implemented just walks the chip and ignores sector sizes. Sector erase with SPI opcode 0xd8 is of course still supported. Kill a declaration for a nonexisting function while we're at it. Corresponding to flashrom svn r1054. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com>
Diffstat (limited to 'spi25.c')
-rw-r--r--spi25.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/spi25.c b/spi25.c
index 83ca20f96..51be3971e 100644
--- a/spi25.c
+++ b/spi25.c
@@ -646,29 +646,6 @@ int spi_block_erase_d7(struct flashchip *flash, unsigned int addr, unsigned int
return 0;
}
-int spi_chip_erase_d8(struct flashchip *flash)
-{
- int i, rc = 0;
- int total_size = flash->total_size * 1024;
- int erase_size = 64 * 1024;
-
- spi_disable_blockprotect();
-
- msg_cinfo("Erasing chip: \n");
-
- for (i = 0; i < total_size / erase_size; i++) {
- rc = spi_block_erase_d8(flash, i * erase_size, erase_size);
- if (rc) {
- msg_cerr("Error erasing block at 0x%x\n", i);
- break;
- }
- }
-
- msg_cinfo("\n");
-
- return rc;
-}
-
/* Sector size is usually 4k, though Macronix eliteflash has 64k */
int spi_block_erase_20(struct flashchip *flash, unsigned int addr, unsigned int blocklen)
{