aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen_lib.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-10-06 10:58:50 +0200
committerTakashi Iwai <tiwai@suse.de>2010-10-06 16:27:18 +0200
commitebebeece4ba596973c0c181a8cce5fd77bae427c (patch)
tree15cc6cab2f3a39ca9caaf99288f5f72b774ae346 /sound/pci/oxygen/oxygen_lib.c
parent7cb4ced5aa83b681c76b004c8960b4f2a6471fef (diff)
downloadmrst-s0i3-test-ebebeece4ba596973c0c181a8cce5fd77bae427c.tar.gz
mrst-s0i3-test-ebebeece4ba596973c0c181a8cce5fd77bae427c.tar.xz
mrst-s0i3-test-ebebeece4ba596973c0c181a8cce5fd77bae427c.zip
ALSA: oxygen: add PEX8111 initialization
Configure the PEX8111 bridge on the PCI Express cards so that the audio DMA controller can do proper burst reads and is less likely to lose data. This is usually done automatically, but is required on older cards where the user has not applied the PLX firmware update. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/oxygen/oxygen_lib.c')
-rw-r--r--sound/pci/oxygen/oxygen_lib.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c
index d10cc6ee1a6..e5ebe56fb0c 100644
--- a/sound/pci/oxygen/oxygen_lib.c
+++ b/sound/pci/oxygen/oxygen_lib.c
@@ -310,8 +310,10 @@ static void oxygen_restore_eeprom(struct oxygen *chip,
static void configure_pcie_bridge(struct pci_dev *pci)
{
- enum { PI7C9X110 };
+ enum { PEX811X, PI7C9X110 };
static const struct pci_device_id bridge_ids[] = {
+ { PCI_VDEVICE(PLX, 0x8111), .driver_data = PEX811X },
+ { PCI_VDEVICE(PLX, 0x8112), .driver_data = PEX811X },
{ PCI_DEVICE(0x12d8, 0xe110), .driver_data = PI7C9X110 },
{ }
};
@@ -328,6 +330,19 @@ static void configure_pcie_bridge(struct pci_dev *pci)
return;
switch (id->driver_data) {
+ case PEX811X: /* PLX PEX8111/PEX8112 PCIe/PCI bridge */
+ pci_read_config_dword(bridge, 0x48, &tmp);
+ tmp |= 1; /* enable blind prefetching */
+ tmp |= 1 << 11; /* enable beacon generation */
+ pci_write_config_dword(bridge, 0x48, tmp);
+
+ pci_write_config_dword(bridge, 0x84, 0x0c);
+ pci_read_config_dword(bridge, 0x88, &tmp);
+ tmp &= ~(7 << 27);
+ tmp |= 2 << 27; /* set prefetch size to 128 bytes */
+ pci_write_config_dword(bridge, 0x88, tmp);
+ break;
+
case PI7C9X110: /* Pericom PI7C9X110 PCIe/PCI bridge */
pci_read_config_dword(bridge, 0x40, &tmp);
tmp |= 1; /* park the PCI arbiter to the sound chip */