Changeset 913 for trunk/chipset_enable.c


Ignore:
Timestamp:
Feb 25, 2010 12:38:23 PM (3 years ago)
Author:
mkarcher
Message:

Rename identifiers called 'byte'

Still fallout of adding "-Wshadow". Missed the ht1000 one
(chipset_enable is not compied on Windows where we had the collision
with "byte" last time) and the other occurrence is newly introduced.
Old libpci defines a global symbol called "byte" too.

Signed-off-by: Michael Karcher <flashrom@…>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/chipset_enable.c

    r906 r913  
    10611061{ 
    10621062        int ret = 0; 
    1063         uint8_t byte; 
     1063        uint8_t val; 
    10641064        uint16_t status; 
    10651065        char *busname; 
     
    10711071 
    10721072        /* dev is the ISA bridge. No idea what the stuff below does. */ 
    1073         byte = pci_read_byte(dev, 0x8a); 
     1073        val = pci_read_byte(dev, 0x8a); 
    10741074        msg_pdbg("ISA/LPC bridge reg 0x8a contents: 0x%02x, bit 6 is %i, bit 5 " 
    1075                  "is %i\n", byte, (byte >> 6) & 0x1, (byte >> 5) & 0x1); 
    1076         switch ((byte >> 5) & 0x3) { 
     1075                 "is %i\n", val, (val >> 6) & 0x1, (val >> 5) & 0x1); 
     1076        switch ((val >> 5) & 0x3) { 
    10771077        case 0x0: 
    10781078                buses_supported = CHIP_BUSTYPE_LPC; 
     
    10911091        /* Force enable SPI and disable LPC? Not a good idea. */ 
    10921092#if 0 
    1093         byte |= (1 << 6); 
    1094         byte &= ~(1 << 5); 
    1095         pci_write_byte(dev, 0x8a, byte); 
     1093        val |= (1 << 6); 
     1094        val &= ~(1 << 5); 
     1095        pci_write_byte(dev, 0x8a, val); 
    10961096#endif 
    10971097 
     
    12251225static int enable_flash_ht1000(struct pci_dev *dev, const char *name) 
    12261226{ 
    1227         uint8_t byte; 
     1227        uint8_t val; 
    12281228 
    12291229        /* Set the 4MB enable bit. */ 
    1230         byte = pci_read_byte(dev, 0x41); 
    1231         byte |= 0x0e; 
    1232         pci_write_byte(dev, 0x41, byte); 
    1233  
    1234         byte = pci_read_byte(dev, 0x43); 
    1235         byte |= (1 << 4); 
    1236         pci_write_byte(dev, 0x43, byte); 
     1230        val = pci_read_byte(dev, 0x41); 
     1231        val |= 0x0e; 
     1232        pci_write_byte(dev, 0x41, val); 
     1233 
     1234        val = pci_read_byte(dev, 0x43); 
     1235        val |= (1 << 4); 
     1236        pci_write_byte(dev, 0x43, val); 
    12371237 
    12381238        return 0; 
Note: See TracChangeset for help on using the changeset viewer.