Changeset 15138
- Timestamp:
- 09/09/10 17:34:43 (3 years ago)
- Location:
- src/linux/pb42/linux-2.6.34.6/arch/mips/pci
- Files:
-
- 3 edited
-
fixup-ar7100.c (modified) (2 diffs)
-
fixup-ar7240.c (modified) (1 diff)
-
pci-ar7100.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/linux/pb42/linux-2.6.34.6/arch/mips/pci/fixup-ar7100.c
r15020 r15138 1 1 #include <linux/init.h> 2 2 #include <linux/pci.h> 3 #include <linux/ath9k_platform.h> 3 4 #include "ar7100.h" 4 5 … … 28 29 #endif 29 30 } 31 static struct ath9k_platform_data ap94_wmac0_data; 32 static struct ath9k_platform_data ap94_wmac1_data; 33 34 #define CALDATA0_OFFSET 0x1000 35 #define CALDATA1_OFFSET 0x5000 36 30 37 31 38 int 32 39 pcibios_plat_dev_init(struct pci_dev *dev) 33 40 { 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 } 34 58 return 0; 35 59 } -
src/linux/pb42/linux-2.6.34.6/arch/mips/pci/fixup-ar7240.c
r15020 r15138 29 29 } 30 30 31 static struct ath9k_platform_data ap91_wmac0_data; 32 33 #define CALDATA0_OFFSET 0x1000 34 31 35 int 32 36 pcibios_plat_dev_init(struct pci_dev *dev) 33 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 } 34 49 return 0; 35 50 } -
src/linux/pb42/linux-2.6.34.6/arch/mips/pci/pci-ar7100.c
r15136 r15138 7 7 #include <linux/cpumask.h> 8 8 #include <linux/delay.h> 9 #include <linux/ath9k_platform.h>10 9 11 10 #include <asm/delay.h> … … 176 175 * There is no translation for inbound access (PCI device as a master) 177 176 */ 178 static struct ath9k_platform_data ap94_wmac0_data;179 static struct ath9k_platform_data ap94_wmac1_data;180 181 #define CALDATA0_OFFSET 0x1000182 #define CALDATA1_OFFSET 0x5000183 184 177 static void ar71xx_pci_fixup(struct pci_dev *dev) 185 178 { 186 179 u32 t; 187 u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);188 180 189 181 if (!ar71xx_pci_fixup_enable) 190 182 return; 191 183 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 }207 184 208 185 if (dev->bus->number != 0 || dev->devfn != 0)
Note: See TracChangeset
for help on using the changeset viewer.
