Changeset 628
- Timestamp:
- 11/14/99 03:41:27 (14 years ago)
- Location:
- lm-sensors/trunk
- Files:
-
- 2 modified
-
doc/busses/i2c-ali15x3 (modified) (2 diffs)
-
kernel/busses/i2c-ali15x3.c (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/doc/busses/i2c-ali15x3
r611 r628 86 86 You can't just enable the SMB alone. 87 87 The SMB and the ACPI have separate I/O spaces. 88 So we have to make sure that both the SMB and the ACPI 89 are mapped and enabled. 88 We make sure that the SMB is enabled. We leave the ACPI alone. 90 89 91 90 … … 99 98 Issues 100 99 ------ 101 This driver requests the I/O space both for the SMB and the ACPI 102 registers, just to be safe. It doesn't actually use the ACPI region. 103 It will therefore conflict with separate software 104 that accesses the ACPI registers? 105 To fix this, undefine MAP_ACPI. 100 This driver requests the I/O space for only the SMB 101 registers. It doesn't use the ACPI region. 106 102 107 103 On the ASUS P5A motherboard, there are several reports that -
lm-sensors/trunk/kernel/busses/i2c-ali15x3.c
r586 r628 51 51 You can't just enable the SMB alone. 52 52 The SMB and the ACPI have separate I/O spaces. 53 So we have to make sure that both the SMB and the ACPI 54 are mapped and enabled. 53 We make sure that the SMB is enabled. We leave the ACPI alone. 55 54 56 55 This driver controls the SMB Host only. 57 56 The SMB Slave controller on the M15X3 is not enabled. 58 59 This driver requests the I/O space both for the SMB and the ACPI60 registers, just to be safe. It doesn't actually use the ACPI region.61 It will therefore conflict with separate software62 that accesses the ACPI registers?63 To fix this, undefine MAP_ACPI.64 57 65 58 This driver does not use interrupts. … … 90 83 #endif 91 84 92 /* undefine this if separate ACPI software is accessing the93 registers at the offset defined at 0x10.94 */95 #define MAP_ACPI 196 85 #undef FORCE_ALI15X3_ENABLE 97 86 … … 108 97 /* PCI Address Constants */ 109 98 #define SMBCOM 0x004 110 #define ACPIBA 0x010111 99 #define SMBBA 0x014 112 100 #define SMBATPC 0x05B /* used to unlock xxxBA registers */ … … 118 106 /* Other settings */ 119 107 #define MAX_TIMEOUT 500 /* times 1/100 sec */ 120 #define ALI15X3_ACPI_IOSIZE 64121 108 #define ALI15X3_SMB_IOSIZE 32 122 109 … … 125 112 tell user to upgrade BIOS and we fail. 126 113 */ 127 #define ALI15X3_ACPI_DEFAULTBASE 0xEC00128 114 #define ALI15X3_SMB_DEFAULTBASE 0xE800 129 115 … … 196 182 197 183 static int __initdata ali15x3_initialized; 198 #ifdef MAP_ACPI199 static unsigned short ali15x3_acpia = 0;200 #endif201 184 static unsigned short ali15x3_smba = 0; 202 185 … … 244 227 245 228 /* Check the following things: 246 - ACPI and SMB I/O addresses areinitialized229 - SMB I/O address is initialized 247 230 - Device is enabled 248 231 - We can use the addresses … … 263 246 } 264 247 265 /* Determine the address of the ACPI and SMBus areas */ 266 #ifdef MAP_ACPI 267 pci_read_config_word_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn, 268 ACPIBA,&ali15x3_acpia); 269 ali15x3_acpia &= (0xffff & ~ (ALI15X3_ACPI_IOSIZE - 1)); 270 if(ali15x3_acpia == 0) { 271 printk("i2c-ali15x3.o: ALI15X3_acpi region uninitialized - upgrade BIOS?\n"); 272 error_return=-ENODEV; 273 } 274 #endif 275 248 /* Determine the address of the SMBus area */ 276 249 pci_read_config_word_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn, 277 250 SMBBA,&ali15x3_smba); … … 285 258 goto END; 286 259 287 #ifdef MAP_ACPI288 if (check_region(ali15x3_acpia, ALI15X3_ACPI_IOSIZE)) {289 printk("i2c-ali15x3.o: ALI15X3_acpi region 0x%x already in use!\n", ali15x3_acpia);290 printk("i2c-ali15x3.o: If conflicting ACPI software is installed, undefine MAP_ACPI and recompile!\n");291 error_return=-ENODEV;292 }293 #endif294 295 260 if (check_region(ali15x3_smba, ALI15X3_SMB_IOSIZE)) { 296 261 printk("i2c-ali15x3.o: ALI15X3_smb region 0x%x already in use!\n", ali15x3_smba); … … 305 270 SMBCOM, &temp); 306 271 if ((temp & 1) == 0) { 307 printk("SMBUS: Error: ACPI/SMB device not enabled - upgrade BIOS?\n");272 printk("SMBUS: Error: SMB device not enabled - upgrade BIOS?\n"); 308 273 error_return=-ENODEV; 309 274 goto END; … … 338 303 339 304 /* Everything is happy, let's grab the memory and set things up. */ 340 #ifdef MAP_ACPI341 request_region(ali15x3_acpia, ALI15X3_ACPI_IOSIZE, "ali15x3-acpi");342 #endif343 305 request_region(ali15x3_smba, ALI15X3_SMB_IOSIZE, "ali15x3-smb"); 344 306 … … 640 602 } 641 603 ali15x3_initialized ++; 642 #ifdef MAP_ACPI643 sprintf(ali15x3_adapter.name,"ACPI ALI15X3 at %04x",ali15x3_acpia);644 #endif645 604 sprintf(ali15x3_adapter.name,"SMBus ALI15X3 adapter at %04x",ali15x3_smba); 646 605 if ((res = i2c_add_adapter(&ali15x3_adapter))) { … … 666 625 } 667 626 if (ali15x3_initialized >= 1) { 668 #ifdef MAP_ACPI669 release_region(ali15x3_acpia, ALI15X3_ACPI_IOSIZE);670 #endif671 627 release_region(ali15x3_smba, ALI15X3_SMB_IOSIZE); 672 628 ali15x3_initialized--;
