From 4b177369854b0f1b0f5769b809f2cf1b0ea4f347 Mon Sep 17 00:00:00 2001 From: Michael Karcher Date: Thu, 14 Apr 2011 23:43:19 +0000 Subject: Remove erase_chip_stm50flw0x0x As the comment indicates, that function is not a chip erase function at all, but a function calling a block eraser in a loop. So it adds no extra value to what we already have in the block_eraser infrastructure. Furthermore, that function assumes a uniform sector size layout, but is referenced from flash chip with non-uniform sector size layout, which is just wrong. Corresponding to flashrom svn r1287. Signed-off-by: Michael Karcher Acked-by: Carl-Daniel Hailfinger --- stm50flw0x0x.c | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'stm50flw0x0x.c') diff --git a/stm50flw0x0x.c b/stm50flw0x0x.c index 60e5c452..726a882d 100644 --- a/stm50flw0x0x.c +++ b/stm50flw0x0x.c @@ -114,30 +114,3 @@ int erase_sector_stm50flw0x0x(struct flashchip *flash, unsigned int sector, unsi return 0; } - -/* FIXME: This function is not a real chip erase function. */ -int erase_chip_stm50flw0x0x(struct flashchip *flash, unsigned int addr, unsigned int blocklen) -{ - int i; - int total_size = flash->total_size * 1024; - int page_size = flash->page_size; - - if ((addr != 0) || (blocklen != flash->total_size * 1024)) { - msg_cerr("%s called with incorrect arguments\n", - __func__); - return -1; - } - - for (i = 0; i < total_size / page_size; i++) { - //if (unlock_block_stm50flw0x0x(flash, i * page_size)) { - // msg_cerr("UNLOCK FAILED!\n"); - // return -1; - //} - if (erase_block_82802ab(flash, i * page_size, page_size)) { - msg_cerr("ERASE FAILED!\n"); - return -1; - } - } - - return 0; -} -- cgit v1.2.3