.. | .. |
---|
7 | 7 | #include <linux/dmi.h> |
---|
8 | 8 | #include <linux/pci.h> |
---|
9 | 9 | #include <linux/vgaarb.h> |
---|
| 10 | +#include <asm/amd_nb.h> |
---|
10 | 11 | #include <asm/hpet.h> |
---|
11 | 12 | #include <asm/pci_x86.h> |
---|
12 | 13 | |
---|
.. | .. |
---|
824 | 825 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x7910, rs690_fix_64bit_dma); |
---|
825 | 826 | |
---|
826 | 827 | #endif |
---|
| 828 | + |
---|
| 829 | +#ifdef CONFIG_AMD_NB |
---|
| 830 | + |
---|
| 831 | +#define AMD_15B8_RCC_DEV2_EPF0_STRAP2 0x10136008 |
---|
| 832 | +#define AMD_15B8_RCC_DEV2_EPF0_STRAP2_NO_SOFT_RESET_DEV2_F0_MASK 0x00000080L |
---|
| 833 | + |
---|
| 834 | +static void quirk_clear_strap_no_soft_reset_dev2_f0(struct pci_dev *dev) |
---|
| 835 | +{ |
---|
| 836 | + u32 data; |
---|
| 837 | + |
---|
| 838 | + if (!amd_smn_read(0, AMD_15B8_RCC_DEV2_EPF0_STRAP2, &data)) { |
---|
| 839 | + data &= ~AMD_15B8_RCC_DEV2_EPF0_STRAP2_NO_SOFT_RESET_DEV2_F0_MASK; |
---|
| 840 | + if (amd_smn_write(0, AMD_15B8_RCC_DEV2_EPF0_STRAP2, data)) |
---|
| 841 | + pci_err(dev, "Failed to write data 0x%x\n", data); |
---|
| 842 | + } else { |
---|
| 843 | + pci_err(dev, "Failed to read data\n"); |
---|
| 844 | + } |
---|
| 845 | +} |
---|
| 846 | +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x15b8, quirk_clear_strap_no_soft_reset_dev2_f0); |
---|
| 847 | +#endif |
---|