From c6e1111bed4bea188c922ed27d5d00bf5efea8cd Mon Sep 17 00:00:00 2001 From: Maciej Pijanka Date: Wed, 3 Jun 2009 14:46:22 +0000 Subject: 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 Acked-by: Carl-Daniel Hailfinger --- flash.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'flash.h') diff --git a/flash.h b/flash.h index 2a71761..f6cb0cd 100644 --- a/flash.h +++ b/flash.h @@ -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 { -- cgit v1.1