diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-08-23 18:32:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-26 14:09:03 -0400 |
commit | aa51e598d04c6acf5477934cd6383f5a17ce9029 (patch) | |
tree | 50499782c11162826cb498d2761148fe3a4b4791 | |
parent | cfe51ec1ae427ec0be5a7670eae815ce5eb30e1c (diff) |
brcmsmac: use bcma PCIe up and down functions
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>
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/aiutils.c | 21 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/aiutils.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/main.c | 8 |
3 files changed, 4 insertions, 28 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c index e4fd1ee3d690..53365977bfd6 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c | |||
@@ -679,27 +679,6 @@ bool ai_clkctl_cc(struct si_pub *sih, enum bcma_clkmode mode) | |||
679 | return mode == BCMA_CLKMODE_FAST; | 679 | return mode == BCMA_CLKMODE_FAST; |
680 | } | 680 | } |
681 | 681 | ||
682 | void ai_pci_up(struct si_pub *sih) | ||
683 | { | ||
684 | struct si_info *sii; | ||
685 | |||
686 | sii = container_of(sih, struct si_info, pub); | ||
687 | |||
688 | if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI) | ||
689 | bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci[0], true); | ||
690 | } | ||
691 | |||
692 | /* Unconfigure and/or apply various WARs when going down */ | ||
693 | void ai_pci_down(struct si_pub *sih) | ||
694 | { | ||
695 | struct si_info *sii; | ||
696 | |||
697 | sii = container_of(sih, struct si_info, pub); | ||
698 | |||
699 | if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI) | ||
700 | bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci[0], false); | ||
701 | } | ||
702 | |||
703 | /* Enable BT-COEX & Ex-PA for 4313 */ | 682 | /* Enable BT-COEX & Ex-PA for 4313 */ |
704 | void ai_epa_4313war(struct si_pub *sih) | 683 | void ai_epa_4313war(struct si_pub *sih) |
705 | { | 684 | { |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h index 89562c1fbf49..a8a267b5b87a 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h +++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h | |||
@@ -183,9 +183,6 @@ extern u16 ai_clkctl_fast_pwrup_delay(struct si_pub *sih); | |||
183 | extern bool ai_clkctl_cc(struct si_pub *sih, enum bcma_clkmode mode); | 183 | extern bool ai_clkctl_cc(struct si_pub *sih, enum bcma_clkmode mode); |
184 | extern bool ai_deviceremoved(struct si_pub *sih); | 184 | extern bool ai_deviceremoved(struct si_pub *sih); |
185 | 185 | ||
186 | extern void ai_pci_down(struct si_pub *sih); | ||
187 | extern void ai_pci_up(struct si_pub *sih); | ||
188 | |||
189 | /* Enable Ex-PA for 4313 */ | 186 | /* Enable Ex-PA for 4313 */ |
190 | extern void ai_epa_4313war(struct si_pub *sih); | 187 | extern void ai_epa_4313war(struct si_pub *sih); |
191 | 188 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index c3c6123dc7dd..4608e0eb1493 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -4669,7 +4669,7 @@ static int brcms_b_attach(struct brcms_c_info *wlc, struct bcma_device *core, | |||
4669 | brcms_c_coredisable(wlc_hw); | 4669 | brcms_c_coredisable(wlc_hw); |
4670 | 4670 | ||
4671 | /* Match driver "down" state */ | 4671 | /* Match driver "down" state */ |
4672 | ai_pci_down(wlc_hw->sih); | 4672 | bcma_core_pci_down(wlc_hw->d11core->bus); |
4673 | 4673 | ||
4674 | /* turn off pll and xtal to match driver "down" state */ | 4674 | /* turn off pll and xtal to match driver "down" state */ |
4675 | brcms_b_xtal(wlc_hw, OFF); | 4675 | brcms_b_xtal(wlc_hw, OFF); |
@@ -5012,12 +5012,12 @@ static int brcms_b_up_prep(struct brcms_hardware *wlc_hw) | |||
5012 | */ | 5012 | */ |
5013 | if (brcms_b_radio_read_hwdisabled(wlc_hw)) { | 5013 | if (brcms_b_radio_read_hwdisabled(wlc_hw)) { |
5014 | /* put SB PCI in down state again */ | 5014 | /* put SB PCI in down state again */ |
5015 | ai_pci_down(wlc_hw->sih); | 5015 | bcma_core_pci_down(wlc_hw->d11core->bus); |
5016 | brcms_b_xtal(wlc_hw, OFF); | 5016 | brcms_b_xtal(wlc_hw, OFF); |
5017 | return -ENOMEDIUM; | 5017 | return -ENOMEDIUM; |
5018 | } | 5018 | } |
5019 | 5019 | ||
5020 | ai_pci_up(wlc_hw->sih); | 5020 | bcma_core_pci_up(wlc_hw->d11core->bus); |
5021 | 5021 | ||
5022 | /* reset the d11 core */ | 5022 | /* reset the d11 core */ |
5023 | brcms_b_corereset(wlc_hw, BRCMS_USE_COREFLAGS); | 5023 | brcms_b_corereset(wlc_hw, BRCMS_USE_COREFLAGS); |
@@ -5214,7 +5214,7 @@ static int brcms_b_down_finish(struct brcms_hardware *wlc_hw) | |||
5214 | 5214 | ||
5215 | /* turn off primary xtal and pll */ | 5215 | /* turn off primary xtal and pll */ |
5216 | if (!wlc_hw->noreset) { | 5216 | if (!wlc_hw->noreset) { |
5217 | ai_pci_down(wlc_hw->sih); | 5217 | bcma_core_pci_down(wlc_hw->d11core->bus); |
5218 | brcms_b_xtal(wlc_hw, OFF); | 5218 | brcms_b_xtal(wlc_hw, OFF); |
5219 | } | 5219 | } |
5220 | } | 5220 | } |