Changeset 933 for trunk/board_enable.c
- Timestamp:
- 03/13/10 18:28:29 (2 years ago)
- File:
-
- 1 edited
-
trunk/board_enable.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/board_enable.c
r930 r933 80 80 case SUPERIO_VENDOR_ITE: 81 81 enter_conf_mode_ite(superio.port); 82 /* Enable flash mapping. Works for most old ITE style Super I/O. */82 /* Enable flash mapping. Works for most old ITE style Super I/O. */ 83 83 tmp = sio_read(superio.port, 0x24); 84 84 tmp |= 0xfc; … … 88 88 break; 89 89 default: 90 printf_debug("Unhandled Super I/O type!\n");90 printf_debug("Unhandled Super I/O type!\n"); 91 91 ret = -1; 92 92 break; … … 227 227 * - Shuttle AK38N: VIA KT333CF + VIA VT8235 + ITE IT8705F 228 228 * 229 * SIS950 superioprobably requires the same flash write enable.229 * The SIS950 Super I/O probably requires the same flash write enable. 230 230 */ 231 231 static int it8705f_write_enable_2e(const char *name) … … 240 240 int gpio_pin = gpio % 8; 241 241 uint16_t baseport; 242 uint8_t id; 243 uint8_t val; 244 245 if (gpio_bank > 4) 246 { 242 uint8_t id, val; 243 244 if (gpio_bank > 4) { 247 245 fprintf(stderr, "PC87360: Invalid GPIO %d\n", gpio); 248 246 return -1; … … 250 248 251 249 id = sio_read(0x2E, 0x20); 252 if (id != 0xE1) 253 { 250 if (id != 0xE1) { 254 251 fprintf(stderr, "PC87360: unexpected ID %02x\n", id); 255 252 return -1; 256 253 } 257 254 258 sio_write(0x2E, 0x07, 0x07); /* select GPIO device */255 sio_write(0x2E, 0x07, 0x07); /* Select GPIO device */ 259 256 baseport = (sio_read(0x2E, 0x60) << 8) | sio_read(0x2E, 0x61); 260 if((baseport & 0xFFF0) == 0xFFF0 || baseport == 0) 261 { 257 if ((baseport & 0xFFF0) == 0xFFF0 || baseport == 0) { 262 258 fprintf (stderr, "PC87360: invalid GPIO base address %04x\n", 263 259 baseport); … … 265 261 } 266 262 sio_mask (0x2E, 0x30, 0x01, 0x01); /* Enable logical device */ 267 sio_write(0x2E, 0xF0, gpio_bank *16 + gpio_pin);263 sio_write(0x2E, 0xF0, gpio_bank * 16 + gpio_pin); 268 264 sio_mask (0x2E, 0xF1, 0x01, 0x01); /* Make pin output */ 269 265 270 266 val = INB(baseport + bankbase[gpio_bank]); 271 if (raise)267 if (raise) 272 268 val |= 1 << gpio_pin; 273 269 else … … 1029 1025 { 1030 1026 struct pci_dev *dev; 1031 uint16_t base; 1032 uint16_t temp; 1027 uint16_t base, temp; 1033 1028 1034 1029 dev = pci_dev_find(0x1039, 0x0962); … … 1134 1129 1135 1130 if (id != 0x8701) { 1136 fprintf(stderr, "\nERROR: IT8703F Super IO not found.\n");1131 fprintf(stderr, "\nERROR: IT8703F Super I/O not found.\n"); 1137 1132 return -1; 1138 1133 } … … 1145 1140 1146 1141 if (!base) { 1147 fprintf(stderr, "\nERROR: Failed to read IT8703F Super IO GPIO"1142 fprintf(stderr, "\nERROR: Failed to read IT8703F Super I/O GPIO" 1148 1143 " Base.\n"); 1149 1144 return -1; … … 1162 1157 * There is only some limited checking on the port numbers. 1163 1158 */ 1164 static int 1165 it8712f_gpio_set(unsigned int line, int raise) 1159 static int it8712f_gpio_set(unsigned int line, int raise) 1166 1160 { 1167 1161 unsigned int port; … … 1187 1181 1188 1182 if (id != 0x8712) { 1189 fprintf(stderr, "\nERROR: IT8712F Super IO not found.\n");1183 fprintf(stderr, "\nERROR: IT8712F Super I/O not found.\n"); 1190 1184 return -1; 1191 1185 } … … 1198 1192 1199 1193 if (!base) { 1200 fprintf(stderr, "\nERROR: Failed to read IT8712F Super IO GPIO"1194 fprintf(stderr, "\nERROR: Failed to read IT8712F Super I/O GPIO" 1201 1195 " Base.\n"); 1202 1196 return -1; … … 1447 1441 1448 1442 if (board && board->status == NT) { 1449 if (!force_boardenable) 1450 { 1443 if (!force_boardenable) { 1451 1444 printf("WARNING: Your mainboard is %s %s, but the mainboard-specific\n" 1452 1445 "code has not been tested, and thus will not not be executed by default.\n" … … 1454 1447 "can fail without running the board specific code.\n\n" 1455 1448 "Please see the man page (section PROGRAMMER SPECIFIC INFO, subsection\n" 1456 "\"internal programmer\") for details \n",1449 "\"internal programmer\") for details.\n", 1457 1450 board->vendor_name, board->board_name); 1458 1451 board = NULL; 1459 } 1460 else 1452 } else { 1461 1453 printf("NOTE: Running an untested board enable procedure.\n" 1462 "Please report success/failure to flashrom@flashrom.org\n"); 1454 "Please report success/failure to flashrom@flashrom.org.\n"); 1455 } 1463 1456 } 1464 1457
Note: See TracChangeset
for help on using the changeset viewer.
