Changeset 999
- Timestamp:
- 01/20/01 04:43:50 (12 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 3 modified
-
CHANGES (modified) (1 diff)
-
doc/chips/via686a (modified) (1 diff)
-
kernel/chips/via686a.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/CHANGES
r998 r999 21 21 Module lm78: Recognize chipid=0x20 22 22 Module sensors: Add xxx_init() calls for drivers added to mkpatch in 2.5.5. 23 Module via686a: Allow force=9191,address (for A7V/K7V boards) 23 24 Program mkpatch.pl: Fix adm9240 typos 24 25 Program sensors-detect: Recognize lm78 with chipid=0x20 -
lm-sensors/trunk/doc/chips/via686a
r755 r999 19 19 ----------------- 20 20 21 none 21 force=9191,address Set the I/O base address. Useful for Asus A7V boards that 22 don't set the address in the BIOS. Does not do a PCI 23 force; the via686a must still be present in lspci. 24 Don't use this unless the driver complains that the 25 base address is not set. Otherwise the driver will 26 recognize both the old and the forced address. 27 28 force_via686a=9191,address Same as force. 22 29 23 30 -
lm-sensors/trunk/kernel/chips/via686a.c
r933 r999 25 25 */ 26 26 27 /* 28 Warning - only supports a single via686a device. 29 */ 27 30 #include <linux/version.h> 28 31 #include <linux/module.h> … … 375 378 #endif /* MODULE */ 376 379 377 /* This module may seem overly long and complicated. In fact, it is not so 378 bad. Quite a lot of bookkeeping is done. A real driver can often cut 379 some corners. */ 380 381 /* For each registered VIA686A, we need to keep some data in memory. That 380 /* For the VIA686A, we need to keep some data in memory. That 382 381 data is pointed to by via686a_list[NR]->data. The structure itself is 383 382 dynamically allocated, at the same time when a new via686a client is … … 403 402 }; 404 403 404 static struct pci_dev *s_bridge; /* pointer to the (only) via686a */ 405 405 406 406 #ifdef MODULE … … 512 512 int via686a_find(int *address) 513 513 { 514 struct pci_dev *s_bridge;515 514 u16 val; 516 515 … … 525 524 pci_read_config_word(s_bridge, VIA686A_BASE_REG, &val)) 526 525 return -ENODEV; 527 *address = (val & 0xff80);526 *address = val & ~(VIA686A_EXTENT - 1); 528 527 if (*address == 0) { 529 printk("via686a.o: sensors not enabled - upgrade BIOS?\n"); 528 printk("via686a.o: base address not set - upgrade BIOS or use force=9191,addr\n"); 529 /* 530 If we do this then the module won't load and force won't work. 531 But unfortunately the above printk is printed even if we are doing a force. 530 532 return -ENODEV; 531 } 532 533 */ 534 } 535 /* 536 Moved below. 533 537 if (PCIBIOS_SUCCESSFUL != 534 538 pci_read_config_word(s_bridge, VIA686A_ENABLE_REG, &val)) … … 539 543 val | 0x01); 540 544 } 545 */ 541 546 return 0; 542 547 } … … 550 555 int err = 0; 551 556 const char *type_name = "via686a"; 557 u16 val; 552 558 553 559 /* Make sure we are probing the ISA bus!! */ … … 558 564 } 559 565 566 if(kind >= 0) /* force or force_via686a */ 567 address &= ~(VIA686A_EXTENT - 1); 560 568 if (check_region(address, VIA686A_EXTENT)) { 561 569 printk("via686a.o: region 0x%x already in use!\n", 562 570 address); 563 err = -ENODEV; 564 goto ERROR0; 571 return -ENODEV; 572 } 573 574 if(kind >= 0) { /* treat force and force_via686a equally */ 575 printk("via686a.o: forcing ISA address 0x%04X\n", address); 576 if (PCIBIOS_SUCCESSFUL != 577 pci_write_config_word(s_bridge, VIA686A_BASE_REG, address)) 578 return -ENODEV; 579 } 580 if (PCIBIOS_SUCCESSFUL != 581 pci_read_config_word(s_bridge, VIA686A_ENABLE_REG, &val)) 582 return -ENODEV; 583 if (!(val & 0x0001)) { 584 printk("via686a.o: enabling sensors\n"); 585 if (PCIBIOS_SUCCESSFUL != 586 pci_write_config_word(s_bridge, VIA686A_ENABLE_REG, 587 val | 0x0001)) 588 return -ENODEV; 565 589 } 566 590 … … 581 605 582 606 /* Reserve the ISA region */ 583 request_region(address, VIA686A_EXTENT, type_name);607 request_region(address, VIA686A_EXTENT, "via686a-sensors"); 584 608 585 609 /* Fill in the remaining client fields and put into the global list */ … … 697 721 via686a_write_value(client, VIA686A_REG_TEMP_MODE, 698 722 via686a_read_value(client, VIA686A_REG_TEMP_MODE) & 699 ! VIA686A_TEMP_MODE_MASK | VIA686A_TEMP_MODE_CONTINUOUS);723 !(VIA686A_TEMP_MODE_MASK | VIA686A_TEMP_MODE_CONTINUOUS)); 700 724 } 701 725
