[flashrom] [PATCH 3/8] kill dead w39v080fa.c functions
Sean Nelson
audiohacked at gmail.com
Tue Mar 16 00:45:35 CET 2010
Signed-off-by: Sean Nelson <audiohacked at gmail.com>
---
chipdrivers.h | 3 --
w39v080fa.c | 66 ---------------------------------------------------------
2 files changed, 0 insertions(+), 69 deletions(-)
diff --git a/chipdrivers.h b/chipdrivers.h
index e04b6c0..64c8845 100644
--- a/chipdrivers.h
+++ b/chipdrivers.h
@@ -112,29 +112,26 @@ int write_49lfxxxc(struct flashchip *flash, uint8_t *buf);
int unlock_49lfxxxc(struct flashchip *flash);
/* sst_fwhub.c */
int erase_sst_fwhub(struct flashchip *flash);
int erase_sst_fwhub_block(struct flashchip *flash, unsigned int offset, unsigned int page_size);
int erase_sst_fwhub_sector(struct flashchip *flash, unsigned int offset, unsigned int page_size);
int write_sst_fwhub(struct flashchip *flash, uint8_t *buf);
int printlock_sst_fwhub(struct flashchip *flash);
/* w39v040c.c */
int printlock_w39v040c(struct flashchip *flash);
/* w39V080fa.c */
-int probe_winbond_fwhub(struct flashchip *flash);
-int erase_winbond_fwhub(struct flashchip *flash);
-int write_winbond_fwhub(struct flashchip *flash, uint8_t *buf);
int unlock_winbond_fwhub(struct flashchip *flash);
/* w29ee011.c */
int probe_w29ee011(struct flashchip *flash);
/* stm50flw0x0x.c */
int probe_stm50flw0x0x(struct flashchip *flash);
int erase_stm50flw0x0x(struct flashchip *flash);
int erase_block_stm50flw0x0x(struct flashchip *flash, unsigned int block, unsigned int blocksize);
int erase_sector_stm50flw0x0x(struct flashchip *flash, unsigned int block, unsigned int blocksize);
int erase_chip_stm50flw0x0x(struct flashchip *flash, unsigned int addr, unsigned int blocklen);
int write_stm50flw0x0x(struct flashchip *flash, uint8_t *buf);
diff --git a/w39v080fa.c b/w39v080fa.c
index 0163766..047f86b 100644
--- a/w39v080fa.c
+++ b/w39v080fa.c
@@ -101,79 +101,13 @@ int unlock_winbond_fwhub(struct flashchip *flash)
else
printf_debug("No hardware block locking (good!)\n");
if (locking & ((1 << 2) | (1 << 3)))
return -1;
/* Unlock the complete chip */
for (i = 0; i < total_size; i += flash->page_size)
if (unlock_block_winbond_fwhub(flash, i))
return -1;
return 0;
}
-
-static int erase_sector_winbond_fwhub(struct flashchip *flash,
- unsigned int sector)
-{
- chipaddr bios = flash->virtual_memory;
- /* Remember: too much sleep can waste your day. */
-
- printf("0x%08x\b\b\b\b\b\b\b\b\b\b", sector);
-
- /* Sector Erase */
- chip_writeb(0xAA, bios + 0x5555);
- chip_writeb(0x55, bios + 0x2AAA);
- chip_writeb(0x80, bios + 0x5555);
-
- chip_writeb(0xAA, bios + 0x5555);
- chip_writeb(0x55, bios + 0x2AAA);
- chip_writeb(0x30, bios + sector);
-
- /* wait for Toggle bit ready */
- toggle_ready_jedec(bios);
-
- if (check_erased_range(flash, sector, flash->page_size)) {
- fprintf(stderr, "ERASE FAILED!\n");
- return -1;
- }
- return 0;
-}
-
-int erase_winbond_fwhub(struct flashchip *flash)
-{
- int i, total_size = flash->total_size * 1024;
-
- unlock_winbond_fwhub(flash);
-
- printf("Erasing: ");
-
- for (i = 0; i < total_size; i += flash->page_size) {
- if (erase_sector_winbond_fwhub(flash, i)) {
- fprintf(stderr, "ERASE FAILED!\n");
- return -1;
- }
- }
-
- printf("\n");
-
- return 0;
-}
-
-int write_winbond_fwhub(struct flashchip *flash, uint8_t *buf)
-{
- int i;
- int total_size = flash->total_size * 1024;
- chipaddr bios = flash->virtual_memory;
-
- if (erase_winbond_fwhub(flash))
- return -1;
-
- printf("Programming: ");
- for (i = 0; i < total_size; i += flash->page_size) {
- printf("0x%08x\b\b\b\b\b\b\b\b\b\b", i);
- write_sector_jedec_common(flash, buf + i, bios + i, flash->page_size, 0xffff);
- }
- printf("\n");
-
- return 0;
-}
--
1.6.6
More information about the flashrom
mailing list