This should also fix broken write for non-uniform sectored FWH-like chips.
These are:
  Intel 28F001
  Sharp LHF00L04
  ST M50FW002
  ST M50LPW116

Signed-off-by: Michael Karcher <[email protected]>
---
 Makefile      |    2 +-
 chipdrivers.h |    3 +++
 flashchips.c  |   31 +++++++++++++++++++++++++++++++
 flashchips.h  |    2 ++
 4 files changed, 37 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index fa67b73..992397e 100644
--- a/Makefile
+++ b/Makefile
@@ -57,7 +57,7 @@ endif
 
 CHIP_OBJS = jedec.o stm50flw0x0x.o w39v040c.o w39v080fa.o w29ee011.o \
        sst28sf040.o m29f400bt.o 82802ab.o pm49fl00x.o \
-       sst49lfxxxc.o sst_fwhub.o flashchips.o spi.o spi25.o
+       sst49lfxxxc.o sst_fwhub.o flashchips.o spi.o spi25.o i28f00x.o
 
 LIB_OBJS = layout.o
 
diff --git a/chipdrivers.h b/chipdrivers.h
index 6d5cef0..816088a 100644
--- a/chipdrivers.h
+++ b/chipdrivers.h
@@ -53,6 +53,9 @@ int spi_nbyte_read(int addr, uint8_t *bytes, int len);
 int spi_read_chunked(struct flashchip *flash, uint8_t *buf, int start, int 
len, int chunksize);
 int spi_aai_write(struct flashchip *flash, uint8_t *buf);
 
+/* i28f00x.c */
+int write_28f00x(struct flashchip *flash, uint8_t *buf);
+
 /* 82802ab.c */
 uint8_t wait_82802ab(chipaddr bios);
 int probe_82802ab(struct flashchip *flash);
diff --git a/flashchips.c b/flashchips.c
index 2dbc1e0..68f9ecd 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -2385,6 +2385,37 @@ struct flashchip flashchips[] = {
 
        {
                .vendor         = "Intel",
+               .name           = "28F004BV/BE-T",
+               .bustype        = CHIP_BUSTYPE_PARALLEL,
+               .manufacture_id = INTEL_ID,
+               .model_id       = P28F004BT,
+               .total_size     = 512,
+               .page_size      = 128 * 1024, /* for write_i28f00x: maximal 
block size */
+               .tested         = TEST_UNTESTED,
+               .probe          = probe_jedec,
+               .probe_timing   = TIMING_ZERO,  /* Datasheet has no timing info 
specified */
+               .erase          = NULL,
+               .block_erasers  =
+               {
+                       {
+                               /* Keep this the first block_erasers
+                                  entry. The write functions spies here to
+                                  get the chip layout */
+                               .eraseblocks = { 
+                                       {128 * 1024, 3},
+                                       {96 * 1024, 1},
+                                       {8 * 1024, 2},
+                                       {16 * 1024, 1},
+                               },
+                               .block_erase = erase_82802ab_block,
+                       },
+               },
+               .write          = write_28f00x,
+               .read           = read_memmapped,
+       },
+
+       {
+               .vendor         = "Intel",
                .name           = "82802AB",
                .bustype        = CHIP_BUSTYPE_FWH,
                .manufacture_id = INTEL_ID,
diff --git a/flashchips.h b/flashchips.h
index 4337e52..1cbb3c6 100644
--- a/flashchips.h
+++ b/flashchips.h
@@ -259,6 +259,8 @@
 #define E_28F016S5             0xAA
 #define P28F001BXT             0x94    /* 28F001BX-T */
 #define P28F001BXB             0x95    /* 28F001BX-B */
+#define P28F004BT              0x78    /* 28F004BV/BE-T */
+#define P28F004BB              0x79    /* 28F004BV/BE-B */
 #define SHARP_LH28F008SA       0xA2    /* Sharp chip, Intel Vendor ID */
 #define SHARP_LH28F008SC       0xA6    /* Sharp chip, Intel Vendor ID */
 
-- 
1.7.0


_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to