From: "Roland Vossen" <rvossen@broadcom.com>
To: gregkh@suse.de
Cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org
Subject: [PATCH 40/83] staging: brcm80211: remove unused functions from nicpci.c
Date: Wed, 1 Jun 2011 13:45:25 +0200 [thread overview]
Message-ID: <1306928768-7501-40-git-send-email-rvossen@broadcom.com> (raw)
In-Reply-To: <1306928768-7501-1-git-send-email-rvossen@broadcom.com>
From: Arend van Spriel <arend@broadcom.com>
Several functions are defined but not used. These have been removed.
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
---
drivers/staging/brcm80211/brcmsmac/nicpci.c | 182 ---------------------------
drivers/staging/brcm80211/brcmsmac/nicpci.h | 19 +---
2 files changed, 2 insertions(+), 199 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmsmac/nicpci.c b/drivers/staging/brcm80211/brcmsmac/nicpci.c
index 4da155a..196cdf1 100644
--- a/drivers/staging/brcm80211/brcmsmac/nicpci.c
+++ b/drivers/staging/brcm80211/brcmsmac/nicpci.c
@@ -71,8 +71,6 @@ static void pcie_war_noplldown(pcicore_info_t *pi);
static void pcie_war_polarity(pcicore_info_t *pi);
static void pcie_war_pci_setup(pcicore_info_t *pi);
-static bool pcicore_pmecap(pcicore_info_t *pi);
-
#define PCIE_ASPM(sih) ((PCIE_PUB(sih)) && (((sih)->buscorerev >= 3) && ((sih)->buscorerev <= 5)))
@@ -579,23 +577,6 @@ static void pcie_war_pci_setup(pcicore_info_t *pi)
pcie_misc_config_fixup(pi);
}
-void pcie_war_ovr_aspm_update(void *pch, u8 aspm)
-{
- pcicore_info_t *pi = (pcicore_info_t *) pch;
-
- if (!PCIE_ASPM(pi->sih))
- return;
-
- /* Validate */
- if (aspm > PCIE_ASPM_ENAB)
- return;
-
- pi->pcie_war_aspm_ovr = aspm;
-
- /* Update the current state */
- pcie_war_aspm_clkreq(pi);
-}
-
/* ***** Functions called during driver state changes ***** */
void pcicore_attach(void *pch, char *pvars, int state)
{
@@ -673,166 +654,3 @@ void pcicore_down(void *pch, int state)
/* Reduce L1 timer for better power savings */
pcie_extendL1timer(pi, false);
}
-
-/* ***** Wake-on-wireless-LAN (WOWL) support functions ***** */
-/* Just uses PCI config accesses to find out, when needed before sb_attach is done */
-bool pcicore_pmecap_fast(void *pch)
-{
- pcicore_info_t *pi = (pcicore_info_t *) pch;
- u8 cap_ptr;
- u32 pmecap;
-
- cap_ptr = pcicore_find_pci_capability(pi->dev, PCI_CAP_ID_PM, NULL,
- NULL);
-
- if (!cap_ptr)
- return false;
-
- pci_read_config_dword(pi->dev, cap_ptr, &pmecap);
-
- return (pmecap & (PCI_PM_CAP_PME_MASK << 16)) != 0;
-}
-
-/* return true if PM capability exists in the pci config space
- * Uses and caches the information using core handle
- */
-static bool pcicore_pmecap(pcicore_info_t *pi)
-{
- u8 cap_ptr;
- u32 pmecap;
-
- if (!pi->pmecap_offset) {
- cap_ptr = pcicore_find_pci_capability(pi->dev,
- PCI_CAP_ID_PM,
- NULL, NULL);
- if (!cap_ptr)
- return false;
-
- pi->pmecap_offset = cap_ptr;
-
- pci_read_config_dword(pi->dev, pi->pmecap_offset,
- &pmecap);
-
- /* At least one state can generate PME */
- pi->pmecap = (pmecap & (PCI_PM_CAP_PME_MASK << 16)) != 0;
- }
-
- return pi->pmecap;
-}
-
-/* Enable PME generation */
-void pcicore_pmeen(void *pch)
-{
- pcicore_info_t *pi = (pcicore_info_t *) pch;
- u32 w;
-
- /* if not pmecapable return */
- if (!pcicore_pmecap(pi))
- return;
-
- pci_read_config_dword(pi->dev, pi->pmecap_offset + PCI_PM_CTRL,
- &w);
- w |= (PCI_PM_CTRL_PME_ENABLE);
- pci_write_config_dword(pi->dev,
- pi->pmecap_offset + PCI_PM_CTRL, w);
-}
-
-/*
- * Return true if PME status set
- */
-bool pcicore_pmestat(void *pch)
-{
- pcicore_info_t *pi = (pcicore_info_t *) pch;
- u32 w;
-
- if (!pcicore_pmecap(pi))
- return false;
-
- pci_read_config_dword(pi->dev, pi->pmecap_offset + PCI_PM_CTRL,
- &w);
-
- return (w & PCI_PM_CTRL_PME_STATUS) == PCI_PM_CTRL_PME_STATUS;
-}
-
-/* Disable PME generation, clear the PME status bit if set
- */
-void pcicore_pmeclr(void *pch)
-{
- pcicore_info_t *pi = (pcicore_info_t *) pch;
- u32 w;
-
- if (!pcicore_pmecap(pi))
- return;
-
- pci_read_config_dword(pi->dev, pi->pmecap_offset + PCI_PM_CTRL,
- &w);
-
- PCI_ERROR(("pcicore_pci_pmeclr PMECSR : 0x%x\n", w));
-
- /* PMESTAT is cleared by writing 1 to it */
- w &= ~(PCI_PM_CTRL_PME_ENABLE);
-
- pci_write_config_dword(pi->dev,
- pi->pmecap_offset + PCI_PM_CTRL, w);
-}
-
-u32 pcie_lcreg(void *pch, u32 mask, u32 val)
-{
- pcicore_info_t *pi = (pcicore_info_t *) pch;
- u8 offset;
- u32 tmpval;
-
- offset = pi->pciecap_lcreg_offset;
- if (!offset)
- return 0;
-
- /* set operation */
- if (mask)
- pci_write_config_dword(pi->dev, offset, val);
-
- pci_read_config_dword(pi->dev, offset, &tmpval);
- return tmpval;
-}
-
-u32
-pcicore_pciereg(void *pch, u32 offset, u32 mask, u32 val, uint type)
-{
- u32 reg_val = 0;
- pcicore_info_t *pi = (pcicore_info_t *) pch;
- sbpcieregs_t *pcieregs = pi->regs.pcieregs;
-
- if (mask) {
- PCI_ERROR(("PCIEREG: 0x%x writeval 0x%x\n", offset, val));
- pcie_writereg(pcieregs, type, offset, val);
- }
-
- /* Should not read register 0x154 */
- if (pi->sih->buscorerev <= 5 && offset == PCIE_DLLP_PCIE11
- && type == PCIE_PCIEREGS)
- return reg_val;
-
- reg_val = pcie_readreg(pcieregs, type, offset);
- PCI_ERROR(("PCIEREG: 0x%x readval is 0x%x\n", offset, reg_val));
-
- return reg_val;
-}
-
-u32
-pcicore_pcieserdesreg(void *pch, u32 mdioslave, u32 offset, u32 mask,
- u32 val)
-{
- u32 reg_val = 0;
- pcicore_info_t *pi = (pcicore_info_t *) pch;
-
- if (mask) {
- PCI_ERROR(("PCIEMDIOREG: 0x%x writeval 0x%x\n", offset, val));
- pcie_mdiowrite(pi, mdioslave, offset, val);
- }
-
- if (pcie_mdioread(pi, mdioslave, offset, ®_val))
- reg_val = 0xFFFFFFFF;
- PCI_ERROR(("PCIEMDIOREG: dev 0x%x offset 0x%x read 0x%x\n", mdioslave,
- offset, reg_val));
-
- return reg_val;
-}
diff --git a/drivers/staging/brcm80211/brcmsmac/nicpci.h b/drivers/staging/brcm80211/brcmsmac/nicpci.h
index a6baf7f..b32f1af 100644
--- a/drivers/staging/brcm80211/brcmsmac/nicpci.h
+++ b/drivers/staging/brcm80211/brcmsmac/nicpci.h
@@ -58,11 +58,6 @@
struct si_pub;
-extern u8 pcicore_find_pci_capability(void *dev, u8 req_cap_id,
- unsigned char *buf, u32 *buflen);
-
-extern u32 pcie_lcreg(void *pch, u32 mask, u32 val);
-
extern void *pcicore_init(struct si_pub *sih, void *pdev, void *regs);
extern void pcicore_deinit(void *pch);
extern void pcicore_attach(void *pch, char *pvars, int state);
@@ -70,17 +65,7 @@ extern void pcicore_hwup(void *pch);
extern void pcicore_up(void *pch, int state);
extern void pcicore_sleep(void *pch);
extern void pcicore_down(void *pch, int state);
-
-extern void pcie_war_ovr_aspm_update(void *pch, u8 aspm);
-extern u32 pcicore_pcieserdesreg(void *pch, u32 mdioslave, u32 offset,
- u32 mask, u32 val);
-
-extern u32 pcicore_pciereg(void *pch, u32 offset, u32 mask,
- u32 val, uint type);
-
-extern bool pcicore_pmecap_fast(void *pch);
-extern void pcicore_pmeen(void *pch);
-extern void pcicore_pmeclr(void *pch);
-extern bool pcicore_pmestat(void *pch);
+extern u8 pcicore_find_pci_capability(void *dev, u8 req_cap_id,
+ unsigned char *buf, u32 *buflen);
#endif /* _NICPCI_H */
--
1.7.4.1
next prev parent reply other threads:[~2011-06-01 11:46 UTC|newest]
Thread overview: 115+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 11:44 [PATCH 01/83] staging: brcm80211: removed unused Broadcom specific ioctls codes Roland Vossen
2011-06-01 11:44 ` [PATCH 02/83] staging: brcm80211: removed iovar layer from softmac Roland Vossen
2011-06-01 11:44 ` [PATCH 03/83] staging: brcm80211: cleanup struct wl_info Roland Vossen
2011-06-01 11:44 ` [PATCH 04/83] staging: brcm80211: removed unused timeout fields in wlc_protection Roland Vossen
2011-06-01 11:44 ` [PATCH 05/83] staging: brcm80211: remove WLC_WATCHDOG_TBTT macro Roland Vossen
2011-06-01 11:44 ` [PATCH 06/83] staging: brcm80211: cleanup struct wlc_info definition Roland Vossen
2011-06-01 11:44 ` [PATCH 07/83] staging: brcm80211: fix compiler warning introduced Roland Vossen
2011-06-01 11:44 ` [PATCH 08/83] staging: brcm80211: replaced #ifdef __mips__ sections by W_REG_FLUSH Roland Vossen
2011-06-01 12:27 ` Jonas Gorski
2011-06-01 17:17 ` Roland Vossen
2011-06-01 11:44 ` [PATCH 09/83] staging: brcm80211: emptied wlioctl.h Roland Vossen
2011-06-01 11:44 ` [PATCH 10/83] staging: brcm80211: removed wlioctl.h and dhdioctl.h Roland Vossen
2011-06-01 11:44 ` [PATCH 11/83] staging: brcm80211: updated MAINTAINERS, README and TODO files Roland Vossen
2011-06-01 11:44 ` [PATCH 12/83] staging: brcm80211: remove iovars IOV_BLOCKMODE Roland Vossen
2011-06-01 11:44 ` [PATCH 13/83] staging: brcm80211: remove iovars IOV_DMA Roland Vossen
2011-06-01 11:44 ` [PATCH 14/83] staging: brcm80211: remove iovars IOV_NUMLOCALINTS Roland Vossen
2011-06-01 11:45 ` [PATCH 15/83] staging: brcm80211: remove iovars IOV_HOSTREG Roland Vossen
2011-06-01 11:45 ` [PATCH 16/83] staging: brcm80211: remove iovars IOV_DIVISOR Roland Vossen
2011-06-01 11:45 ` [PATCH 17/83] staging: brcm80211: remove iovars IOV_POWER Roland Vossen
2011-06-01 11:45 ` [PATCH 18/83] staging: brcm80211: remove iovars IOV_CLOCK Roland Vossen
2011-06-01 11:45 ` [PATCH 19/83] staging: brcm80211: remove iovars IOV_SDMODE Roland Vossen
2011-06-01 11:45 ` [PATCH 20/83] staging: brcm80211: remove iovars IOV_HISPEED Roland Vossen
2011-06-01 11:45 ` [PATCH 21/83] staging: brcm80211: added support for more bcm43224 based boards Roland Vossen
2011-06-01 11:45 ` [PATCH 22/83] staging: brcm80211: removed 'hnd' from filenames Roland Vossen
2011-06-01 11:45 ` [PATCH 23/83] staging: brcm80211: removed 'hnd' from everything but function names Roland Vossen
2011-06-01 11:45 ` [PATCH 24/83] staging: brcm80211: merged two header files into dhd_sdio.c Roland Vossen
2011-06-01 11:45 ` [PATCH 25/83] staging: brcm80211: removed unused stuff from proto/802.11.h Roland Vossen
2011-06-01 11:45 ` [PATCH 26/83] staging: brcm80211: emptied include/802.11.h Roland Vossen
2011-06-01 11:45 ` [PATCH 27/83] staging: brcm80211: removed 802.11.h Roland Vossen
2011-06-01 11:45 ` [PATCH 28/83] staging: brcm80211: cleaned bcmeth.h and bcmevent.h Roland Vossen
2011-06-01 11:45 ` [PATCH 29/83] staging: brcm80211: removed include/proto dir Roland Vossen
2011-06-01 11:45 ` [PATCH 30/83] staging: brcm80211: remove SDIO related definitions from nicpci.h Roland Vossen
2011-06-01 11:45 ` [PATCH 31/83] staging: brcm80211: remove usage of bcmsrom_tbl.h Roland Vossen
2011-06-01 11:45 ` [PATCH 32/83] staging: brcm80211: remove extern variable definitions in bcmsrom.c Roland Vossen
2011-06-01 11:45 ` [PATCH 33/83] staging: brcm80211: remove inclusion of bcmsrom_fmt.h Roland Vossen
2011-06-01 11:45 ` [PATCH 34/83] staging: brcm80211: cleaned sb* header files Roland Vossen
2011-06-01 11:45 ` [PATCH 35/83] staging: brcm80211: moved header files to more specific directory Roland Vossen
2011-06-02 0:08 ` Julian Calaby
2011-06-02 8:32 ` Arend van Spriel
2011-06-02 10:42 ` Julian Calaby
2011-06-01 11:45 ` [PATCH 36/83] staging: brcm80211: cleaned bcmdefs.h Roland Vossen
2011-06-01 11:45 ` [PATCH 37/83] staging: brcm80211: remove usage of pcicfg.h from brcmsmac driver Roland Vossen
2011-06-01 11:45 ` [PATCH 38/83] staging: brcm80211: move PCI related header files to appropriate driver folder Roland Vossen
2011-06-01 23:44 ` Julian Calaby
2011-06-01 11:45 ` [PATCH 39/83] staging: brcm80211: remove functions from nicpci.h Roland Vossen
2011-06-01 11:45 ` Roland Vossen [this message]
2011-06-01 11:45 ` [PATCH 41/83] staging: brcm80211: add braces to SI_INFO macro definition Roland Vossen
2011-06-01 11:45 ` [PATCH 42/83] staging: brcm80211: remove dependency on pci core difinitions from aiutils.c Roland Vossen
2011-06-01 23:18 ` Julian Calaby
2011-06-02 8:38 ` Arend van Spriel
2011-06-01 11:45 ` [PATCH 43/83] staging: brcm80211: remove pci core defintion files Roland Vossen
2011-06-01 11:45 ` [PATCH 44/83] staging: brcm80211: replaced typedef si_t with struct si_pub Roland Vossen
2011-06-01 23:58 ` Julian Calaby
2011-06-03 16:37 ` Roland Vossen
2011-06-04 0:51 ` Julian Calaby
2011-06-05 8:36 ` Roland Vossen
2011-06-05 9:20 ` Julian Calaby
2011-06-05 19:23 ` julie Sullivan
2011-06-06 1:34 ` Henry Ptasinski
2011-06-06 9:10 ` Roland Vossen
2011-06-06 7:31 ` Roland Vossen
2011-06-06 12:14 ` Julian Calaby
2011-06-08 12:20 ` Roland Vossen
2011-06-01 11:45 ` [PATCH 45/83] staging: brcm80211: deleted sbconfig.h, renamed sbcc.h Roland Vossen
2011-06-01 11:45 ` [PATCH 46/83] staging: brcm80211: moved sbdma.h into brcmsmac/bcmdma.h Roland Vossen
2011-06-01 11:45 ` [PATCH 47/83] staging: brcm80211: macro cleanup Roland Vossen
2011-06-01 11:45 ` [PATCH 48/83] staging: brcm80211: remove phy_version.h Roland Vossen
2011-06-01 11:45 ` [PATCH 49/83] staging: brcm80211: remove BCMEMBEDIMAGE related codes from fullmac Roland Vossen
2011-06-01 11:45 ` [PATCH 50/83] staging: brcm80211: absorb bcmcdc.h into dhd_cdc.c Roland Vossen
2011-06-01 23:37 ` Julian Calaby
2011-06-03 17:50 ` Franky Lin
2011-06-01 11:45 ` [PATCH 51/83] staging: brcm80211: clean up dhd.h in fullmac Roland Vossen
2011-06-01 11:45 ` [PATCH 52/83] staging: brcm80211: absorb bcmsdpcm.h " Roland Vossen
2011-06-01 11:45 ` [PATCH 53/83] staging: brcm80211: absorb msgtrace.h " Roland Vossen
2011-06-01 11:45 ` [PATCH 54/83] staging: brcm80211: combine sbsdpcmdev.h and sbsdio.h Roland Vossen
2011-06-01 23:22 ` Julian Calaby
2011-06-01 11:45 ` [PATCH 55/83] staging: brmc80211: remove sdio.h from fullmac Roland Vossen
2011-06-01 11:45 ` [PATCH 56/83] staging: brcm80211: remove sdioh.h " Roland Vossen
2011-06-01 11:45 ` [PATCH 57/83] staging: brcm80211: clean up wl_cfg80211.h in fullmac Roland Vossen
2011-06-01 11:45 ` [PATCH 58/83] staging: brcm80211: clean up wl_iw.h " Roland Vossen
2011-06-01 11:45 ` [PATCH 59/83] staging: brcm80211: removed wl_ (vendor specific acronym) Roland Vossen
2011-06-01 11:45 ` [PATCH 60/83] staging: brcm80211: renamed files to get rid of wl_ file name prefix Roland Vossen
2011-06-01 11:45 ` [PATCH 61/83] staging: brcm80211: removed wl_dbg.h Roland Vossen
2011-06-01 11:45 ` [PATCH 62/83] staging: brcm80211: removed wl_export.h Roland Vossen
2011-06-01 11:45 ` [PATCH 63/83] staging: brcm80211: removed unused code from bcmotp.c Roland Vossen
2011-06-01 11:45 ` [PATCH 64/83] staging: brcm80211: removed Broadcom specific acronym 'hnd' Roland Vossen
2011-06-01 11:45 ` [PATCH 65/83] staging: brcm80211: removed lmac remnants Roland Vossen
2011-06-01 11:45 ` [PATCH 66/83] staging: brcm80211: cleaned up prefix for utility functions Roland Vossen
2011-06-01 11:45 ` [PATCH 67/83] staging: brcm80211: renamed utility module related files Roland Vossen
2011-06-01 11:45 ` [PATCH 68/83] staging: brcm80211: remove nvram related source files Roland Vossen
2011-06-01 11:45 ` [PATCH 69/83] staging: brcm80211: removed OSL_WRITE_REG and OSL_READ_REG macros Roland Vossen
2011-06-01 11:45 ` [PATCH 70/83] staging: brcm80211: moved register read/write macro's Roland Vossen
2011-06-01 11:45 ` [PATCH 71/83] staging: brcm80211: further simplified register access macro's Roland Vossen
2011-06-02 2:45 ` Julian Calaby
2011-06-03 16:39 ` Roland Vossen
2011-06-01 11:45 ` [PATCH 72/83] staging: brcm80211: cleanup after R_REG/W_REG patches Roland Vossen
2011-06-01 11:45 ` [PATCH 73/83] staging: brcm80211: prepared header files for file rename Roland Vossen
2011-06-01 11:45 ` [PATCH 74/83] staging: brcm80211: renamed files in brcmsmac and include directories Roland Vossen
2011-06-01 11:46 ` [PATCH 75/83] staging: brcm80211: deleted header file include/aidmp.h Roland Vossen
2011-06-01 11:46 ` [PATCH 76/83] staging: brcm80211: cleaned include/brcm_hw_ids.h Roland Vossen
2011-06-01 11:46 ` [PATCH 77/83] staging: brcm80211: moved /include/sdio_host.h to /brcmfmac dir Roland Vossen
2011-06-01 11:46 ` [PATCH 78/83] staging: brcm80211: removed unused definitions from include/soc.h Roland Vossen
2011-06-01 11:46 ` [PATCH 79/83] staging: brcm80211: moved /include/srom.h into /brcmsmac dir Roland Vossen
2011-06-01 11:46 ` [PATCH 80/83] staging: brcm80211: deleted brcmsmac/cfg.h and brcmsmac/bsscfg.h Roland Vossen
2011-06-01 11:46 ` [PATCH 81/83] staging: brcm80211: removed keys.h Roland Vossen
2011-06-01 11:46 ` [PATCH 82/83] staging: brcm80211: renamed file Roland Vossen
2011-06-01 11:46 ` [PATCH 83/83] staging: brcm80211: updated TODO with current state of affairs Roland Vossen
2011-06-01 11:59 ` [PATCH 01/83] staging: brcm80211: removed unused Broadcom specific ioctls codes Rafał Miłecki
2011-06-01 16:23 ` Henry Ptasinski
2011-06-01 16:28 ` Rafał Miłecki
2011-06-02 3:06 ` Julian Calaby
2011-06-03 16:58 ` Roland Vossen
2011-06-04 0:54 ` Julian Calaby
2011-06-03 17:04 ` Henry Ptasinski
2011-06-04 1:00 ` Julian Calaby
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1306928768-7501-40-git-send-email-rvossen@broadcom.com \
--to=rvossen@broadcom.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@suse.de \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).