source: src/linux/pb42/linux-2.6.34.6/arch/mips/pci/fixup-ar7240.c @ 15138

Last change on this file since 15138 was 15138, checked in by BrainSlayer, 3 years ago

fixup wmac assignment

File size: 1.1 KB
Line 
1#include <linux/init.h>
2#include <linux/pci.h>
3#include "ar7240.h"
4
5/*
6 * PCI IRQ map
7 */
8int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
9{
10    //printk(KERN_EMERG "fixing irq for slot %d pin %d\n", slot, pin);
11
12#if 1
13    printk("Returning IRQ %d\n", AR7240_PCI_IRQ_DEV0);
14    return AR7240_PCI_IRQ_DEV0;
15#else
16    switch(slot)
17    {
18        case 0:
19            return AR7240_PCI_IRQ_DEV0;
20        case 1:
21            return AR7240_PCI_IRQ_DEV1;
22        case 2:
23            return AR7240_PCI_IRQ_DEV2;
24        default:
25            printk("unknown slot!\n");
26            return -1;
27    }
28#endif
29}
30
31static struct ath9k_platform_data ap91_wmac0_data;
32
33#define CALDATA0_OFFSET         0x1000
34
35int
36pcibios_plat_dev_init(struct pci_dev *dev)
37{
38        u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
39
40        ap91_wmac0_data.slot = 0;
41
42        printk(KERN_EMERG "init ATH9k WMAC %d\n",PCI_SLOT(dev->devfn));
43        switch(PCI_SLOT(dev->devfn)) {
44        case 0:
45                memcpy(ap91_wmac0_data.eeprom_data, art + CALDATA0_OFFSET,sizeof(ap91_wmac0_data.eeprom_data));
46                dev->dev.platform_data = &ap91_wmac0_data;
47                break;
48        }
49        return 0;
50}
51
Note: See TracBrowser for help on using the repository browser.