See patch. This is what I had to do to get the combo working again.
* get Kontron 986LCD-M recognized by ID detection again. This was apparently 
broken in r796
* get Winbond W39V080FA working again. this was apparently broken in r868
* tested SST49LF008A and Winbond W39V080FA 

Signed-off-by: Stefan Reinauer <[email protected]>

Index: jedec.c
===================================================================
--- jedec.c     (revision 889)
+++ jedec.c     (working copy)
@@ -29,6 +29,9 @@
 #define MASK_2AA 0x7ff
 #define MASK_AAA 0xfff
 
+int unlock_winbond_fwhub(struct flashchip *flash);
+static int unlocked = 0;
+
 /* Check one byte for odd parity */
 uint8_t oddparity(uint8_t val)
 {
@@ -480,6 +483,19 @@
        return erase_sector_jedec_common(flash, page, size, mask);
 }
 
+int unlock_and_erase_sector_jedec(struct flashchip *flash, unsigned int page, 
unsigned int size)
+{
+       int mask;
+
+       if (!unlocked) {
+               unlock_winbond_fwhub(flash);
+               unlocked=1;
+       }
+
+       mask = getaddrmask(flash);
+       return erase_sector_jedec_common(flash, page, size, mask);
+}
+
 int erase_block_jedec(struct flashchip *flash, unsigned int page, unsigned int 
size)
 {
        int mask;
Index: flashchips.c
===================================================================
--- flashchips.c        (revision 889)
+++ flashchips.c        (working copy)
@@ -4286,7 +4286,7 @@
                .total_size     = 1024,
                .page_size      = 64 * 1024,
                .feature_bits   = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET,
-               .tested         = TEST_OK_PRW,
+               .tested         = TEST_OK_PREW,
                .probe          = probe_sst_fwhub,
                .probe_timing   = 1,            /* 150 ns | routine is wrapper 
to probe_jedec (sst_fwhub.c) */
                .erase          = NULL,
@@ -6116,7 +6116,7 @@
                .total_size     = 1024,
                .page_size      = 64 * 1024,
                .feature_bits   = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET,
-               .tested         = TEST_UNTESTED,
+               .tested         = TEST_OK_PREW,
                .probe          = probe_jedec,
                .probe_timing   = TIMING_FIXME,
                .erase          = NULL, /* Was erase_winbond_fwhub */
@@ -6124,7 +6124,7 @@
                {
                        {
                                .eraseblocks = { {64 * 1024, 16}, },
-                               .block_erase = erase_sector_jedec,
+                               .block_erase = unlock_and_erase_sector_jedec,
                        }, {
                                .eraseblocks = { {1024 * 1024, 1} },
                                .block_erase = erase_chip_block_jedec,
Index: chipdrivers.h
===================================================================
--- chipdrivers.h       (revision 889)
+++ chipdrivers.h       (working copy)
@@ -86,6 +86,7 @@
 int write_jedec(struct flashchip *flash, uint8_t *buf);
 int write_jedec_1(struct flashchip *flash, uint8_t *buf);
 int erase_sector_jedec(struct flashchip *flash, unsigned int page, unsigned 
int pagesize);
+int unlock_and_erase_sector_jedec(struct flashchip *flash, unsigned int page, 
unsigned int size);
 int erase_block_jedec(struct flashchip *flash, unsigned int page, unsigned int 
blocksize);
 int erase_chip_block_jedec(struct flashchip *flash, unsigned int page, 
unsigned int blocksize);
 int write_sector_jedec_common(struct flashchip *flash, uint8_t *src, chipaddr 
dst, unsigned int page_size, unsigned int mask);
Index: board_enable.c
===================================================================
--- board_enable.c      (revision 889)
+++ board_enable.c      (working copy)
@@ -1221,7 +1221,7 @@
        {0x1166, 0x0205, 0x1014, 0x0347,  0x1002, 0x515E, 0x1014, 0x0325, NULL, 
         NULL,         NULL,          "IBM",         "x3455",                 
0,   board_ibm_x3455},
        {0x1039, 0x5513, 0x8086, 0xd61f,  0x1039, 0x6330, 0x8086, 0xd61f, NULL, 
         NULL,         NULL,          "Intel",       "D201GLY",               
0,   wbsio_check_for_spi},
        {0x1022, 0x7468,      0,      0,       0,      0,      0,      0, NULL, 
         "iwill",      "dk8_htx",     "IWILL",       "DK8-HTX",               
0,   w83627hf_gpio24_raise_2e},
-       {0x8086, 0x27A0,      0,      0,  0x8086, 0x27b8,      0,      0, NULL, 
         "kontron",    "986lcd-m",    "Kontron",     "986LCD-M",              
0,   board_kontron_986lcd_m},
+       {0x8086, 0x27A0, 0x8086, 0x27a0,  0x8086, 0x27b8, 0x8086, 0x27b8, NULL, 
         "kontron",    "986lcd-m",    "Kontron",     "986LCD-M",              
0,   board_kontron_986lcd_m},
        {0x8086, 0x2411, 0x8086, 0x2411,  0x8086, 0x7125, 0x0e11, 0xb165, NULL, 
         NULL,         NULL,          "Mitac",       "6513WU",                
0,   board_mitac_6513wu},
        {0x13f6, 0x0111, 0x1462, 0x5900,  0x1106, 0x3177, 0x1106,      0, NULL, 
         NULL,         NULL,          "MSI",         "MS-6590 (KT4 Ultra)",   
0,   board_msi_kt4v},
        {0x1106, 0x3149, 0x1462, 0x7094,  0x10ec, 0x8167, 0x1462, 0x094c, NULL, 
         NULL,         NULL,          "MSI",         "MS-6702E (K8T Neo2-F)", 
0,   w83627thf_gpio4_4_raise_2e},
_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to