summaryrefslogtreecommitdiffstats
path: root/pm49fl00x.c
diff options
context:
space:
mode:
authorSean Nelson <audiohacked@gmail.com>2010-03-16 00:32:30 +0000
committerSean Nelson <audiohacked@gmail.com>2010-03-16 00:32:30 +0000
commit2f9374bd9d64428aa9862efe578eac60dbc0b062 (patch)
tree9a0241d167032b1dd22f8fd9693146e2f34af0cc /pm49fl00x.c
parent81449a2482237487f06e0cc35f01769b0d46b734 (diff)
downloadast2050-flashrom-2f9374bd9d64428aa9862efe578eac60dbc0b062.zip
ast2050-flashrom-2f9374bd9d64428aa9862efe578eac60dbc0b062.tar.gz
Kill dead pm49fl00x.c functions
Corresponding to flashrom svn r938. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'pm49fl00x.c')
-rw-r--r--pm49fl00x.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/pm49fl00x.c b/pm49fl00x.c
index 5e5eec8..fd93ef6 100644
--- a/pm49fl00x.c
+++ b/pm49fl00x.c
@@ -48,72 +48,3 @@ int lock_49fl00x(struct flashchip *flash)
write_lockbits_49fl00x(flash->virtual_registers, flash->total_size * 1024, 1, flash->page_size);
return 0;
}
-
-int erase_49fl00x(struct flashchip *flash)
-{
- int i;
- int total_size = flash->total_size * 1024;
- int page_size = flash->page_size;
-
- /* unprotected */
- write_lockbits_49fl00x(flash->virtual_registers,
- total_size, 0, page_size);
-
- /*
- * erase_chip_jedec() will not work... Datasheet says
- * "Chip erase is available in A/A Mux Mode only".
- */
- printf("Erasing page: ");
- for (i = 0; i < total_size / page_size; i++) {
- /* erase the page */
- if (erase_block_jedec(flash, i * page_size, page_size)) {
- fprintf(stderr, "ERASE FAILED!\n");
- return -1;
- }
- printf("%04d at address: 0x%08x", i, i * page_size);
- printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
- fflush(stdout);
- }
- printf("\n");
-
- /* protected */
- write_lockbits_49fl00x(flash->virtual_registers,
- total_size, 1, page_size);
-
- return 0;
-}
-
-int write_49fl00x(struct flashchip *flash, uint8_t *buf)
-{
- int i;
- int total_size = flash->total_size * 1024;
- int page_size = flash->page_size;
- chipaddr bios = flash->virtual_memory;
-
- /* unprotected */
- write_lockbits_49fl00x(flash->virtual_registers, total_size, 0,
- page_size);
-
- printf("Programming page: ");
- for (i = 0; i < total_size / page_size; i++) {
- /* erase the page before programming */
- if (erase_block_jedec(flash, i * page_size, page_size)) {
- fprintf(stderr, "ERASE FAILED!\n");
- return -1;
- }
-
- /* write to the sector */
- printf("%04d at address: 0x%08x", i, i * page_size);
- write_sector_jedec_common(flash, buf + i * page_size,
- bios + i * page_size, page_size, 0xffff);
- printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
- fflush(stdout);
- }
- printf("\n");
-
- /* protected */
- write_lockbits_49fl00x(flash->virtual_registers, total_size, 1,
- page_size);
-
- return 0;
-}
OpenPOWER on IntegriCloud