Changeset 4324
- Timestamp:
- 02/15/07 11:42:43 (2 years ago)
- Files:
-
- lm-sensors/trunk/CHANGES (modified) (1 diff)
- lm-sensors/trunk/kernel/busses/i2c-ali1563.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/CHANGES
r4323 r4324 6 6 Module bmcsensors: Fix debugging messages 7 7 Module i2c-ali1563: Improve the status messages (2.6 backport) 8 Fix device initialization (2.6 backport) 8 9 Module i2c-amd8111: Cleanups (2.6 backport) 9 10 Fix initialization race (2.6 backport) lm-sensors/trunk/kernel/busses/i2c-ali1563.c
r4323 r4324 327 327 328 328 329 static void ali1563_enable(struct pci_dev * dev)329 static int __devinit ali1563_setup(struct pci_dev * dev) 330 330 { 331 331 u16 ctrl; 332 332 333 333 pci_read_config_word(dev,ALI1563_SMBBA,&ctrl); 334 ctrl |= 0x7;335 pci_write_config_word(dev,ALI1563_SMBBA,ctrl);336 }337 338 static int __devinit ali1563_setup(struct pci_dev * dev)339 {340 u16 ctrl;341 342 pci_read_config_word(dev,ALI1563_SMBBA,&ctrl);343 344 /* Check if device is even enabled first */345 if (!(ctrl & ALI1563_SMB_IOEN)) {346 printk(KERN_WARNING "ali1563: I/O space not enabled, trying manually\n");347 ali1563_enable(dev);348 }349 if (!(ctrl & ALI1563_SMB_IOEN)) {350 printk(KERN_WARNING "ali1563: I/O space still not enabled, giving up\n");351 goto Err;352 }353 if (!(ctrl & ALI1563_SMB_HOSTEN)) {354 printk(KERN_WARNING "ali1563: Host Controller not enabled\n");355 goto Err;356 }357 334 358 335 /* SMB I/O Base in high 12 bits and must be aligned with the … … 363 340 goto Err; 364 341 } 342 343 /* Check if device is enabled */ 344 if (!(ctrl & ALI1563_SMB_HOSTEN)) { 345 printk(KERN_WARNING "ali1563: Host Controller not enabled\n"); 346 goto Err; 347 } 348 if (!(ctrl & ALI1563_SMB_IOEN)) { 349 printk(KERN_WARNING "I/O space not enabled, trying manually\n"); 350 pci_write_config_word(dev, ALI1563_SMBBA, 351 ctrl | ALI1563_SMB_IOEN); 352 pci_read_config_word(dev, ALI1563_SMBBA, &ctrl); 353 if (!(ctrl & ALI1563_SMB_IOEN)) { 354 printk(KERN_WARNING "I/O space still not enabled, " 355 "giving up\n"); 356 goto Err; 357 } 358 } 359 365 360 if (!request_region(ali1563_smba, ALI1563_SMB_IOSIZE, 366 361 ali1563_pci_driver.name)) {
