aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/quirks.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r--drivers/pci/quirks.c55
1 files changed, 51 insertions, 4 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 4970f47be72c..d378478612fb 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -592,7 +592,7 @@ static void __init quirk_amd_8131_ioapic(struct pci_dev *dev)
592 pci_write_config_byte( dev, AMD8131_MISC, tmp); 592 pci_write_config_byte( dev, AMD8131_MISC, tmp);
593 } 593 }
594} 594}
595DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_APIC, quirk_amd_8131_ioapic ); 595DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_amd_8131_ioapic);
596 596
597static void __init quirk_svw_msi(struct pci_dev *dev) 597static void __init quirk_svw_msi(struct pci_dev *dev)
598{ 598{
@@ -634,6 +634,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_vi
634 * non-x86 architectures (yes Via exists on PPC among other places), 634 * non-x86 architectures (yes Via exists on PPC among other places),
635 * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get 635 * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get
636 * interrupts delivered properly. 636 * interrupts delivered properly.
637 *
638 * Some of the on-chip devices are actually '586 devices' so they are
639 * listed here.
637 */ 640 */
638static void quirk_via_irq(struct pci_dev *dev) 641static void quirk_via_irq(struct pci_dev *dev)
639{ 642{
@@ -642,13 +645,19 @@ static void quirk_via_irq(struct pci_dev *dev)
642 new_irq = dev->irq & 0xf; 645 new_irq = dev->irq & 0xf;
643 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); 646 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
644 if (new_irq != irq) { 647 if (new_irq != irq) {
645 printk(KERN_INFO "PCI: Via IRQ fixup for %s, from %d to %d\n", 648 printk(KERN_INFO "PCI: VIA IRQ fixup for %s, from %d to %d\n",
646 pci_name(dev), irq, new_irq); 649 pci_name(dev), irq, new_irq);
647 udelay(15); /* unknown if delay really needed */ 650 udelay(15); /* unknown if delay really needed */
648 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq); 651 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
649 } 652 }
650} 653}
651DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq); 654DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, quirk_via_irq);
655DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, quirk_via_irq);
656DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irq);
657DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_irq);
658DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq);
659DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq);
660DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq);
652 661
653/* 662/*
654 * VIA VT82C598 has its device ID settable and many BIOSes 663 * VIA VT82C598 has its device ID settable and many BIOSes
@@ -865,6 +874,36 @@ static void __init quirk_eisa_bridge(struct pci_dev *dev)
865DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375, quirk_eisa_bridge ); 874DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375, quirk_eisa_bridge );
866 875
867/* 876/*
877 * On the MSI-K8T-Neo2Fir Board, the internal Soundcard is disabled
878 * when a PCI-Soundcard is added. The BIOS only gives Options
879 * "Disabled" and "AUTO". This Quirk Sets the corresponding
880 * Register-Value to enable the Soundcard.
881 */
882static void __init k8t_sound_hostbridge(struct pci_dev *dev)
883{
884 unsigned char val;
885
886 printk(KERN_INFO "PCI: Quirk-MSI-K8T Soundcard On\n");
887 pci_read_config_byte(dev, 0x50, &val);
888 if (val == 0x88 || val == 0xc8) {
889 pci_write_config_byte(dev, 0x50, val & (~0x40));
890
891 /* Verify the Change for Status output */
892 pci_read_config_byte(dev, 0x50, &val);
893 if (val & 0x40)
894 printk(KERN_INFO "PCI: MSI-K8T soundcard still off\n");
895 else
896 printk(KERN_INFO "PCI: MSI-K8T soundcard on\n");
897 } else {
898 printk(KERN_INFO "PCI: Unexpected Value in PCI-Register: "
899 "no Change!\n");
900 }
901
902}
903DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_hostbridge);
904
905#ifndef CONFIG_ACPI_SLEEP
906/*
868 * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge 907 * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge
869 * is not activated. The myth is that Asus said that they do not want the 908 * is not activated. The myth is that Asus said that they do not want the
870 * users to be irritated by just another PCI Device in the Win98 device 909 * users to be irritated by just another PCI Device in the Win98 device
@@ -875,8 +914,12 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375, quirk_e
875 * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it 914 * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it
876 * becomes necessary to do this tweak in two steps -- I've chosen the Host 915 * becomes necessary to do this tweak in two steps -- I've chosen the Host
877 * bridge as trigger. 916 * bridge as trigger.
917 *
918 * Actually, leaving it unhidden and not redoing the quirk over suspend2ram
919 * will cause thermal management to break down, and causing machine to
920 * overheat.
878 */ 921 */
879static int __initdata asus_hides_smbus = 0; 922static int __initdata asus_hides_smbus;
880 923
881static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev) 924static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
882{ 925{
@@ -921,6 +964,7 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
921 if (dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB) { 964 if (dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB) {
922 switch (dev->subsystem_device) { 965 switch (dev->subsystem_device) {
923 case 0x1882: /* M6V notebook */ 966 case 0x1882: /* M6V notebook */
967 case 0x1977: /* A6VA notebook */
924 asus_hides_smbus = 1; 968 asus_hides_smbus = 1;
925 } 969 }
926 } 970 }
@@ -999,6 +1043,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, asu
999DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc ); 1043DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, asus_hides_smbus_lpc );
1000DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc ); 1044DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, asus_hides_smbus_lpc );
1001DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, asus_hides_smbus_lpc ); 1045DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, asus_hides_smbus_lpc );
1046DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, asus_hides_smbus_lpc );
1002 1047
1003static void __init asus_hides_smbus_lpc_ich6(struct pci_dev *dev) 1048static void __init asus_hides_smbus_lpc_ich6(struct pci_dev *dev)
1004{ 1049{
@@ -1017,6 +1062,8 @@ static void __init asus_hides_smbus_lpc_ich6(struct pci_dev *dev)
1017} 1062}
1018DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, asus_hides_smbus_lpc_ich6 ); 1063DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, asus_hides_smbus_lpc_ich6 );
1019 1064
1065#endif
1066
1020/* 1067/*
1021 * SiS 96x south bridge: BIOS typically hides SMBus device... 1068 * SiS 96x south bridge: BIOS typically hides SMBus device...
1022 */ 1069 */