1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 15:12:36 +02:00

436 Commits

Author SHA1 Message Date
Sean Nelson
36172342c8 Convert the remaining references to *_49fl00x
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>
2010-02-27 18:01:15 +00:00
Sean Nelson
14ba6682e9 Split spi.c into programmer and chip code Remove chipdriver.h include from flash.h
Some of the spi programmer drivers required chipdrivers.h, needs fixing later:
  it87spi.c
  ichspi.c
  sb600spi.c
  wbsio_spi.c
  buspirate_spi.c
  ft2232spi.c
  bitbang_spi.c
  dediprog.c

Corresponding to flashrom svn r914.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-26 05:48:29 +00:00
Sean Nelson
6e0b912f46 Here's a very quick patch to fix the missing unlock code
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>
2010-02-19 00:52:10 +00:00
Carl-Daniel Hailfinger
cd446f4b93 Kill an erroneous .erase introduced in r900
Corresponding to flashrom svn r901.

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>
2010-02-13 19:22:11 +00:00
Sean Nelson
f5ae4d4a35 Adds support for the Intel E28F004S5 flash chip
Corresponding to flashrom svn r900.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-02-13 18:41:53 +00:00
Sean Nelson
ca33140ebf Fix erase blocks for Winbond W25X{10,20,40,80} SPI chips
The Winbond W25X10 and related chips only have 4k and 64k blocks and
only accept erase commands: 20h, d8h, and c7h.

Corresponding to flashrom svn r897.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: David Hendricks <dhendrix@google.com>
2010-02-12 18:40:27 +00:00
Carl-Daniel Hailfinger
48f1d73b5f At long last, the day has come, and we can bury full-chip erase once and for all
Back in November 2008(!) I proposed the first version of the flexible
sector-based erase structure, and now we can finally rip out the old
full-chip erase code without ill effects. Rejoice and party!

Thanks to everyone who made this possible, especially to Sean Nelson who
converted the majority of flash chips to sector erase.

Corresponding to flashrom svn r895.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-02-11 23:03:53 +00:00
Jeffrey A. Kent
ba7c9228d3 Adds support for ST M29W512B
Tested and works for me.

Corresponding to flashrom svn r888.

Signed-off-by: Jeffrey A. Kent <jakent@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-02-01 05:49:46 +00:00
Sean Nelson
35727f7618 Complete the addition of Feature Bits for all Jedec based chips
Add FEATURE_SHORT_RESET, FEATURE_LONG_RESET, and FEATURE_EITHER_RESET
rewrite jedec functions to use getaddrmask

convert write_49f002 to write_jedec_1
convert write_w39v040c to write_jedec_1
convert probe_w39v040c to probe_jedec
convert write_49lf040 to write_jedec_1
convert write_pm29f002 to write_jedec
convert write_29f040b to write_jedec_1
convert probe_29f040b to probe_jedec
convert erase_chip_29f040b to erase_chip_block_jedec
convert erase_sector_29f040b to erase_sector_jedec
convert write_m29f002b to write_jedec
convert write_m29f002t to write_jedec
convert *_29f002 to *_jedec

decouple unused files from Makefile:
am29f040b.c
en29f002a.c
m29f002.c
mx29f002.c
pm29f002.c
sst49lf040.c
w39v040c.c
w49f002u.c

Corresponding to flashrom svn r886.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Anders Juel Jensen <andersjjensen@gmail.com>
2010-01-28 23:55:12 +00:00
Uwe Hermann
48da3f9f99 Add support for the SST39SF512 chip
All operations tested by me, works fine.

Corresponding to flashrom svn r881.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-01-23 15:15:19 +00:00
Sean Nelson
51c83fb2b2 Convert various SST chips to use block_erasers
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>
2010-01-20 20:55:53 +00:00
Sean Nelson
012a31e201 Fix SyncMOS S29C51004T, which has 512 uniform 1k sectors
Corresponding to flashrom svn r873.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-01-19 20:23:26 +00:00
Sean Nelson
329bde7725 Convert ST to block erasers
ST M25P05-A
ST M25P05.RES
ST M25P10-A
ST M25P10.RES
ST M25P20
ST M25P40
ST M25P40-old
ST M25P80
ST M25P16
ST M25P32
ST M25P64
ST M25P128
ST M29F002B
ST M29F002T/NT
ST M29F040B
ST M29F400BT
ST M29W010B
ST M29W040B
ST M50FLW040A
ST M50FLW040B
ST M50FLW080A
ST M50FLW080B
ST M50FW002
ST M50FW016
ST M50FW040
ST M50FW080
ST M50LPW116

Add erase_chip_stm50flw0x0x to stm50flw0x0x.c
Add copyright to stm50flw0x0x.c
Fix block sizes and counts
Omit M50FLW0x0x mixed sector/block eraser
Convert the used 82802ab functions to their stm50flw0x0x equivalents
Fix incorrect sizes as found by Carl-Daniel.
Add back M50FLW0x0x mixed sector/block eraser sans function pointer.

Corresponding to flashrom svn r872.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-01-19 16:39:19 +00:00
Sean Nelson
56358aae1d Block eraser conversions and support for Eon EN25B series
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>
2010-01-19 16:08:51 +00:00
Sean Nelson
cfc35cda57 Converted chips to block_erasers
W_25X10
W_25X20
W_25X40
W_25X80
W_25X16
W_25X32
W_25X64
W_29C011
W_29C020C
W_29C040P
W_29EE011
W_39V040A
W_39V040B
W_39V040C
W_39V040FA
W_39V080A
W_49F002U
W_49V002A
W_49V002FA
W_39V080FA
W_39V080FA_DM

Corresponding to flashrom svn r868.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-01-19 03:24:55 +00:00
Sean Nelson
5643c0782e Block eraser conversions and support for Eon EN25B series
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>
2010-01-19 03:23:07 +00:00
Sean Nelson
2aff7aa03f Fix A25L40PU and A2540PT due to incorrect full-chip block size is incorrect
Corresponding to flashrom svn r865.

Thanks to hailfinger's self-check-erase routine for catching this.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-01-18 08:24:02 +00:00
Michael Karcher
23ff4601ac Support for Spansion S25FL008A
Tested with read/erase/write (including verify). I only wrote the image
that was read before - don't want to brick my laptop.

Corresponding to flashrom svn r862.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2010-01-12 23:29:30 +00:00
Carl-Daniel Hailfinger
08fa2f39f3 Change a few probe timings to TIMING_FIXME
They previously had TIMING_IGNORED, but now they use probe_jedec
directly or indirectly and that function does not ignore probe timing.

Corresponding to flashrom svn r856.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2010-01-10 01:34:00 +00:00
Sean Nelson
54596379b4 Block eraser conversions and support for Eon EN25B series
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>
2010-01-09 05:30:14 +00:00
Carl-Daniel Hailfinger
e9404668a1 Use the register mapping feature bit
All functions which just call probe_jedec and then map flash registers
are replaced by probe_jedec. All functions which call probe_jedec, map
flash registers and do something else can at least eliminate mapping
flash registers.
Fix logic inversion in probe_jedec to map flash registers on success
instead of on failure.
Change a few TIMING_IGNORED to TIMING_FIXME where probe_jedec is used.

Total savings: One probe function simplified, three probe functions
eliminated.

Corresponding to flashrom svn r839.

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: Sean Nelson <audiohacked@gmail.com>
2010-01-09 02:24:17 +00:00
Carl-Daniel Hailfinger
aca1dce951 Fix Sharp LHF00L04
- 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>
2010-01-07 21:23:45 +00:00
Sean Nelson
c57a920f34 Generify jedec functions by introducing an address mask
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>
2010-01-04 17:15:23 +00:00
Sean Nelson
6b11ad2f19 Convert the following chips to use struct eraseblock
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>
2009-12-23 17:05:59 +00:00
Carl-Daniel Hailfinger
bbfeb70fb9 Add blockwise erase to all supported chips of the SST25 family
SST25VF040.REMS, SST25VF040B, SST25VF040B.REMS, SST25VF080B,
SST25VF016B, SST25VF032B

Corresponding to flashrom svn r818.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
2009-12-23 12:16:47 +00:00
Sean Nelson
8918729891 Convert the following chips to use struct eraseblock
AT25DF021, AT25DF041A, AT25DF081, AT25DF161, AT25DF321, AT25DF321A,
AT25DF641, AT25F512B, AT25FS010, AT25FS040, AT26DF041, AT26DF081A,
AT26DF161, AT26DF161A, AT26F004, AT29C512, AT29C010A, AT29C020,
AT29C040A, AT49BV512, AT49F002(N), AT49F002(N)T

A possible future patch would to add spi_block_erase_d7 to spi.c as an 
alternate to spi_block_erase_20. Only some SPI chips support d7.

Corresponding to flashrom svn r817.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2009-12-23 12:02:55 +00:00
Sean Nelson
72a9a02b38 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>
2009-12-22 22:15:33 +00:00
Michael Karcher
1c296ca8bc Use common jedec functionality where appropriate
The deleted function in en29f002a.c is reintroduced as
write_by_byte_jedec in jedec.c as it contains no chip-specific
instructions. It is not yet used in other chip drivers, as key addresses
(0x2AAA/0x5555) are often specified with less bits. After crosschecking
datasheets, most of the fixmes can probably be resolved as indicated in
them, causing significant code reduction.

The common JEDEC code for bytewise programming does not program 0xFF
at all. The chips that had a dedicated bytewise flash function which
has been changed to write_jedec_1 thus changed flashing behaviour
and the "write" test flag has been removed. This applies to: AMD
Am29F002BB/Am29F002NBB AMD Am29F002BT/Am29F002NBT (TEST_OK_PREW before)
AMIC A29002B AMIC A29002T (TEST_OK_PREW before) EON EN29F002(A)(N)B EON
EN29F002(A)(N)T (TEST_OK_PREW before) Macronix MX29F001B (TEST_OK_PREW
before) Macronix MX29F001T (TEST_OK_PREW before) Macronix MX29F002B
Macronix MX29F002T (TEST_OK_PREW before) Macronix MX29LV040

Similar analysis should be performed for the read id stuff.

Corresponding to flashrom svn r785.

Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2009-11-27 17:49:42 +00:00
Zheng Bao
1db2b75902 Add entries of W25x32 and W25x64
The model_ids are already in the header.

W25x32 has been successfully probed. W25x64 is not available, the entry
is based on the datasheet.

Corresponding to flashrom svn r782.

Signed-off-by: Zheng Bao <zheng.bao@amd.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2009-11-26 11:05:01 +00:00
Sean Nelson
d70b09ca13 Add Sanyo LF25FW203A support
This chip is sometimes labeled as 25FW203T.

Corresponding to flashrom svn r775.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2009-11-24 02:11:08 +00:00
Sean Nelson
118e1d6d04 Add Generic SPI RDID detection for Sanyo chips
Corresponding to flashrom svn r774.

Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2009-11-24 02:08:11 +00:00
Carl-Daniel Hailfinger
01d49ed39d Add support for generic RDID and REMS matching of unknown chips
If a chip is not on the RDID generic vendor list nor on the REMS
specific ID list, flashrom will claim that no chip is there.

Handle these cases gracefully. flashrom will ignore generic matches if a
specific chip was found, so this will have no impact on supported chips,
but help a lot for a first quick analysis by the user or developer. The
only drawback is that unknown chips may be recognized multiple times
until they are added to flashchips.[ch].

Corresponding to flashrom svn r767.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Marc Jones <marcj303@gmail.com>
2009-11-20 01:12:45 +00:00
Carl-Daniel Hailfinger
8a8a226add Retry correct range in write_page_write_jedec()
The automatic retry in write_page_write_jedec didn't retry flashing the
correct range, essentially rendering the functionality useless.

This patch simplifies the code and fixes the bug.

Thanks to Luke Dashjr for testing.

Mark Winbond W29C040P as supported.

Corresponding to flashrom svn r757.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luke Dashjr <luke_coreboot@dashjr.org>
2009-11-14 03:48:33 +00:00
Carl-Daniel Hailfinger
11c9e687b4 Fix incorrect comment in SST49LF004A/B description
Corresponding to flashrom svn r756.

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>
2009-11-06 18:09:42 +00:00
Carl-Daniel Hailfinger
4010712033 Add comments about the meaning of block erase related struct flashchip members
Cosmetics: Place curly brackets on a common line.
Add MX25V512 as alias name to MX25L512.
Add MX25V8005 as alias name to MX25L8005.
Add erase block definitions for
MX25L2005, MX25L4005, MX25L8005, MX25L1605
and change their status to TEST_OK_PRW where applicable.

Corresponding to flashrom svn r738.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2009-10-01 13:15:01 +00:00
Peter Lemenkov
45835c4092 Mark the SST SST49LF003A/B as read-tested
See http://www.coreboot.org/pipermail/coreboot/2009-July/050675.html.

Corresponding to flashrom svn r733.

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2009-09-25 01:09:18 +00:00
Carl-Daniel Hailfinger
a06287c9a0 Switch SST49LF004A/B to block erase, remove the hack which simulated (unsupported) chip erase
Annotate SST49LF004B quirks for TBL#.

Add TEST_OK_PRW which is useful when a PREW chip gets a new erase
routine.

Change a few erase function prototypes to use unsigned int instead of
int.

Corresponding to flashrom svn r731.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>
2009-09-23 22:01:33 +00:00
Nils Jacobs
c025268340 Change the status of the SST49LF020A to TEST_OK_PREW
I tested it on the Wyse Winterm S50 see attached test results.

Corresponding to flashrom svn r730.

Signed-off-by: Nils Jacobs <njacobs8@hetnet.nl>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2009-09-23 21:58:34 +00:00
Uwe Hermann
b08ee5c506 Mark Macronix MX29F001B as OK, tested by me on hardware
Corresponding to flashrom svn r721.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2009-09-09 00:58:19 +00:00
Carl-Daniel Hailfinger
f38431a5b2 Store block sizes and corresponding erase functions in struct flashchip
I decided to fill in the info for a
few chips to illustrate how this works both for uniform and non-uniform
sector sizes.

struct eraseblock{
int size; /* Eraseblock size */
int count; /* Number of contiguous blocks with that size */
};

struct eraseblock doesn't correspond with a single erase block, but with
a group of contiguous erase blocks having the same size.
Given a (top boot block) flash chip with the following weird, but
real-life structure:

top
16384
8192
8192
32768
65536
65536
65536
65536
65536
65536
65536
bottom

we get the following encoding:
{65536,7},{32768,1},{8192,2},{16384,1}

Although the number of blocks is bigger than 4, the number of block
groups is only 4. If you ever add some flash chips with more than 4
contiguous block groups, the definition will not fit into the 4-member
array anymore and gcc will recognize that and error out. No undetected
overflow possible. In that case, you simply increase array size a bit.
For modern flash chips with uniform erase block size, you only need one
array member anyway.

Of course data types will need to be changed if you ever get flash chips
with more than 2^30 erase blocks, but even with the lowest known erase
granularity of 256 bytes, these flash chips will have to have a size of
a quarter Terabyte. I'm pretty confident we won't see such big EEPROMs
in the near future (or at least not attached in a way that makes
flashrom usable). For SPI chips, we even have a guaranteed safety factor
of 4096 over the maximum SPI chip size (which is 2^24). And if such a
big flash chip has uniform erase block size, you could even split it
among the 4 array members. If you change int count to unsigned int
count, the storable size doubles. So with a split and a slight change of
data type, the maximum ROM chip size is 2 Terabytes.

Since many chips have multiple block erase functions where the
eraseblock layout depends on the block erase function, this patch
couples the block erase functions with their eraseblock layouts.
struct block_eraser {
  struct eraseblock{
    unsigned int size; /* Eraseblock size */
    unsigned int count; /* Number of contiguous blocks with that size */
  } eraseblocks[NUM_ERASEREGIONS];
  int (*block_erase) (struct flashchip *flash, unsigned int blockaddr, unsigned int blocklen);
} block_erasers[NUM_ERASEFUNCTIONS];

Corresponding to flashrom svn r719.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2009-09-05 02:30:58 +00:00
Udu Ogah
c04ee22c70 Update probe timings for dozens of flash chips
Corresponding to flashrom svn r718.

Signed-off-by: Udu Ogah <putlinuxonit@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2009-09-05 01:31:32 +00:00
Mark Panajotovic
502a913791 Add support for MX29F001T and MX29F001B flash chips
Corresponding to flashrom svn r698.

Signed-off-by: Mark Panajotovic <panajotovic.marko@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2009-08-24 01:42:24 +00:00
Carl-Daniel Hailfinger
6d5d2535a4 Add IDs for 25 AMD chips, 11 Hynix chips, 8 Sharp chips, and their variants
AM29DL400BB, AM29DL400BT, AM29DL800BB, AM29DL800BT, AM29F004BB
AM29F004BT, AM29F200BB, AM29F200BT, AM29F400BB, AM29F400BT
AM29F800BB, AM29F800BT, AM29LV002BB, AM29LV002BT, AM29LV004BB
AM29LV004BT, AM29LV008BB, AM29LV008BT, AM29LV080B, AM29LV200BB
AM29LV200BT, AM29LV400BB, AM29LV400BT, AM29LV800BB, AM29LV800BT
HY29F002, HY29F040A, HY29F080, HY29F400B, HY29F400T, HY29F800B
HY29F800T, HY29LV400B, HY29LV400T, HY29LV800B, HY29LV800T
LH28F008BJxxPB, LH28F008BJxxPT, LH28F008SA, LH28F008SC, LH28F800BVxxBTL
LH28F800BVxxBV, LH28F800BVxxTV, LHF00L02

Corresponding to flashrom svn r674.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2009-08-10 10:14:23 +00:00
Carl-Daniel Hailfinger
350a0c348e Add IDs for 51 new flash chips
AMIC A29400T
AMIC A29400U
AMIC A29800T
AMIC A29800U
AMIC A29L004T
AMIC A29L004U
AMIC A29L008T
AMIC A29L008U
AMIC A29L040
Macronix MX29F004B
Macronix MX29F004T
Macronix MX29F022T
Macronix MX29F080
Macronix MX29F800B
Macronix MX29F800T
Macronix MX29LV081
Spansion MBM29DL400BC
Spansion MBM29DL400TC
Spansion MBM29DL800BA
Spansion MBM29DL800TA
Spansion MBM29F002BC
Spansion MBM29F002TC
Spansion MBM29F040C
Spansion MBM29F080A
Spansion MBM29F200BC
Spansion MBM29F200TC
Spansion MBM29F800BA
Spansion MBM29F800TA
Spansion MBM29LV002BC
Spansion MBM29LV002TC
Spansion MBM29LV004BC
Spansion MBM29LV004TC
Spansion MBM29LV008BA
Spansion MBM29LV008TA
Spansion MBM29LV080A
Spansion MBM29LV200BC
Spansion MBM29LV200TC
Spansion MBM29LV400BC
Spansion MBM29LV400TC
Spansion MBM29LV800BA
Spansion MBM29LV800TA
SST 49LF030A
ST M29F080
ST M29F200BB
ST M29F200BT
ST M29F400BB
ST M29F800DB
ST M29F800DT
Winbond W39L020
Winbond W39L040
Winbond W49F020

These still need to be added to flashchips.c, but if we ever encounter
them in real life, the ID->name lookup will be a lot easier.

Corresponding to flashrom svn r667.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2009-07-24 13:59:27 +00:00
Carl-Daniel Hailfinger
21eedec3a6 Improve flashchip comments to be more readable and precise
Corresponding to flashrom svn r665.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Luc Verhaegen <libv@skynet.be>
2009-07-23 12:42:01 +00:00
Carl-Daniel Hailfinger
da65432eb6 Fix erase for SST49LF020A
The chip supports multiple erase functions, but the function we use has
an eraseblock size of 4k.

Corresponding to flashrom svn r664.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2009-07-23 01:44:38 +00:00
Carl-Daniel Hailfinger
32961be12d Add support for ST M25P05/M25P10 chips that only respond to RES and not RDID
Unfortunately, either the datasheets are wrong or both chips have
exactly the same ID.

Corresponding to flashrom svn r662.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2009-07-23 01:40:20 +00:00
Hector Martin
a721ae2005 Add Winbond W25X16
Tested probing and reading only. The chip ID was already
in flashchips.h.

Corresponding to flashrom svn r648.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2009-07-11 19:39:11 +00:00
Luc Verhaegen
8bfb59c506 W39V040B: Flag Erase/Write as bad
Chip has now been properly tested in both my Jetway J7F5M and my EPIA-SP
(known good board). Erase and write fail. Mark these operations as bad
until i or someone else have time to fix this.

Reported by Arvid Brodin <arvidb@kth.se>.

M    flashchips.c

Corresponding to flashrom svn r643.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2009-07-08 14:50:36 +00:00
Uwe Hermann
04d5dc4085 Mark the following boards as working
- VIA EPIA-M700 (reported by Jakob Bornecrantz <wallbraker@gmail.com>)
   http://www.coreboot.org/pipermail/coreboot/2009-July/050416.html

 - GIGABYTE GA-EX58-UD4P (reported by Warren Turkal <wt@penguintechs.org>)
   http://www.coreboot.org/pipermail/coreboot/2009-June/050199.html

Mark as non-working:

 - ASUS Eee PC 701 4G (reported by Uwe Hermann <uwe@hermann-uwe.de>)
   There seems to be some SPI flash translation layer, likey done by the
   embedded controller on the laptop (ENE KB3310).
   The BIOS chip in this Eee PC model is Winbond 25X40VSIG btw.
   More info: http://beta.ivancover.com/wiki/index.php/Eee_PC_Research

Mark this chip as tested:

 - ST M25P40 (reported by Jakob Bornecrantz <wallbraker@gmail.com>)
   http://www.coreboot.org/pipermail/coreboot/2009-July/050416.html

Other:

 - Make the "Albatron PM266A" board detection print "Albatron PM266A*" as this
   enable will actually work for other PM266A* boards according to libv.
   However, the code was actually tested on "Albatron PM266A Pro".

 - Add some more board URLs / notes.

 - s/BioStar/Biostar/ as per vendor website.

 - Fix typo in print.c: s/A7V8-MX SE/A7V8X-MX SE/.

Corresponding to flashrom svn r639.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2009-07-03 17:12:05 +00:00