Author: stefanct Date: Wed May 1 16:04:19 2013 New Revision: 1672 URL: http://flashrom.org/trac/flashrom/changeset/1672
Log: Update spi_get_erasefn_from_opcode().
We forgot to add a few SPI erase functions to the helper function that is used for SFDP. Also, sort the declarations in the header.
Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
Modified: trunk/chipdrivers.h trunk/spi25.c
Modified: trunk/chipdrivers.h ============================================================================== --- trunk/chipdrivers.h Fri Apr 19 03:59:15 2013 (r1671) +++ trunk/chipdrivers.h Wed May 1 16:04:19 2013 (r1672) @@ -45,12 +45,12 @@ int spi_block_erase_20(struct flashctx *flash, unsigned int addr, unsigned int blocklen); int spi_block_erase_50(struct flashctx *flash, unsigned int addr, unsigned int blocklen); int spi_block_erase_52(struct flashctx *flash, unsigned int addr, unsigned int blocklen); -int spi_block_erase_81(struct flashctx *flash, unsigned int addr, unsigned int blocklen); -int spi_block_erase_d7(struct flashctx *flash, unsigned int addr, unsigned int blocklen); -int spi_block_erase_d8(struct flashctx *flash, unsigned int addr, unsigned int blocklen); int spi_block_erase_60(struct flashctx *flash, unsigned int addr, unsigned int blocklen); int spi_block_erase_62(struct flashctx *flash, unsigned int addr, unsigned int blocklen); +int spi_block_erase_81(struct flashctx *flash, unsigned int addr, unsigned int blocklen); int spi_block_erase_c7(struct flashctx *flash, unsigned int addr, unsigned int blocklen); +int spi_block_erase_d7(struct flashctx *flash, unsigned int addr, unsigned int blocklen); +int spi_block_erase_d8(struct flashctx *flash, unsigned int addr, unsigned int blocklen); erasefunc_t *spi_get_erasefn_from_opcode(uint8_t opcode); int spi_chip_write_1(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len); int spi_byte_program(struct flashctx *flash, unsigned int addr, uint8_t databyte);
Modified: trunk/spi25.c ============================================================================== --- trunk/spi25.c Fri Apr 19 03:59:15 2013 (r1671) +++ trunk/spi25.c Wed May 1 16:04:19 2013 (r1672) @@ -729,10 +729,16 @@ return NULL; case 0x20: return &spi_block_erase_20; + case 0x50: + return &spi_block_erase_50; case 0x52: return &spi_block_erase_52; case 0x60: return &spi_block_erase_60; + case 0x62: + return &spi_block_erase_62; + case 0x81: + return &spi_block_erase_81; case 0xc7: return &spi_block_erase_c7; case 0xd7: