summaryrefslogtreecommitdiffstats
path: root/chipdrivers.h
Commit message (Collapse)AuthorAgeFilesLines
* The SPI opcode 0xd8 is not a chip erase opcode on any chip out thereCarl-Daniel Hailfinger2010-06-201-2/+0
| | | | | | | | | | | | Besides that, the function as implemented just walks the chip and ignores sector sizes. Sector erase with SPI opcode 0xd8 is of course still supported. Kill a declaration for a nonexisting function while we're at it. Corresponding to flashrom svn r1054. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com>
* Add support for two-byte RES probesCarl-Daniel Hailfinger2010-05-281-1/+2
| | | | | | | | | | | | Some chips implement the RES (0xab) opcode, but they use a non-standard two byte response instead of the usual one byte response. A two-byte response has the accuracy of REMS and RDID, so don't check for REMS/RDID availability before running a two-byte RES. Corresponding to flashrom svn r1017. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Introduce a generic SPI read function: spi_write_chunked()Carl-Daniel Hailfinger2010-05-211-0/+1
| | | | | | | | | | | | | | | Every SPI programmer driver had its own completely different chip write implementation, and all of them were insufficiently commented. Create spi_write_chunked as a copy of spi_read_chunked and convert all SPI programmers to use it. No functional changes except: - Bus Pirate uses 12 Byte writes instead of 8 Byte writes - SB600 uses 5 Byte writes instead of 1 Byte writes Corresponding to flashrom svn r1005. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: David Hendricks <dhendrix@google.com>
* Sst49lfxxxc chips are functionally the same as 82802ab chipsSean Nelson2010-03-231-4/+0
| | | | | | | | | | | | | | Sst49lfxxxc software status register is functionally the same as the 82802ab status register, "Block Protect Status"(49lfxxxc) can be treated the same as "Device Protect Status"(82802ab). Erase_block_49lfxxxc is the same command sequence as erase_block_82802ab. Add unlock_49lfxxxc to chips definitions. Write_sector_49lfxxxc is the same as write_page_82802ab. Corresponding to flashrom svn r972. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Fix a few typos from the last commitSean Nelson2010-03-221-0/+1
| | | | | | | Corresponding to flashrom svn r966. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Sean Nelson <audiohacked@gmail.com>
* Various JEDEC refactorings touching 82802ab.c, sharplhf00l04.c and ↵Sean Nelson2010-03-191-10/+4
| | | | | | | | | | | | | | | | | | | stm50flw0x0x.c Rename print_82802ab_status to print_status_82802ab add unlock_82802ab strip unlock code from erase_block_82802ab rename erase_82802ab_block to erase_block_80280ab delete sharplhf00l04.o from Makefile delete *_lhf00l04* from chipdrivers.h. add unlock_stm50flw0x0x delete wait_stm50flw0x0x delete write_page_stm50flw0x0x convert erase_stm50flw0x0x to erase_chip_stm50flw0x0x delete write_stm50flw0x0x add unlock_82802ab to two Intel chips with TEST_BAD_WRITE change the status of 82802AB, 82802AC, M50FW040, M50FW080 to TEST_OK_PR Corresponding to flashrom svn r948. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Further cleanup after JEDEC refactoringsSean Nelson2010-03-161-4/+1
| | | | | | | | | | | Convert _sst_fwhub functions to jedec. Corresponding to flashrom svn r943. kill unused sst_fwhub.c functions make unlock_* check if unlock was successful and only return 0 when fully successful Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Clean up sst28sf040.c after JEDEC refactoringsSean Nelson2010-03-161-3/+0
| | | | | | | | | | Remove function probe_28sf040. Corresponding to flashrom svn r942. delete references to dead sharplhf00l04.c and sst29sf040.c functions from chipdrivers.h Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Clean up sharplhf00l04.c after JEDEC refactoringsSean Nelson2010-03-161-0/+2
| | | | | | | | | | | - remove some copied functions (from 82802ab.c) and use the 82802ab equivalents - fix missing prototypes to *_82802ab functions Corresponding to flashrom svn r941. fix missing prototypes to _82802ab functions Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Kill dead w39v080fa.c functionsSean Nelson2010-03-161-3/+0
| | | | | | | Corresponding to flashrom svn r940. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Kill dead w39v040c.c functionsSean Nelson2010-03-161-3/+0
| | | | | | | Corresponding to flashrom svn r939. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add FEATURE_REGISTERMAP to some more chips and change the use of various ↵Carl-Daniel Hailfinger2010-03-151-1/+1
| | | | | | | | | | | | | | | | | probing functions Add FEATURE_REGISTERMAP to * Intel 82802AB, 82802AC * Sharp LHF00L04 * SST SST49LF004C, SST49LF008C, SST49LF016C, SST49LF160C * ST M50FLW040A, M50FLW040B, M50FLW080A, M50FLW080B, M50FW002, M50FW016 M50FW040, M50FW080, M50LPW116. Make register mapping conditional on FEATURE_REGISTERMAP in 82802ab.c. Replace probe_49lfxxxc with probe_82802ab. Replace probe_28sf040 with probe_82802ab. Replace probe_sst_fwhub with probe_jedec. Add printlock_sst_fwhub to chips which used probe_sst_fwhub. Corresponding to flashrom svn r937. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
* Convert the remaining references to *_49fl00xSean Nelson2010-02-271-3/+1
| | | | | | | | | | | | | Now the only remaining and used function in pm49fl00x.c is unlock_49fl00x. Also: - Add missing unlock to AMIC A49LF040A. - Add lock_49fl00x function. Corresponding to flashrom svn r917. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Patch to remove all references to dead chipdriversSean Nelson2010-02-221-38/+0
| | | | | | | | | | | | | | | | We also need to 'svn rm' the following files: am29f040b.c en29f002a.c m29f002.c mx29f002.c pm29f002.c sst49lf040.c w49f002u.c Corresponding to flashrom svn r909. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Here's a very quick patch to fix the missing unlock codeSean Nelson2010-02-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Fixes missing unlock for certain chips: * unlock_49lf00x * Pm49fl002 * Pm49fl004 * unlock_49flxxxc * SST49LF160C * unlock_winbond_fwhub * W39V080FA * W39V080FA (dual mode) Fixes missing printlock for certain chip: * printlock_w39v040c * W39V040C Corresponding to flashrom svn r907. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
* Convert various SST chips to use block_erasersSean Nelson2010-01-201-1/+6
| | | | | | | | | | | | | | | | | | | | Convert the following chips to block_erasers: SST28SF040A SST29EE010 SST29LE010 SST29EE020A SST29LE020 SST39SF010A SST39SF020A SST39SF040 SST39VF512 SST39VF010 SST39VF020 SST39VF040 SST39VF080 SST49LF002A/B SST49LF003A/B SST49LF004C SST49LF008A SST49LF008C SST49LF016C SST49LF020 SST49LF020A SST49LF040 SST49LF040B SST49LF080A SST49LF160C . Extend sst28sf040 to include chip and sector functions for block_eraser. Extend sst49lfxxxc to include chip, sector, block erasers functions for block_erasers. Extend sst_fwhub to include chip and sector functions for block_erasers. Add copyrights to changed files. Killed erase_sst_fwhub. Killed erase_49lfxxxc. NULL A/A mux mode full chip erasers. Ignore block locks in erase/write. Change comments from "PP mode" to "A/A mux mode" Corresponding to flashrom svn r877. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
* Block eraser conversions and support for Eon EN25B seriesSean Nelson2010-01-191-0/+3
| | | | | | | | | | | | | | | | | | Convert chips to block_erasers: SyncMOS S29C31004T SyncMOS S29C51001T SyncMOS S29C51002T SyncMOS S29C51004T TI TMS29F002RT TI TMS29F002RB SyncMOS chips have Uniform sector; boot blocks on chips are made up of uniform sectors but have locking. Corresponding to flashrom svn r871. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Block eraser conversions and support for Eon EN25B seriesSean Nelson2010-01-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Convert chips to block_erasers: ST_M25PE10 ST_M25PE20 ST_M25PE40 ST_M25PE80 ST_M25PE16 PMC_25LV010 PMC_25LV016B PMC_25LV020 PMC_25LV040 PMC_25LV080B PMC_25LV512 PMC_39F010 PMC_49FL002 PMC_49FL004 SANYO_LE25FW203A SPANSION_S25FL016A Added spi_block_erase_d7 for PMC chips. Corresponding to flashrom svn r867. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Don't use "byte" as identifierMichael Karcher2010-01-121-1/+1
| | | | | | | | | | Some mingw declares a global identifier "byte", causing -Werror -Wshadow to break compilation. This patch renames all identifiers called "byte". Corresponding to flashrom svn r861. Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Block eraser conversions and support for Eon EN25B seriesSean Nelson2010-01-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert chips to block_erasers: ASD AE49F2008 AMIC A25L40P(T/U) AMIC A49LF040A EMST F49B002UA Eon EN25B05 Eon EN25B10 Eon EN25B20 Eon EN25B40 Eon EN25B80 Eon EN25B16 Eon EN25B32 Eon EN25B64 Eon EN25D16 Eon EN25F05 Eon EN25F10 Eon EN25F20 Eon EN25F40 Eon EN25F80 Eon EN25F16 Eon EN25F32 Intel 28F001BX-B Intel 28F001BX-T Intel 82802AB Intel 82802AC Macronix MX25L1635D Macronix MX25L3235D Macronix MX25L6405 Macronix MX25L12805 Macronix MX29F001B Macronix MX29F001T Macronix MX29LV040 Added new chips (according to datasheets): Eon EN25B05T Eon EN25B10T Eon EN25B20T Eon EN25B40T Eon EN25B80T Eon EN25B16T Eon EN25B32T Eon EN25B64T Added minor Device IDs for Eon EN25Bxx{T,B} chips. Corresponding to flashrom svn r843. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Fix Sharp LHF00L04Carl-Daniel Hailfinger2010-01-071-1/+2
| | | | | | | | | | | | | | | - Add eraseblock definitions - Use correct eraseblock sizes (the datasheet is a bit ambiguous) - Use correct probe function - Fill in probe timing There is a lot more stuff left to clean up, but at least probe and erase should work now. Corresponding to flashrom svn r837. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com>
* Generify jedec functions by introducing an address maskSean Nelson2010-01-041-3/+1
| | | | | | | | | | | | | | | | | The patch converts jedec functions into mask-based generics which can be used for many chip provided the only changes are the addresses are converted from 0x5555/0x2AAA to 0x555/0x2AA or similar. The patch mostly changes jedec.c, but a few other files are changed because they use the jedec functions within their own functions. The patch also adds a copyright line to flashchips.c because of my recent work in converting AMD and Atmel chips to use struct erase_block. Corresponding to flashrom svn r828. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Convert the following chips to use struct eraseblockSean Nelson2009-12-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | AMIC_A29002B AMIC_A29002T EN_29F002B EN_29F002T MBM29F004BC MBM29F004TC MBM29F400BC MBM29F400TC MX_25L3205 MX_25L6405 MX_29F002B MX_29F002T Add block erasers for m29f400bt and mx29f002. Change programmer delays from 2 seconds to 10us in mx29f002 and am29f040b. Corresponding to flashrom svn r819. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Convert the following chips to use struct eraseblockSean Nelson2009-12-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | 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>
* Remove nonexisting functions from chipdrivers.hCarl-Daniel Hailfinger2009-12-171-4/+0
| | | | | | | Corresponding to flashrom svn r804. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Split hardware access, OS abstraction and chip drivers out of flash.hCarl-Daniel Hailfinger2009-12-141-0/+169
This patch is only the first step, but it hopefully will make working with the code and especially porting to new platforms easier. Subsequent patches should move #includes for the newly created files hwaccess.h and chipdrivers.h from flash.h to the files which need them. Programmers should live in a separate header file as well. Tested-by: Idwer Vollering <vidwer@gmail.com> Corresponding to flashrom svn r799. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com>
OpenPOWER on IntegriCloud