diff options
Diffstat (limited to 'drivers/net/wireless/b43/main.c')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index b80352b308d5..a140165dfee0 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -2719,32 +2719,37 @@ static int b43_gpio_init(struct b43_wldev *dev) | |||
2719 | if (dev->dev->chip_id == 0x4301) { | 2719 | if (dev->dev->chip_id == 0x4301) { |
2720 | mask |= 0x0060; | 2720 | mask |= 0x0060; |
2721 | set |= 0x0060; | 2721 | set |= 0x0060; |
2722 | } else if (dev->dev->chip_id == 0x5354) { | ||
2723 | /* Don't allow overtaking buttons GPIOs */ | ||
2724 | set &= 0x2; /* 0x2 is LED GPIO on BCM5354 */ | ||
2722 | } | 2725 | } |
2723 | if (dev->dev->chip_id == 0x5354) | 2726 | |
2724 | set &= 0xff02; | ||
2725 | if (0 /* FIXME: conditional unknown */ ) { | 2727 | if (0 /* FIXME: conditional unknown */ ) { |
2726 | b43_write16(dev, B43_MMIO_GPIO_MASK, | 2728 | b43_write16(dev, B43_MMIO_GPIO_MASK, |
2727 | b43_read16(dev, B43_MMIO_GPIO_MASK) | 2729 | b43_read16(dev, B43_MMIO_GPIO_MASK) |
2728 | | 0x0100); | 2730 | | 0x0100); |
2729 | mask |= 0x0180; | 2731 | /* BT Coexistance Input */ |
2730 | set |= 0x0180; | 2732 | mask |= 0x0080; |
2733 | set |= 0x0080; | ||
2734 | /* BT Coexistance Out */ | ||
2735 | mask |= 0x0100; | ||
2736 | set |= 0x0100; | ||
2731 | } | 2737 | } |
2732 | if (dev->dev->bus_sprom->boardflags_lo & B43_BFL_PACTRL) { | 2738 | if (dev->dev->bus_sprom->boardflags_lo & B43_BFL_PACTRL) { |
2739 | /* PA is controlled by gpio 9, let ucode handle it */ | ||
2733 | b43_write16(dev, B43_MMIO_GPIO_MASK, | 2740 | b43_write16(dev, B43_MMIO_GPIO_MASK, |
2734 | b43_read16(dev, B43_MMIO_GPIO_MASK) | 2741 | b43_read16(dev, B43_MMIO_GPIO_MASK) |
2735 | | 0x0200); | 2742 | | 0x0200); |
2736 | mask |= 0x0200; | 2743 | mask |= 0x0200; |
2737 | set |= 0x0200; | 2744 | set |= 0x0200; |
2738 | } | 2745 | } |
2739 | if (dev->dev->core_rev >= 2) | ||
2740 | mask |= 0x0010; /* FIXME: This is redundant. */ | ||
2741 | 2746 | ||
2742 | switch (dev->dev->bus_type) { | 2747 | switch (dev->dev->bus_type) { |
2743 | #ifdef CONFIG_B43_BCMA | 2748 | #ifdef CONFIG_B43_BCMA |
2744 | case B43_BUS_BCMA: | 2749 | case B43_BUS_BCMA: |
2745 | bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL, | 2750 | bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL, |
2746 | (bcma_cc_read32(&dev->dev->bdev->bus->drv_cc, | 2751 | (bcma_cc_read32(&dev->dev->bdev->bus->drv_cc, |
2747 | BCMA_CC_GPIOCTL) & mask) | set); | 2752 | BCMA_CC_GPIOCTL) & ~mask) | set); |
2748 | break; | 2753 | break; |
2749 | #endif | 2754 | #endif |
2750 | #ifdef CONFIG_B43_SSB | 2755 | #ifdef CONFIG_B43_SSB |
@@ -2753,7 +2758,7 @@ static int b43_gpio_init(struct b43_wldev *dev) | |||
2753 | if (gpiodev) | 2758 | if (gpiodev) |
2754 | ssb_write32(gpiodev, B43_GPIO_CONTROL, | 2759 | ssb_write32(gpiodev, B43_GPIO_CONTROL, |
2755 | (ssb_read32(gpiodev, B43_GPIO_CONTROL) | 2760 | (ssb_read32(gpiodev, B43_GPIO_CONTROL) |
2756 | & mask) | set); | 2761 | & ~mask) | set); |
2757 | break; | 2762 | break; |
2758 | #endif | 2763 | #endif |
2759 | } | 2764 | } |