summaryrefslogtreecommitdiffstats
path: root/stm50flw0x0x.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-10-08 18:52:29 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-10-08 18:52:29 +0000
commitf52f784bb300ec0acbd6c6bd9e6c3e5b435c4a90 (patch)
tree957964a468245432abbd23cd06839898b64105ce /stm50flw0x0x.c
parent92c8b0cec2ed06db9c24c4d93cf38a596edf23ab (diff)
downloadflashrom-f52f784bb300ec0acbd6c6bd9e6c3e5b435c4a90.tar.gz
flashrom-f52f784bb300ec0acbd6c6bd9e6c3e5b435c4a90.tar.bz2
flashrom-f52f784bb300ec0acbd6c6bd9e6c3e5b435c4a90.zip
Move implicit erase out of chip drivers
Flashrom had an implicit erase-on-write for most flash chip and programmer drivers, but it was not entirely consistent. Some drivers had their own hand-rolled partial update functionality which made handling partial updates from generic code impossible. Move implicit erase out of chip drivers, and kill some dead erase functions at the same time. A full chip erase is now performed in the generic code for all flash chips on write, and after that the whole chip is written. Corresponding to flashrom svn r1206. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Diffstat (limited to 'stm50flw0x0x.c')
-rw-r--r--stm50flw0x0x.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stm50flw0x0x.c b/stm50flw0x0x.c
index 6a3b17d9b..dd6cbe768 100644
--- a/stm50flw0x0x.c
+++ b/stm50flw0x0x.c
@@ -93,6 +93,7 @@ int unlock_stm50flw0x0x(struct flashchip *flash)
return 0;
}
+/* This function is unused. */
int erase_sector_stm50flw0x0x(struct flashchip *flash, unsigned int sector, unsigned int sectorsize)
{
chipaddr bios = flash->virtual_memory + sector;
@@ -116,6 +117,7 @@ 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;