summaryrefslogtreecommitdiffstats
path: root/jedec.c
diff options
context:
space:
mode:
authorSean Nelson <audiohacked@gmail.com>2009-12-22 22:15:33 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-12-22 22:15:33 +0000
commit72a9a02b3864fb730ae9a8cff35266633842e324 (patch)
tree23d129299edf5dd7c00925c60fa66c3e3a23e5ae /jedec.c
parent63ce4bb0d26046d9de0769502740120f478d86ac (diff)
downloadast2050-flashrom-72a9a02b3864fb730ae9a8cff35266633842e324.zip
ast2050-flashrom-72a9a02b3864fb730ae9a8cff35266633842e324.tar.gz
Convert the following chips to use struct eraseblock
Am29F010A/B Am29F002(N)BB Am29F002(N)BT Am29F016D Am29F040B Am29F080B Am29LV040B Am29LV081B A29040B Pm29F002T Pm29F002B Change function signature of Am29 erase functions and JEDEC chip erase to be usable with block_erasers. Corresponding to flashrom svn r812. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'jedec.c')
-rw-r--r--jedec.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/jedec.c b/jedec.c
index 800d9d2..d6cad41 100644
--- a/jedec.c
+++ b/jedec.c
@@ -245,6 +245,17 @@ int erase_block_jedec(struct flashchip *flash, unsigned int block, unsigned int
return 0;
}
+/* erase chip with block_erase() prototype */
+int erase_chip_block_jedec(struct flashchip *flash, unsigned int addr, unsigned int blocksize)
+{
+ if ((addr != 0) || (blocksize != flash->total_size * 1024)) {
+ fprintf(stderr, "%s called with incorrect arguments\n",
+ __func__);
+ return -1;
+ }
+ return erase_chip_jedec(flash);
+}
+
int erase_chip_jedec(struct flashchip *flash)
{
int total_size = flash->total_size * 1024;
OpenPOWER on IntegriCloud