Changeset 1424


Ignore:
Timestamp:
08/31/11 18:19:50 (9 months ago)
Author:
hailfinger
Message:

Shorten some board enable related function names

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>
Acked-by: Stefan Tauner <stefan.tauner@…>

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/board_enable.c

    r1419 r1424  
    19751975 
    19761976/* Please keep this list alphabetically ordered by vendor/board name. */ 
    1977 const struct board_pciid_enable board_pciid_enables[] = { 
     1977const struct board_match board_matches[] = { 
    19781978 
    19791979        /* first pci-id set [4],          second pci-id set [4],          dmi identifier, coreboot id [2],  phase, vendor name,  board name       max_rom_...  OK? flash enable */ 
     
    21032103 * Require main PCI IDs to match too as extra safety. 
    21042104 */ 
    2105 static const struct board_pciid_enable *board_match_coreboot_name( 
    2106                                         const char *vendor, const char *part) 
    2107 { 
    2108         const struct board_pciid_enable *board = board_pciid_enables; 
    2109         const struct board_pciid_enable *partmatch = NULL; 
     2105static const struct board_match *board_match_cbname(const char *vendor, 
     2106                                                    const char *part) 
     2107{ 
     2108        const struct board_match *board = board_matches; 
     2109        const struct board_match *partmatch = NULL; 
    21102110 
    21112111        for (; board->vendor_name; board++) { 
     
    21542154/* 
    21552155 * Match boards on PCI IDs and subsystem IDs. 
    2156  * Second set of IDs can be main only or missing completely. 
    2157  */ 
    2158 const static struct board_pciid_enable *board_match_pci_card_ids( 
    2159                                                 enum board_match_phase phase) 
    2160 { 
    2161         const struct board_pciid_enable *board = board_pciid_enables; 
     2156 * Second set of IDs can be either main+subsystem IDs, main IDs or no IDs. 
     2157 */ 
     2158const static struct board_match *board_match_pci_ids(enum board_match_phase phase) 
     2159{ 
     2160        const struct board_match *board = board_matches; 
    21622161 
    21632162        for (; board->vendor_name; board++) { 
     
    22052204} 
    22062205 
    2207 static int unsafe_board_handler(const struct board_pciid_enable *board) 
     2206static int unsafe_board_handler(const struct board_match *board) 
    22082207{ 
    22092208        if (!board) 
     
    22322231static int board_handle_phase(enum board_match_phase phase) 
    22332232{ 
    2234         const struct board_pciid_enable *board = NULL; 
    2235  
    2236         board = board_match_pci_card_ids(phase); 
     2233        const struct board_match *board = NULL; 
     2234 
     2235        board = board_match_pci_ids(phase); 
    22372236 
    22382237        if (unsafe_board_handler(board)) 
     
    22632262int board_flash_enable(const char *vendor, const char *part) 
    22642263{ 
    2265         const struct board_pciid_enable *board = NULL; 
     2264        const struct board_match *board = NULL; 
    22662265        int ret = 0; 
    22672266 
    22682267        if (part) 
    2269                 board = board_match_coreboot_name(vendor, part); 
     2268                board = board_match_cbname(vendor, part); 
    22702269 
    22712270        if (!board) 
    2272                 board = board_match_pci_card_ids(P3); 
     2271                board = board_match_pci_ids(P3); 
    22732272 
    22742273        if (unsafe_board_handler(board)) 
  • trunk/flashrom.c

    r1417 r1424  
    17321732                ret = 1; 
    17331733        } 
    1734         if (board_pciid_enables == NULL) { 
     1734        if (board_matches == NULL) { 
    17351735                msg_gerr("Board enables table does not exist!\n"); 
    17361736                ret = 1; 
  • trunk/print.c

    r1419 r1424  
    204204{ 
    205205        int i, boardcount_good = 0, boardcount_bad = 0; 
    206         const struct board_pciid_enable *e = board_pciid_enables; 
     206        const struct board_match *e = board_matches; 
    207207        const struct board_info *b = boards; 
    208208        int maxvendorlen = strlen("Vendor") + 1; 
     
    242242                msg_ginfo((b->working) ? "OK      " : "BAD     "); 
    243243 
    244                 for (e = board_pciid_enables; e->vendor_name != NULL; e++) { 
     244                for (e = board_matches; e->vendor_name != NULL; e++) { 
    245245                        if (strcmp(e->vendor_name, b->vendor) 
    246246                            || strcmp(e->board_name, b->name)) 
  • trunk/print_wiki.c

    r1393 r1424  
    126126        char *notes = calloc(1, 1); 
    127127        char tmp[900 + 1]; 
    128         const struct board_pciid_enable *b = board_pciid_enables; 
     128        const struct board_match *b = board_matches; 
    129129 
    130130        for (i = 0; boards[i].vendor != NULL; i++) { 
  • trunk/programmer.h

    r1371 r1424  
    159159}; 
    160160 
    161 struct board_pciid_enable { 
     161struct board_match { 
    162162        /* Any device, but make it sensible, like the ISA bridge. */ 
    163163        uint16_t first_vendor; 
     
    191191}; 
    192192 
    193 extern const struct board_pciid_enable board_pciid_enables[]; 
     193extern const struct board_match board_matches[]; 
    194194 
    195195struct board_info { 
Note: See TracChangeset for help on using the changeset viewer.