Fixes for a bug that improperly set 0x0:1.0:45 to 0 instead of 0x40

This commit is contained in:
Ronald G. Minnich 2001-12-07 00:43:26 +00:00
parent 7902765050
commit bc91d65e48
2 changed files with 8 additions and 6 deletions

View file

@ -50,7 +50,7 @@ main()
outb(b, 0xcfc);
/* Flash write enable on SiS 540/630 */
outl(0x80000845, 0x0cf8);
b = inb(0x0cfd) & 0x40;
b = inb(0x0cfd) | 0x40;
outb(b, 0xcfd);
/* The same thing on SiS 950 SuperIO side */

View file

@ -68,7 +68,7 @@ int enable_flash_sis630 (void)
outb(b, 0xcfc);
/* Flash write enable on SiS 540/630 */
outl(0x80000845, 0x0cf8);
b = inb(0x0cfd) & 0x40;
b = inb(0x0cfd) | 0x40;
outb(b, 0xcfd);
/* The same thing on SiS 950 SuperIO side */
@ -95,6 +95,7 @@ int enable_flash_sis630 (void)
}
outb(0x24, 0x2e);
printf("2f is %#x\n", inb(0x2f));
b = inb(0x2f) | 0xfc;
outb(0x24, 0x2e);
outb(b, 0x2f);
@ -171,14 +172,15 @@ main (int argc, char * argv[])
enable_flash_sis630 ();
if (argc < 2){
printf("OK, only ENABLING flash write, but NOT FLASHING\n");
exit(0);
}
if ((flash = probe_flash (flashchips)) == NULL) {
printf("EEPROM not found\n");
exit(1);
}
if (argc < 2){
printf("OK, only ENABLING flash write, but NOT FLASHING\n");
exit(0);
}
size = flash->total_size * 1024;
if ((image = fopen (argv[1], "r")) == NULL) {