diff options
Diffstat (limited to 'arch/x86/kernel/quirks.c')
-rw-r--r-- | arch/x86/kernel/quirks.c | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c index d1385881810..67465ed8931 100644 --- a/arch/x86/kernel/quirks.c +++ b/arch/x86/kernel/quirks.c | |||
@@ -35,9 +35,6 @@ static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) | |||
35 | if (!(word & (1 << 13))) { | 35 | if (!(word & (1 << 13))) { |
36 | dev_info(&dev->dev, "Intel E7520/7320/7525 detected; " | 36 | dev_info(&dev->dev, "Intel E7520/7320/7525 detected; " |
37 | "disabling irq balancing and affinity\n"); | 37 | "disabling irq balancing and affinity\n"); |
38 | #ifdef CONFIG_IRQBALANCE | ||
39 | irqbalance_disable(""); | ||
40 | #endif | ||
41 | noirqdebug_setup(""); | 38 | noirqdebug_setup(""); |
42 | #ifdef CONFIG_PROC_FS | 39 | #ifdef CONFIG_PROC_FS |
43 | no_irq_affinity = 1; | 40 | no_irq_affinity = 1; |
@@ -354,9 +351,27 @@ static void ati_force_hpet_resume(void) | |||
354 | printk(KERN_DEBUG "Force enabled HPET at resume\n"); | 351 | printk(KERN_DEBUG "Force enabled HPET at resume\n"); |
355 | } | 352 | } |
356 | 353 | ||
354 | static u32 ati_ixp4x0_rev(struct pci_dev *dev) | ||
355 | { | ||
356 | u32 d; | ||
357 | u8 b; | ||
358 | |||
359 | pci_read_config_byte(dev, 0xac, &b); | ||
360 | b &= ~(1<<5); | ||
361 | pci_write_config_byte(dev, 0xac, b); | ||
362 | pci_read_config_dword(dev, 0x70, &d); | ||
363 | d |= 1<<8; | ||
364 | pci_write_config_dword(dev, 0x70, d); | ||
365 | pci_read_config_dword(dev, 0x8, &d); | ||
366 | d &= 0xff; | ||
367 | dev_printk(KERN_DEBUG, &dev->dev, "SB4X0 revision 0x%x\n", d); | ||
368 | return d; | ||
369 | } | ||
370 | |||
357 | static void ati_force_enable_hpet(struct pci_dev *dev) | 371 | static void ati_force_enable_hpet(struct pci_dev *dev) |
358 | { | 372 | { |
359 | u32 uninitialized_var(val); | 373 | u32 d, val; |
374 | u8 b; | ||
360 | 375 | ||
361 | if (hpet_address || force_hpet_address) | 376 | if (hpet_address || force_hpet_address) |
362 | return; | 377 | return; |
@@ -366,14 +381,33 @@ static void ati_force_enable_hpet(struct pci_dev *dev) | |||
366 | return; | 381 | return; |
367 | } | 382 | } |
368 | 383 | ||
384 | d = ati_ixp4x0_rev(dev); | ||
385 | if (d < 0x82) | ||
386 | return; | ||
387 | |||
388 | /* base address */ | ||
369 | pci_write_config_dword(dev, 0x14, 0xfed00000); | 389 | pci_write_config_dword(dev, 0x14, 0xfed00000); |
370 | pci_read_config_dword(dev, 0x14, &val); | 390 | pci_read_config_dword(dev, 0x14, &val); |
391 | |||
392 | /* enable interrupt */ | ||
393 | outb(0x72, 0xcd6); b = inb(0xcd7); | ||
394 | b |= 0x1; | ||
395 | outb(0x72, 0xcd6); outb(b, 0xcd7); | ||
396 | outb(0x72, 0xcd6); b = inb(0xcd7); | ||
397 | if (!(b & 0x1)) | ||
398 | return; | ||
399 | pci_read_config_dword(dev, 0x64, &d); | ||
400 | d |= (1<<10); | ||
401 | pci_write_config_dword(dev, 0x64, d); | ||
402 | pci_read_config_dword(dev, 0x64, &d); | ||
403 | if (!(d & (1<<10))) | ||
404 | return; | ||
405 | |||
371 | force_hpet_address = val; | 406 | force_hpet_address = val; |
372 | force_hpet_resume_type = ATI_FORCE_HPET_RESUME; | 407 | force_hpet_resume_type = ATI_FORCE_HPET_RESUME; |
373 | dev_printk(KERN_DEBUG, &dev->dev, "Force enabled HPET at 0x%lx\n", | 408 | dev_printk(KERN_DEBUG, &dev->dev, "Force enabled HPET at 0x%lx\n", |
374 | force_hpet_address); | 409 | force_hpet_address); |
375 | cached_dev = dev; | 410 | cached_dev = dev; |
376 | return; | ||
377 | } | 411 | } |
378 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS, | 412 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS, |
379 | ati_force_enable_hpet); | 413 | ati_force_enable_hpet); |