Changeset 352


Ignore:
Timestamp:
Nov 29, 2008, 12:45:27 AM (5 years ago)
Author:
hailfinger
Message:

Original v2 revision: 3780

If a chip has any TEST_BAD_* flag set, we don't even list the
unsupported functions, giving the user the impression that the
unsupported functions are tested.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>
Acked-by: Peter Stuge <peter@…>

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/flash.h

    r351 r352  
    9696#define TEST_BAD_ERASE  (1<<6) 
    9797#define TEST_BAD_WRITE  (1<<7) 
     98#define TEST_BAD_PREW   (TEST_BAD_PROBE|TEST_BAD_READ|TEST_BAD_ERASE|TEST_BAD_WRITE) 
    9899#define TEST_BAD_MASK   0xf0 
    99100 
     
    107108 * All LPC/FWH parts (parallel flash) have 8-bit device IDs if there is no 
    108109 * continuation code. 
    109  * All SPI parts have 16-bit device IDs. 
     110 * SPI parts have 16-bit device IDs if they support RDID. 
    110111 */ 
    111112 
  • trunk/flashrom.c

    r351 r352  
    500500                                printf(" WRITE"); 
    501501                        printf("\n"); 
    502                 } else { 
     502                } 
     503                if ((!(flash->tested & TEST_BAD_PROBE) && !(flash->tested & TEST_OK_PROBE)) || 
     504                    (!(flash->tested & TEST_BAD_READ) && !(flash->tested & TEST_OK_READ)) || 
     505                    (!(flash->tested & TEST_BAD_ERASE) && !(flash->tested & TEST_OK_ERASE)) || 
     506                    (!(flash->tested & TEST_BAD_WRITE) && !(flash->tested & TEST_OK_WRITE))) { 
    503507                        printf("This flash part has status UNTESTED for operations:"); 
    504                         if (!(flash->tested & TEST_OK_PROBE)) 
     508                        if (!(flash->tested & TEST_BAD_PROBE) && !(flash->tested & TEST_OK_PROBE)) 
    505509                                printf(" PROBE"); 
    506                         if (!(flash->tested & TEST_OK_READ)) 
     510                        if (!(flash->tested & TEST_BAD_READ) && !(flash->tested & TEST_OK_READ)) 
    507511                                printf(" READ"); 
    508                         if (!(flash->tested & TEST_OK_ERASE)) 
     512                        if (!(flash->tested & TEST_BAD_ERASE) && !(flash->tested & TEST_OK_ERASE)) 
    509513                                printf(" ERASE"); 
    510                         if (!(flash->tested & TEST_OK_WRITE)) 
     514                        if (!(flash->tested & TEST_BAD_WRITE) && !(flash->tested & TEST_OK_WRITE)) 
    511515                                printf(" WRITE"); 
    512516                        printf("\n"); 
Note: See TracChangeset for help on using the changeset viewer.