Changeset 628

Show
Ignore:
Timestamp:
11/14/99 03:41:27 (14 years ago)
Author:
mds
Message:

(mds) remove request_region for ACPI area. This would eventually

have conflicted with kernel ACPI support if it would access
ali15x3 registers directly.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/doc/busses/i2c-ali15x3

    r611 r628  
    8686You can't just enable the SMB alone. 
    8787The 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. 
     88We make sure that the SMB is enabled. We leave the ACPI alone. 
    9089 
    9190 
     
    9998Issues 
    10099------ 
    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. 
     100This driver requests the I/O space for only the SMB 
     101registers. It doesn't use the ACPI region. 
    106102 
    107103On the ASUS P5A motherboard, there are several reports that 
  • lm-sensors/trunk/kernel/busses/i2c-ali15x3.c

    r586 r628  
    5151    You can't just enable the SMB alone. 
    5252    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. 
    5554 
    5655    This driver controls the SMB Host only. 
    5756    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 ACPI 
    60     registers, just to be safe. It doesn't actually use the ACPI region. 
    61     It will therefore conflict with separate software 
    62     that accesses the ACPI registers? 
    63     To fix this, undefine MAP_ACPI. 
    6457 
    6558    This driver does not use interrupts. 
     
    9083#endif 
    9184 
    92 /* undefine this if separate ACPI software is accessing the 
    93    registers at the offset defined at 0x10. 
    94 */ 
    95 #define MAP_ACPI 1 
    9685#undef FORCE_ALI15X3_ENABLE 
    9786 
     
    10897/* PCI Address Constants */ 
    10998#define SMBCOM    0x004  
    110 #define ACPIBA     0x010 
    11199#define SMBBA     0x014 
    112100#define SMBATPC   0x05B         /* used to unlock xxxBA registers */ 
     
    118106/* Other settings */ 
    119107#define MAX_TIMEOUT 500         /* times 1/100 sec */ 
    120 #define ALI15X3_ACPI_IOSIZE 64 
    121108#define ALI15X3_SMB_IOSIZE 32 
    122109 
     
    125112   tell user to upgrade BIOS and we fail. 
    126113*/ 
    127 #define ALI15X3_ACPI_DEFAULTBASE 0xEC00 
    128114#define ALI15X3_SMB_DEFAULTBASE 0xE800 
    129115 
     
    196182 
    197183static int __initdata ali15x3_initialized; 
    198 #ifdef MAP_ACPI 
    199 static unsigned short ali15x3_acpia = 0; 
    200 #endif 
    201184static unsigned short ali15x3_smba = 0; 
    202185 
     
    244227 
    245228/* Check the following things: 
    246         - ACPI and SMB I/O addresses are initialized 
     229        - SMB I/O address is initialized 
    247230        - Device is enabled 
    248231        - We can use the addresses 
     
    263246  } 
    264247 
    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 */ 
    276249  pci_read_config_word_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn, 
    277250                              SMBBA,&ali15x3_smba); 
     
    285258    goto END; 
    286259 
    287 #ifdef MAP_ACPI 
    288   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 #endif 
    294  
    295260  if (check_region(ali15x3_smba, ALI15X3_SMB_IOSIZE)) { 
    296261    printk("i2c-ali15x3.o: ALI15X3_smb region 0x%x already in use!\n", ali15x3_smba); 
     
    305270                                SMBCOM, &temp); 
    306271  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");      
    308273    error_return=-ENODEV; 
    309274    goto END; 
     
    338303 
    339304  /* Everything is happy, let's grab the memory and set things up. */ 
    340 #ifdef MAP_ACPI 
    341   request_region(ali15x3_acpia, ALI15X3_ACPI_IOSIZE, "ali15x3-acpi");        
    342 #endif 
    343305  request_region(ali15x3_smba, ALI15X3_SMB_IOSIZE, "ali15x3-smb");        
    344306 
     
    640602  } 
    641603  ali15x3_initialized ++; 
    642 #ifdef MAP_ACPI 
    643   sprintf(ali15x3_adapter.name,"ACPI ALI15X3 at %04x",ali15x3_acpia); 
    644 #endif 
    645604  sprintf(ali15x3_adapter.name,"SMBus ALI15X3 adapter at %04x",ali15x3_smba); 
    646605  if ((res = i2c_add_adapter(&ali15x3_adapter))) { 
     
    666625  } 
    667626  if (ali15x3_initialized >= 1) { 
    668 #ifdef MAP_ACPI 
    669     release_region(ali15x3_acpia, ALI15X3_ACPI_IOSIZE); 
    670 #endif 
    671627    release_region(ali15x3_smba, ALI15X3_SMB_IOSIZE); 
    672628    ali15x3_initialized--;