diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-05-09 18:54:49 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-05-09 18:54:49 -0400 |
commit | 2c4f365ad2361c93c097e958b2b0a7a112750228 (patch) | |
tree | 83c046142a6e057f005b97b4b7356cd4ff7a9783 /drivers/net/wireless/bcm43xx/bcm43xx_main.c | |
parent | 3cb7396b7b26585b1ab7c1a8ca554ec103da5d37 (diff) | |
parent | 47c93d2faf9d7e94393852823480ea61c868caee (diff) |
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream
Diffstat (limited to 'drivers/net/wireless/bcm43xx/bcm43xx_main.c')
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index 5e96bca6730a..ef6b253a92ce 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -61,10 +61,6 @@ MODULE_AUTHOR("Stefano Brivio"); | |||
61 | MODULE_AUTHOR("Michael Buesch"); | 61 | MODULE_AUTHOR("Michael Buesch"); |
62 | MODULE_LICENSE("GPL"); | 62 | MODULE_LICENSE("GPL"); |
63 | 63 | ||
64 | #ifdef CONFIG_BCM947XX | ||
65 | extern char *nvram_get(char *name); | ||
66 | #endif | ||
67 | |||
68 | #if defined(CONFIG_BCM43XX_DMA) && defined(CONFIG_BCM43XX_PIO) | 64 | #if defined(CONFIG_BCM43XX_DMA) && defined(CONFIG_BCM43XX_PIO) |
69 | static int modparam_pio; | 65 | static int modparam_pio; |
70 | module_param_named(pio, modparam_pio, int, 0444); | 66 | module_param_named(pio, modparam_pio, int, 0444); |
@@ -142,10 +138,6 @@ MODULE_PARM_DESC(fwpostfix, "Postfix for .fw files. Useful for using multiple fi | |||
142 | { PCI_VENDOR_ID_BROADCOM, 0x4324, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 138 | { PCI_VENDOR_ID_BROADCOM, 0x4324, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
143 | /* Broadcom 43XG 802.11b/g */ | 139 | /* Broadcom 43XG 802.11b/g */ |
144 | { PCI_VENDOR_ID_BROADCOM, 0x4325, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 140 | { PCI_VENDOR_ID_BROADCOM, 0x4325, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, |
145 | #ifdef CONFIG_BCM947XX | ||
146 | /* SB bus on BCM947xx */ | ||
147 | { PCI_VENDOR_ID_BROADCOM, 0x0800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | ||
148 | #endif | ||
149 | { 0 }, | 141 | { 0 }, |
150 | }; | 142 | }; |
151 | MODULE_DEVICE_TABLE(pci, bcm43xx_pci_tbl); | 143 | MODULE_DEVICE_TABLE(pci, bcm43xx_pci_tbl); |
@@ -786,9 +778,6 @@ static int bcm43xx_sprom_extract(struct bcm43xx_private *bcm) | |||
786 | { | 778 | { |
787 | u16 value; | 779 | u16 value; |
788 | u16 *sprom; | 780 | u16 *sprom; |
789 | #ifdef CONFIG_BCM947XX | ||
790 | char *c; | ||
791 | #endif | ||
792 | 781 | ||
793 | sprom = kzalloc(BCM43xx_SPROM_SIZE * sizeof(u16), | 782 | sprom = kzalloc(BCM43xx_SPROM_SIZE * sizeof(u16), |
794 | GFP_KERNEL); | 783 | GFP_KERNEL); |
@@ -796,28 +785,7 @@ static int bcm43xx_sprom_extract(struct bcm43xx_private *bcm) | |||
796 | printk(KERN_ERR PFX "sprom_extract OOM\n"); | 785 | printk(KERN_ERR PFX "sprom_extract OOM\n"); |
797 | return -ENOMEM; | 786 | return -ENOMEM; |
798 | } | 787 | } |
799 | #ifdef CONFIG_BCM947XX | ||
800 | sprom[BCM43xx_SPROM_BOARDFLAGS2] = atoi(nvram_get("boardflags2")); | ||
801 | sprom[BCM43xx_SPROM_BOARDFLAGS] = atoi(nvram_get("boardflags")); | ||
802 | |||
803 | if ((c = nvram_get("il0macaddr")) != NULL) | ||
804 | e_aton(c, (char *) &(sprom[BCM43xx_SPROM_IL0MACADDR])); | ||
805 | |||
806 | if ((c = nvram_get("et1macaddr")) != NULL) | ||
807 | e_aton(c, (char *) &(sprom[BCM43xx_SPROM_ET1MACADDR])); | ||
808 | |||
809 | sprom[BCM43xx_SPROM_PA0B0] = atoi(nvram_get("pa0b0")); | ||
810 | sprom[BCM43xx_SPROM_PA0B1] = atoi(nvram_get("pa0b1")); | ||
811 | sprom[BCM43xx_SPROM_PA0B2] = atoi(nvram_get("pa0b2")); | ||
812 | |||
813 | sprom[BCM43xx_SPROM_PA1B0] = atoi(nvram_get("pa1b0")); | ||
814 | sprom[BCM43xx_SPROM_PA1B1] = atoi(nvram_get("pa1b1")); | ||
815 | sprom[BCM43xx_SPROM_PA1B2] = atoi(nvram_get("pa1b2")); | ||
816 | |||
817 | sprom[BCM43xx_SPROM_BOARDREV] = atoi(nvram_get("boardrev")); | ||
818 | #else | ||
819 | bcm43xx_sprom_read(bcm, sprom); | 788 | bcm43xx_sprom_read(bcm, sprom); |
820 | #endif | ||
821 | 789 | ||
822 | /* boardflags2 */ | 790 | /* boardflags2 */ |
823 | value = sprom[BCM43xx_SPROM_BOARDFLAGS2]; | 791 | value = sprom[BCM43xx_SPROM_BOARDFLAGS2]; |
@@ -1225,12 +1193,6 @@ static int _switch_core(struct bcm43xx_private *bcm, int core) | |||
1225 | goto error; | 1193 | goto error; |
1226 | udelay(10); | 1194 | udelay(10); |
1227 | } | 1195 | } |
1228 | #ifdef CONFIG_BCM947XX | ||
1229 | if (bcm->pci_dev->bus->number == 0) | ||
1230 | bcm->current_core_offset = 0x1000 * core; | ||
1231 | else | ||
1232 | bcm->current_core_offset = 0; | ||
1233 | #endif | ||
1234 | 1196 | ||
1235 | return 0; | 1197 | return 0; |
1236 | error: | 1198 | error: |
@@ -1387,19 +1349,6 @@ void bcm43xx_wireless_core_reset(struct bcm43xx_private *bcm, int connect_phy) | |||
1387 | 1349 | ||
1388 | if ((bcm43xx_core_enabled(bcm)) && | 1350 | if ((bcm43xx_core_enabled(bcm)) && |
1389 | !bcm43xx_using_pio(bcm)) { | 1351 | !bcm43xx_using_pio(bcm)) { |
1390 | //FIXME: Do we _really_ want #ifndef CONFIG_BCM947XX here? | ||
1391 | #if 0 | ||
1392 | #ifndef CONFIG_BCM947XX | ||
1393 | /* reset all used DMA controllers. */ | ||
1394 | bcm43xx_dmacontroller_tx_reset(bcm, BCM43xx_MMIO_DMA1_BASE); | ||
1395 | bcm43xx_dmacontroller_tx_reset(bcm, BCM43xx_MMIO_DMA2_BASE); | ||
1396 | bcm43xx_dmacontroller_tx_reset(bcm, BCM43xx_MMIO_DMA3_BASE); | ||
1397 | bcm43xx_dmacontroller_tx_reset(bcm, BCM43xx_MMIO_DMA4_BASE); | ||
1398 | bcm43xx_dmacontroller_rx_reset(bcm, BCM43xx_MMIO_DMA1_BASE); | ||
1399 | if (bcm->current_core->rev < 5) | ||
1400 | bcm43xx_dmacontroller_rx_reset(bcm, BCM43xx_MMIO_DMA4_BASE); | ||
1401 | #endif | ||
1402 | #endif | ||
1403 | } | 1352 | } |
1404 | if (bcm43xx_status(bcm) == BCM43xx_STAT_SHUTTINGDOWN) { | 1353 | if (bcm43xx_status(bcm) == BCM43xx_STAT_SHUTTINGDOWN) { |
1405 | bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, | 1354 | bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, |
@@ -2140,32 +2089,11 @@ out: | |||
2140 | return err; | 2089 | return err; |
2141 | } | 2090 | } |
2142 | 2091 | ||
2143 | #ifdef CONFIG_BCM947XX | ||
2144 | static struct pci_device_id bcm43xx_47xx_ids[] = { | ||
2145 | { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4324) }, | ||
2146 | { 0 } | ||
2147 | }; | ||
2148 | #endif | ||
2149 | |||
2150 | static int bcm43xx_initialize_irq(struct bcm43xx_private *bcm) | 2092 | static int bcm43xx_initialize_irq(struct bcm43xx_private *bcm) |
2151 | { | 2093 | { |
2152 | int err; | 2094 | int err; |
2153 | 2095 | ||
2154 | bcm->irq = bcm->pci_dev->irq; | 2096 | bcm->irq = bcm->pci_dev->irq; |
2155 | #ifdef CONFIG_BCM947XX | ||
2156 | if (bcm->pci_dev->bus->number == 0) { | ||
2157 | struct pci_dev *d; | ||
2158 | struct pci_device_id *id; | ||
2159 | for (id = bcm43xx_47xx_ids; id->vendor; id++) { | ||
2160 | d = pci_get_device(id->vendor, id->device, NULL); | ||
2161 | if (d != NULL) { | ||
2162 | bcm->irq = d->irq; | ||
2163 | pci_dev_put(d); | ||
2164 | break; | ||
2165 | } | ||
2166 | } | ||
2167 | } | ||
2168 | #endif | ||
2169 | err = request_irq(bcm->irq, bcm43xx_interrupt_handler, | 2097 | err = request_irq(bcm->irq, bcm43xx_interrupt_handler, |
2170 | IRQF_SHARED, KBUILD_MODNAME, bcm); | 2098 | IRQF_SHARED, KBUILD_MODNAME, bcm); |
2171 | if (err) | 2099 | if (err) |
@@ -2645,10 +2573,6 @@ static int bcm43xx_probe_cores(struct bcm43xx_private *bcm) | |||
2645 | chip_id_16 = 0x4610; | 2573 | chip_id_16 = 0x4610; |
2646 | else if ((pci_device >= 0x4710) && (pci_device <= 0x4715)) | 2574 | else if ((pci_device >= 0x4710) && (pci_device <= 0x4715)) |
2647 | chip_id_16 = 0x4710; | 2575 | chip_id_16 = 0x4710; |
2648 | #ifdef CONFIG_BCM947XX | ||
2649 | else if ((pci_device >= 0x4320) && (pci_device <= 0x4325)) | ||
2650 | chip_id_16 = 0x4309; | ||
2651 | #endif | ||
2652 | else { | 2576 | else { |
2653 | printk(KERN_ERR PFX "Could not determine Chip ID\n"); | 2577 | printk(KERN_ERR PFX "Could not determine Chip ID\n"); |
2654 | return -ENODEV; | 2578 | return -ENODEV; |
@@ -4144,11 +4068,6 @@ static int __devinit bcm43xx_init_one(struct pci_dev *pdev, | |||
4144 | struct bcm43xx_private *bcm; | 4068 | struct bcm43xx_private *bcm; |
4145 | int err; | 4069 | int err; |
4146 | 4070 | ||
4147 | #ifdef CONFIG_BCM947XX | ||
4148 | if ((pdev->bus->number == 0) && (pdev->device != 0x0800)) | ||
4149 | return -ENODEV; | ||
4150 | #endif | ||
4151 | |||
4152 | #ifdef DEBUG_SINGLE_DEVICE_ONLY | 4071 | #ifdef DEBUG_SINGLE_DEVICE_ONLY |
4153 | if (strcmp(pci_name(pdev), DEBUG_SINGLE_DEVICE_ONLY)) | 4072 | if (strcmp(pci_name(pdev), DEBUG_SINGLE_DEVICE_ONLY)) |
4154 | return -ENODEV; | 4073 | return -ENODEV; |