Changeset 3398 for trunk/util/flashrom/chipset_enable.c
- Timestamp:
- 06/30/08 23:38:30 (5 months ago)
- Files:
-
- 1 modified
-
trunk/util/flashrom/chipset_enable.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/util/flashrom/chipset_enable.c
r3395 r3398 188 188 void *ich_spibar = NULL; 189 189 190 static int enable_flash_vt8237s_spi(struct pci_dev *dev, const char *name) { 191 uint32_t mmio_base; 192 193 mmio_base = (pci_read_long(dev, 0xbc)) << 8; 194 printf_debug("MMIO base at = 0x%x\n", mmio_base); 195 ich_spibar = mmap(NULL, 0x70, PROT_READ | PROT_WRITE, MAP_SHARED, 196 fd_mem, mmio_base); 197 198 if (ich_spibar == MAP_FAILED) { 199 perror("Can't mmap memory using " MEM_DEV); 200 exit(1); 201 } 202 203 printf_debug("0x6c: 0x%04x (CLOCK/DEBUG)\n", *(uint16_t *)(ich_spibar + 0x6c)); 204 viaspi_detected = 1; 205 return 0; 206 } 207 190 208 static int enable_flash_ich_dc_spi(struct pci_dev *dev, const char *name, unsigned long spibar) 191 209 { … … 271 289 /* Flag for ICH7 SPI register block */ 272 290 int ich7_detected = 0; 291 int viaspi_detected = 0; 273 292 274 293 static int enable_flash_ich7(struct pci_dev *dev, const char *name) … … 661 680 {0x1106, 0x3177, "VIA VT8235", enable_flash_vt823x}, 662 681 {0x1106, 0x3227, "VIA VT8237", enable_flash_vt823x}, 682 {0x1106, 0x3372, "VIA VT8237S", enable_flash_vt8237s_spi}, 663 683 {0x1106, 0x8324, "VIA CX700", enable_flash_vt823x}, 664 684 {0x1106, 0x0686, "VIA VT82C686", enable_flash_amd8111},
