From dfe32dee250a28968f398f983c73a9fa0ec1f717 Mon Sep 17 00:00:00 2001 From: hailfinger Date: Tue, 22 Dec 2009 22:15:33 +0000 Subject: 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. Signed-off-by: Sean Nelson Acked-by: Carl-Daniel Hailfinger git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@812 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- jedec.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'jedec.c') 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; -- cgit v1.2.1