aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/pxa
Commit message (Expand)AuthorAgeFilesLines
* kernel: disable ARCH_NEEDS_CPU_IDLE_COUPLEDJohn Crispin2015-03-061-1/+0
* kernel: disbale HAMRADIO in generic configJohn Crispin2015-03-062-2/+0
* pxa: mark as brokenFelix Fietkau2015-01-241-1/+1
* all targets: remove all =m kernel config symbolsFelix Fietkau2015-01-051-20/+0
* kernel: makefiles: make use of new var KERNEL_PATCHVERFelix Fietkau2014-10-241-1/+1
* targets: remove useless quotes around KERNELNAMEFelix Fietkau2014-10-051-1/+1
* pxa: add support for kernel 3.10Hauke Mehrtens2014-07-187-0/+1721
* targets: prepare for supporting normal and initramfs imagesFlorian Fainelli2013-06-271-4/+0
* target: don't build jffs2 nor images by defaultJonas Gorski2013-06-051-1/+1
* target: enable XZ BCJ decompressor code after r35097Florian Fainelli2013-01-141-0/+2
* remove common symbols from 3.3 configsGabor Juhos2012-11-291-4/+0
* add Default and Gumstix PXA profilesFlorian Fainelli2012-10-033-1/+47
* advertise jffs2 featureFlorian Fainelli2012-10-031-1/+1
* remove broken flagFlorian Fainelli2012-10-031-1/+1
* fix build with latest gpiolib changesFlorian Fainelli2012-10-033-36/+43
* bump to 3.3.8John Crispin2012-06-051-1/+1
* kernel: update linux 3.3 to 3.3.7Gabor Juhos2012-05-231-1/+1
* linux: move certain disabled symbols to the generic configsGabor Juhos2012-05-151-8/+0
* kernel: update linux 3.3 to 3.3.6Gabor Juhos2012-05-141-1/+1
* kernel: update linux 3.3 to 3.3.5Gabor Juhos2012-05-071-1/+1
* pxa: remove 2.6.37 supportGabor Juhos2012-05-079-1735/+0
* pxa: switch to 3.3 and mark it as brokenGabor Juhos2012-05-071-2/+2
* pxa: add support for 3.3Gabor Juhos2012-05-077-0/+1711
* target: globally disable BSD process accountingJo-Philipp Wich2011-10-251-1/+0
* kernel: Update to version 2.6.37.6Hauke Mehrtens2011-04-031-1/+1
* update to 2.6.32.33 and 2.6.37.4Imre Kaloz2011-03-181-1/+1
* upgrade to 2.6.37Imre Kaloz2011-03-187-36/+47
* kernel: update to kernel version 2.6.32.32Hauke Mehrtens2011-03-131-1/+1
* only support EABI on ARM targetsImre Kaloz2011-03-071-1/+0
* update to 2.6.32.29Florian Fainelli2011-02-191-1/+1
* kernel: update kernel versions Update kernel 2.6.32.26 to 2.6.32.27 Update ke...Hauke Mehrtens2010-12-111-1/+1
* update to the latest stable kernelsImre Kaloz2010-11-241-1/+1
* update kernels to 2.6.32.25 and 2.6.35.8Imre Kaloz2010-11-041-1/+1
* mark targets maintained by meImre Kaloz2010-10-271-0/+1
* upgrade kernel versions to the latest stable onesImre Kaloz2010-10-041-1/+1
* update to 2.6.32.20Florian Fainelli2010-08-221-1/+1
* update kernel versionsImre Kaloz2010-07-191-1/+1
* update linux kernel to 2.6.32.14Nicolas Thill2010-05-271-1/+1
* kernel: update kernel to version 2.6.32.13 and 2.6.33.4Hauke Mehrtens2010-05-231-1/+1
* sync to kernel 2.6.32.12Alexandros C. Couloumbis2010-04-271-1/+1
* define a shared IMG_PREFIX variable used as a basename for image files, it co...Nicolas Thill2010-04-121-4/+4
* kernel: update to 2.6.32.10Gabor Juhos2010-03-261-1/+1
* kernel: update to kernel 2.6.32.9Hauke Mehrtens2010-02-281-1/+1
* update kernel from 2.6.32.7 to 2.6.32.8, thanks tripolarTravis Kemen2010-02-121-1/+1
* clean up handling of some kernel symbolsImre Kaloz2010-02-111-2/+0
* re-sort all target and subtarget config filesImre Kaloz2010-02-111-14/+14
* upgrade to 2.6.32.7, switch to squashfs, remove broken flagImre Kaloz2010-02-0959-20380/+1655
* another round of kernel config cleanupsImre Kaloz2009-11-111-4/+0
* move CPUFREQ to generic configsImre Kaloz2009-11-111-1/+0
* sort all target config filesImre Kaloz2009-11-111-28/+28
class="gi">+ struct pci_dev *bridge = pci_upstream_bridge(dev); + u16 *cal_data = NULL; + u16 cmd; + u32 bar0; + u32 val; + unsigned i; + + for (i = 0; i < ath9k_num_fixups; i++) { + if (ath9k_fixups[i].slot != PCI_SLOT(dev->devfn)) + continue; + + cal_data = ath9k_fixups[i].pdata.eeprom_data; + pdata = &ath9k_fixups[i].pdata; + break; + } + + if (cal_data == NULL) + return; + + if (*cal_data != 0xa55a) { + pr_err("pci %s: invalid calibration data\n", pci_name(dev)); + return; + } + + pr_info("pci %s: fixup device configuration\n", pci_name(dev)); + + switch (bcm63xx_get_cpu_id()) { + case BCM6328_CPU_ID: + val = BCM_PCIE_MEM_BASE_PA_6328; + break; + case BCM6348_CPU_ID: + case BCM6358_CPU_ID: + case BCM6368_CPU_ID: + val = BCM_PCI_MEM_BASE_PA; + break; + default: + BUG(); + } + + mem = ioremap(val, 0x10000); + if (!mem) { + pr_err("pci %s: ioremap error\n", pci_name(dev)); + return; + } + + if (bridge) + pci_enable_device(bridge); + + pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0); + pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0); + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, val); + + pci_read_config_word(dev, PCI_COMMAND, &cmd); + cmd |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY; + pci_write_config_word(dev, PCI_COMMAND, cmd); + + /* set offset to first reg address */ + cal_data += 3; + while(*cal_data != 0xffff) { + u32 reg; + reg = *cal_data++; + val = *cal_data++; + val |= (*cal_data++) << 16; + + writel(val, mem + reg); + udelay(100); + } + + pci_read_config_dword(dev, PCI_VENDOR_ID, &val); + dev->vendor = val & 0xffff; + dev->device = (val >> 16) & 0xffff; + + pci_read_config_dword(dev, PCI_CLASS_REVISION, &val); + dev->revision = val & 0xff; + dev->class = val >> 8; /* upper 3 bytes */ + + pci_read_config_word(dev, PCI_COMMAND, &cmd); + cmd &= ~(PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); + pci_write_config_word(dev, PCI_COMMAND, cmd); + + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, bar0); + + if (bridge) + pci_disable_device(bridge); + + iounmap(mem); + + dev->dev.platform_data = pdata; +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath9k_pci_fixup); + +void __init pci_enable_ath9k_fixup(unsigned slot, u32 offset) +{ + if (ath9k_num_fixups >= ARRAY_SIZE(ath9k_fixups)) + return; + + ath9k_fixups[ath9k_num_fixups].slot = slot; + + if (!bcm63xx_read_eeprom(ath9k_fixups[ath9k_num_fixups].pdata.eeprom_data, offset)) + return; + + if (bcm63xx_nvram_get_mac_address(ath9k_fixups[ath9k_num_fixups].mac)) + return; + + ath9k_fixups[ath9k_num_fixups].pdata.macaddr = ath9k_fixups[ath9k_num_fixups].mac; + ath9k_num_fixups++; +} --- /dev/null +++ b/arch/mips/include/asm/mach-bcm63xx/pci_ath9k_fixup.h @@ -0,0 +1,7 @@ +#ifndef _PCI_ATH9K_FIXUP +#define _PCI_ATH9K_FIXUP + + +void pci_enable_ath9k_fixup(unsigned slot, u32 offset) __init; + +#endif /* _PCI_ATH9K_FIXUP */