1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-07-07 20:31:10 +03:00

ar71xx: use different address in ap91_pci_fixup for the AR724[012] SoCs

With this change ath9k can handle the wireless chip on the TL-WR841N v7
board which is based on the AR7241 SoC.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23130 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg 2010-09-27 14:53:43 +00:00
parent 1a883422c6
commit d39b21c7f6

View File

@ -67,7 +67,20 @@ static void ap91_pci_fixup(struct pci_dev *dev)
}
/* Setup the PCI device to allow access to the internal registers */
pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, 0xffff);
switch (ar71xx_soc) {
case AR71XX_SOC_AR7240:
pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, 0xffff);
break;
case AR71XX_SOC_AR7241:
case AR71XX_SOC_AR7242:
pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, 0x1000ffff);
break;
default:
BUG();
}
pci_read_config_word(dev, PCI_COMMAND, &cmd);
cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
pci_write_config_word(dev, PCI_COMMAND, cmd);