]> git.karo-electronics.de Git - linux-beck.git/commitdiff
brcmsmac: use bcma PCIe up and down functions
authorHauke Mehrtens <hauke@hauke-m.de>
Fri, 23 Aug 2013 22:32:31 +0000 (00:32 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 26 Aug 2013 18:09:03 +0000 (14:09 -0400)
replace the calls to bcma_core_pci_extend_L1timer() by calls to the
newly introduced bcma_core_pci_ip() and bcma_core_pci_down()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
drivers/net/wireless/brcm80211/brcmsmac/aiutils.h
drivers/net/wireless/brcm80211/brcmsmac/main.c

index e4fd1ee3d690c48c11bd7a08b1ed477ab5632682..53365977bfd6f271287f49e26662b8f9c197a9f7 100644 (file)
@@ -679,27 +679,6 @@ bool ai_clkctl_cc(struct si_pub *sih, enum bcma_clkmode mode)
        return mode == BCMA_CLKMODE_FAST;
 }
 
-void ai_pci_up(struct si_pub *sih)
-{
-       struct si_info *sii;
-
-       sii = container_of(sih, struct si_info, pub);
-
-       if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI)
-               bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci[0], true);
-}
-
-/* Unconfigure and/or apply various WARs when going down */
-void ai_pci_down(struct si_pub *sih)
-{
-       struct si_info *sii;
-
-       sii = container_of(sih, struct si_info, pub);
-
-       if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI)
-               bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci[0], false);
-}
-
 /* Enable BT-COEX & Ex-PA for 4313 */
 void ai_epa_4313war(struct si_pub *sih)
 {
index 89562c1fbf4961a8e42ef7d989e21b1aa36f4564..a8a267b5b87aebfd6bd40006c628c7964afc9cca 100644 (file)
@@ -183,9 +183,6 @@ extern u16 ai_clkctl_fast_pwrup_delay(struct si_pub *sih);
 extern bool ai_clkctl_cc(struct si_pub *sih, enum bcma_clkmode mode);
 extern bool ai_deviceremoved(struct si_pub *sih);
 
-extern void ai_pci_down(struct si_pub *sih);
-extern void ai_pci_up(struct si_pub *sih);
-
 /* Enable Ex-PA for 4313 */
 extern void ai_epa_4313war(struct si_pub *sih);
 
index c3c6123dc7dd26b95b6131e1a7789aaf7333b3ee..4608e0eb14939d12a73a4af5d3c2408e27bc877c 100644 (file)
@@ -4669,7 +4669,7 @@ static int brcms_b_attach(struct brcms_c_info *wlc, struct bcma_device *core,
        brcms_c_coredisable(wlc_hw);
 
        /* Match driver "down" state */
-       ai_pci_down(wlc_hw->sih);
+       bcma_core_pci_down(wlc_hw->d11core->bus);
 
        /* turn off pll and xtal to match driver "down" state */
        brcms_b_xtal(wlc_hw, OFF);
@@ -5012,12 +5012,12 @@ static int brcms_b_up_prep(struct brcms_hardware *wlc_hw)
         */
        if (brcms_b_radio_read_hwdisabled(wlc_hw)) {
                /* put SB PCI in down state again */
-               ai_pci_down(wlc_hw->sih);
+               bcma_core_pci_down(wlc_hw->d11core->bus);
                brcms_b_xtal(wlc_hw, OFF);
                return -ENOMEDIUM;
        }
 
-       ai_pci_up(wlc_hw->sih);
+       bcma_core_pci_up(wlc_hw->d11core->bus);
 
        /* reset the d11 core */
        brcms_b_corereset(wlc_hw, BRCMS_USE_COREFLAGS);
@@ -5214,7 +5214,7 @@ static int brcms_b_down_finish(struct brcms_hardware *wlc_hw)
 
                /* turn off primary xtal and pll */
                if (!wlc_hw->noreset) {
-                       ai_pci_down(wlc_hw->sih);
+                       bcma_core_pci_down(wlc_hw->d11core->bus);
                        brcms_b_xtal(wlc_hw, OFF);
                }
        }