diff options
Diffstat (limited to 'arch/x86/pci/fixup.c')
-rw-r--r-- | arch/x86/pci/fixup.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index c82cbf4c7226..6cff66dd0c91 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c | |||
@@ -353,6 +353,53 @@ static void __devinit pci_fixup_video(struct pci_dev *pdev) | |||
353 | } | 353 | } |
354 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_video); | 354 | DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_video); |
355 | 355 | ||
356 | |||
357 | static struct dmi_system_id __devinitdata msi_k8t_dmi_table[] = { | ||
358 | { | ||
359 | .ident = "MSI-K8T-Neo2Fir", | ||
360 | .matches = { | ||
361 | DMI_MATCH(DMI_SYS_VENDOR, "MSI"), | ||
362 | DMI_MATCH(DMI_PRODUCT_NAME, "MS-6702E"), | ||
363 | }, | ||
364 | }, | ||
365 | {} | ||
366 | }; | ||
367 | |||
368 | /* | ||
369 | * The AMD-Athlon64 board MSI "K8T Neo2-FIR" disables the onboard sound | ||
370 | * card if a PCI-soundcard is added. | ||
371 | * | ||
372 | * The BIOS only gives options "DISABLED" and "AUTO". This code sets | ||
373 | * the corresponding register-value to enable the soundcard. | ||
374 | * | ||
375 | * The soundcard is only enabled, if the mainborad is identified | ||
376 | * via DMI-tables and the soundcard is detected to be off. | ||
377 | */ | ||
378 | static void __devinit pci_fixup_msi_k8t_onboard_sound(struct pci_dev *dev) | ||
379 | { | ||
380 | unsigned char val; | ||
381 | if (!dmi_check_system(msi_k8t_dmi_table)) | ||
382 | return; /* only applies to MSI K8T Neo2-FIR */ | ||
383 | |||
384 | pci_read_config_byte(dev, 0x50, &val); | ||
385 | if (val & 0x40) { | ||
386 | pci_write_config_byte(dev, 0x50, val & (~0x40)); | ||
387 | |||
388 | /* verify the change for status output */ | ||
389 | pci_read_config_byte(dev, 0x50, &val); | ||
390 | if (val & 0x40) | ||
391 | printk(KERN_INFO "PCI: Detected MSI K8T Neo2-FIR, " | ||
392 | "can't enable onboard soundcard!\n"); | ||
393 | else | ||
394 | printk(KERN_INFO "PCI: Detected MSI K8T Neo2-FIR, " | ||
395 | "enabled onboard soundcard.\n"); | ||
396 | } | ||
397 | } | ||
398 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, | ||
399 | pci_fixup_msi_k8t_onboard_sound); | ||
400 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, | ||
401 | pci_fixup_msi_k8t_onboard_sound); | ||
402 | |||
356 | /* | 403 | /* |
357 | * Some Toshiba laptops need extra code to enable their TI TSB43AB22/A. | 404 | * Some Toshiba laptops need extra code to enable their TI TSB43AB22/A. |
358 | * | 405 | * |