Changeset 1154
- Timestamp:
- 08/03/01 03:25:11 (7 years ago)
- Files:
-
- lm-sensors/trunk/CHANGES (modified) (2 diffs)
- lm-sensors/trunk/README (modified) (1 diff)
- lm-sensors/trunk/kernel/busses/i2c-amd756.c (modified) (11 diffs)
- lm-sensors/trunk/prog/detect/sensors-detect (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/CHANGES
r1150 r1154 25 25 Library: ds1621 and it87 updates 26 26 Module i2c-ali15x3: Allow force_addr=0xaddr; enable if not enabled. 27 Module i2c-amd756: Add AMD 766 support 27 28 Module i2c-i801: Fix 82801BA detection broken by kernel 2.4.6 28 29 Module i2c-sis5595: Recognize unsupported chips and refuse to load … … 33 34 Module w83781d: Fix fan speed for as99127f (broken by 2.6.0) 34 35 Program sensors: it87 updates 35 Program sensors-detect: Fix ADM1024 and ADM1025 detection. 36 Program sensors-detect: Fix ADM1024 and ADM1025 detection; 37 recognize unsupported SiS chips; 38 recognize AMD 766. 36 39 37 40 2.6.0 (20010612) lm-sensors/trunk/README
r1137 r1154 33 33 At least the following I2C/SMBus adapters are supported: 34 34 Acer Labs M1533, M1535, and M1543C 35 AMD 756 35 AMD 756, 766 36 36 Apple Hydra (used on some PPC machines) 37 37 DEC 21272/21274 (Tsunami/Typhoon - on Alpha boards) lm-sensors/trunk/kernel/busses/i2c-amd756.c
r949 r1154 25 25 */ 26 26 27 /* Note: we assume there can only be one AMD756, with one SMBus interface */ 27 /* 28 Supports AMD756 and AMD766. 29 Note: we assume there can only be one device, with one SMBus interface. 30 */ 28 31 29 32 #include <linux/version.h> … … 39 42 40 43 #include <linux/init.h> 44 45 #ifndef PCI_DEVICE_ID_AMD_756 46 #define PCI_DEVICE_ID_AMD_756 0x740B 47 #endif 48 #ifndef PCI_DEVICE_ID_AMD_766 49 #define PCI_DEVICE_ID_AMD_766 0x7413 50 #endif 51 52 static int supported[] = {PCI_DEVICE_ID_AMD_756, 53 PCI_DEVICE_ID_AMD_766, 54 0 }; 41 55 42 56 /* AMD756 SMBus address offsets */ … … 105 119 /* master_xfer */ NULL, 106 120 /* smbus_access */ amd756_access, 107 /* slave _send */ NULL,121 /* slave;_send */ NULL, 108 122 /* slave_rcv */ NULL, 109 123 /* algo_control */ NULL, … … 125 139 static unsigned short amd756_smba = 0; 126 140 127 /* externalize it */128 #define PCI_DEVICE_ID_AMD_756 0x740B129 130 141 /* Detect whether a AMD756 can be found, and initialize it, where necessary. 131 142 Note the differences between kernels with the old PCI BIOS interface and … … 136 147 int error_return = 0; 137 148 unsigned char temp; 138 139 struct pci_dev *AMD756_dev ;149 int *num = supported; 150 struct pci_dev *AMD756_dev = NULL; 140 151 141 152 /* First check whether we can access PCI at all */ 142 153 if (pci_present() == 0) { 143 154 printk("i2c-amd756.o: Error: No PCI-bus found!\n"); 144 error_return = -ENODEV; 145 goto END; 155 return(-ENODEV); 146 156 } 147 157 148 158 /* Look for the AMD756, function 3 */ 149 159 /* Note: we keep on searching until we have found 'function 3' */ 150 AMD756_dev = NULL; 151 do 152 AMD756_dev = pci_find_device(PCI_VENDOR_ID_AMD, 153 PCI_DEVICE_ID_AMD_756, 154 AMD756_dev); 155 while (AMD756_dev && (PCI_FUNC(AMD756_dev->devfn) != 3)); 160 do { 161 if((AMD756_dev = pci_find_device(PCI_VENDOR_ID_AMD, 162 *num, AMD756_dev))) { 163 if(PCI_FUNC(AMD756_dev->devfn) != 3) 164 continue; 165 break; 166 } 167 num++; 168 } while (*num != 0); 169 156 170 if (AMD756_dev == NULL) { 157 171 printk 158 172 ("i2c-amd756.o: Error: Can't detect AMD756, function 3!\n"); 159 error_return = -ENODEV; 160 goto END; 173 return(-ENODEV); 161 174 } 162 175 … … 166 179 printk 167 180 ("SMBUS: Error: Host SMBus controller I/O not enabled!\n"); 168 error_return = -ENODEV; 169 goto END; 181 return(-ENODEV); 170 182 } 171 183 … … 180 192 ("i2c-amd756.o: AMD756_smb region 0x%x already in use!\n", 181 193 amd756_smba); 182 error_return = -ENODEV; 183 goto END; 194 return(-ENODEV); 184 195 } 185 196 … … 203 214 #endif /* DEBUG */ 204 215 205 END: 206 return error_return; 216 return 0; 207 217 } 208 218 … … 459 469 if ((res = amd756_setup())) { 460 470 printk 461 ("i2c-amd756.o: AMD756 not detected, module not inserted.\n");471 ("i2c-amd756.o: AMD756/766 not detected, module not inserted.\n"); 462 472 amd756_cleanup(); 463 473 return res; 464 474 } 465 475 amd756_initialized++; 466 sprintf(amd756_adapter.name, "SMBus AMD7 56 adapter at %04x",476 sprintf(amd756_adapter.name, "SMBus AMD7X6 adapter at %04x", 467 477 amd756_smba); 468 478 if ((res = i2c_add_adapter(&amd756_adapter))) { … … 473 483 } 474 484 amd756_initialized++; 475 printk("i2c-amd756.o: AMD756 bus detected and initialized\n");485 printk("i2c-amd756.o: AMD756/766 bus detected and initialized\n"); 476 486 return 0; 477 487 } … … 500 510 501 511 MODULE_AUTHOR("Merlin Hughes <merlin@merlin.org>"); 502 MODULE_DESCRIPTION("AMD756 SMBus driver");512 MODULE_DESCRIPTION("AMD756/766 SMBus driver"); 503 513 504 514 int init_module(void) lm-sensors/trunk/prog/detect/sensors-detect
r1152 r1154 178 178 procid => "AMD-756 Athlon ACPI", 179 179 driver => "i2c-amd756", 180 match => sub { $_[0] =~ /^SMBus AMD756 adapter at [0-9,a-f]{4}/ }, 180 match => sub { $_[0] =~ /^SMBus AMD7X6 adapter at [0-9,a-f]{4}/ }, 181 }, 182 { 183 vendid => 0x1022, 184 devid => 0x7413, 185 func => 3, 186 procid => "AMD-766 Athlon ACPI", 187 driver => "i2c-amd756", 188 match => sub { $_[0] =~ /^SMBus AMD7X6 adapter at [0-9,a-f]{4}/ }, 181 189 }, 182 190 {
