1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 14:11:15 +02:00

Add probe_timing information (int uS value)

This eliminates the conflicting delay requirements for old and new chips
with the same probing sequence.

Corresponding to flashrom svn r569.

Signed-off-by: Maciej Pijanka <maciej.pijanka@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
Maciej Pijanka
2009-06-03 14:46:22 +00:00
committed by Carl-Daniel Hailfinger
parent 48f34c66d9
commit c6e1111bed
3 changed files with 130 additions and 4 deletions

13
flash.h
View File

@ -155,6 +155,9 @@ struct flashchip {
uint32_t tested;
int (*probe) (struct flashchip *flash);
/* Delay after "enter/exit ID mode" commands in microseconds. */
int probe_timing;
int (*erase) (struct flashchip *flash);
int (*write) (struct flashchip *flash, uint8_t *buf);
int (*read) (struct flashchip *flash, uint8_t *buf);
@ -182,6 +185,16 @@ struct flashchip {
#define TEST_BAD_PREW (TEST_BAD_PROBE | TEST_BAD_READ | TEST_BAD_ERASE | TEST_BAD_WRITE)
#define TEST_BAD_MASK 0xf0
/* Timing used in probe routines. ZERO is -2 to differentiate between an unset
* field and zero delay.
*
* SPI devices will always have zero delay and ignore this field.
*/
#define TIMING_FIXME -1
/* this is intentionally same value as fixme */
#define TIMING_IGNORED -1
#define TIMING_ZERO -2
extern struct flashchip flashchips[];
struct penable {