Changeset 15138


Ignore:
Timestamp:
09/09/10 17:34:43 (3 years ago)
Author:
BrainSlayer
Message:

fixup wmac assignment

Location:
src/linux/pb42/linux-2.6.34.6/arch/mips/pci
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/linux/pb42/linux-2.6.34.6/arch/mips/pci/fixup-ar7100.c

    r15020 r15138  
    11#include <linux/init.h> 
    22#include <linux/pci.h> 
     3#include <linux/ath9k_platform.h> 
    34#include "ar7100.h" 
    45 
     
    2829#endif 
    2930} 
     31static struct ath9k_platform_data ap94_wmac0_data; 
     32static struct ath9k_platform_data ap94_wmac1_data; 
     33 
     34#define CALDATA0_OFFSET         0x1000 
     35#define CALDATA1_OFFSET         0x5000 
     36  
    3037 
    3138int  
    3239pcibios_plat_dev_init(struct pci_dev *dev) 
    3340{ 
     41        u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); 
     42 
     43        ap94_wmac0_data.slot = 0; 
     44        ap94_wmac1_data.slot = 1; 
     45 
     46        printk(KERN_EMERG "init ATH9k WMAC %d\n",PCI_SLOT(dev->devfn)); 
     47        switch(PCI_SLOT(dev->devfn)) { 
     48        case 0: 
     49                memcpy(ap94_wmac0_data.eeprom_data, art + CALDATA0_OFFSET,sizeof(ap94_wmac0_data.eeprom_data)); 
     50                dev->dev.platform_data = &ap94_wmac0_data; 
     51                break; 
     52 
     53        case 1: 
     54                memcpy(ap94_wmac1_data.eeprom_data, art + CALDATA1_OFFSET,sizeof(ap94_wmac1_data.eeprom_data)); 
     55                dev->dev.platform_data = &ap94_wmac1_data; 
     56                break; 
     57        } 
    3458        return 0; 
    3559} 
  • src/linux/pb42/linux-2.6.34.6/arch/mips/pci/fixup-ar7240.c

    r15020 r15138  
    2929} 
    3030 
     31static struct ath9k_platform_data ap91_wmac0_data; 
     32 
     33#define CALDATA0_OFFSET         0x1000 
     34 
    3135int  
    3236pcibios_plat_dev_init(struct pci_dev *dev) 
    3337{ 
     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        } 
    3449        return 0; 
    3550} 
  • src/linux/pb42/linux-2.6.34.6/arch/mips/pci/pci-ar7100.c

    r15136 r15138  
    77#include <linux/cpumask.h> 
    88#include <linux/delay.h> 
    9 #include <linux/ath9k_platform.h> 
    109 
    1110#include <asm/delay.h> 
     
    176175 * There is no translation for inbound access (PCI device as a master) 
    177176 */ 
    178 static struct ath9k_platform_data ap94_wmac0_data; 
    179 static struct ath9k_platform_data ap94_wmac1_data; 
    180  
    181 #define CALDATA0_OFFSET         0x1000 
    182 #define CALDATA1_OFFSET         0x5000 
    183   
    184177static void ar71xx_pci_fixup(struct pci_dev *dev) 
    185178{ 
    186179        u32 t; 
    187         u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); 
    188180 
    189181        if (!ar71xx_pci_fixup_enable) 
    190182                return; 
    191183                 
    192         ap94_wmac0_data.slot = 0; 
    193         ap94_wmac1_data.slot = 1; 
    194         memcpy(ap94_wmac0_data.eeprom_data, art + CALDATA0_OFFSET,sizeof(ap94_wmac0_data.eeprom_data)); 
    195  
    196         memcpy(ap94_wmac1_data.eeprom_data, art + CALDATA1_OFFSET,sizeof(ap94_wmac1_data.eeprom_data)); 
    197  
    198         switch(PCI_SLOT(dev->devfn)) { 
    199         case 17: 
    200                 dev->dev.platform_data = &ap94_wmac0_data; 
    201                 break; 
    202  
    203         case 18: 
    204                 dev->dev.platform_data = &ap94_wmac1_data; 
    205                 break; 
    206         } 
    207184 
    208185        if (dev->bus->number != 0 || dev->devfn != 0) 
Note: See TracChangeset for help on using the changeset viewer.