Skip to content

Commit

Permalink
staging: brcm80211: moved sbdma.h into brcmsmac/bcmdma.h
Browse files Browse the repository at this point in the history
Code cleanup. Removed fullmac dependencies on this file.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Jun 7, 2011
1 parent 745c9e6 commit d33fcc3
Show file tree
Hide file tree
Showing 21 changed files with 48 additions and 121 deletions.
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ typedef struct {

#endif /* DHD_DEBUG */
#include <chipcommon.h>
#include <sbdma.h>

#include <sdio.h>
#include <sbsdio.h>
Expand Down
57 changes: 1 addition & 56 deletions drivers/staging/brcm80211/brcmfmac/sbsdpcmdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,55 +24,6 @@
#define PAD _XSTR(__LINE__)
#endif /* PAD */

/* dma registers per channel(xmt or rcv) */
typedef volatile struct {
u32 control; /* enable, et al */
u32 addr; /* descriptor ring base address (4K aligned) */
u32 ptr; /* last descriptor posted to chip */
u32 status; /* current active descriptor, et al */
} dma32regs_t;

typedef volatile struct {
dma32regs_t xmt; /* dma tx channel */
dma32regs_t rcv; /* dma rx channel */
} dma32regp_t;

typedef volatile struct {
dma64regs_t xmt; /* dma tx */
u32 PAD[2];
dma64regs_t rcv; /* dma rx */
u32 PAD[2];
} dma64p_t;


typedef volatile struct { /* diag access */
u32 fifoaddr; /* diag address */
u32 fifodatalow; /* low 32bits of data */
u32 fifodatahigh; /* high 32bits of data */
u32 pad; /* reserved */
} dma64diag_t;

/* dma64 sdiod corerev >= 1 */
typedef volatile struct {
dma64p_t dma64regs[2];
dma64diag_t dmafifo; /* DMA Diagnostic Regs, 0x280-0x28c */
u32 PAD[92];
} sdiodma64_t;

/* dma32 sdiod corerev == 0 */
typedef volatile struct {
dma32regp_t dma32regs[2]; /* dma tx & rx, 0x200-0x23c */
dma32diag_t dmafifo; /* DMA Diagnostic Regs, 0x240-0x24c */
u32 PAD[108];
} sdiodma32_t;

/* dma32 regs for pcmcia core */
typedef volatile struct {
dma32regp_t dmaregs; /* DMA Regs, 0x200-0x21c, rev8 */
dma32diag_t dmafifo; /* DMA Diagnostic Regs, 0x220-0x22c */
u32 PAD[116];
} pcmdma32_t;

/* core registers */
typedef volatile struct {
u32 corecontrol; /* CoreControl, 0x000, rev8 */
Expand Down Expand Up @@ -133,13 +84,7 @@ typedef volatile struct {
u32 PAD[40];
u32 clockctlstatus; /* ClockCtlStatus, 0x1e0, rev8 */
u32 PAD[7];

/* DMA engines */
volatile union {
pcmdma32_t pcm32;
sdiodma32_t sdiod32;
sdiodma64_t sdiod64;
} dma;
u32 PAD[128]; /* DMA engines */

/* SDIO/PCMCIA CIS region */
char cis[512]; /* 512 byte CIS, 0x400-0x5ff, rev6 */
Expand Down
29 changes: 29 additions & 0 deletions drivers/staging/brcm80211/brcmsmac/bcmdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,40 @@
#ifndef _bcmdma_h_
#define _bcmdma_h_

#include "wlc_types.h" /* forward structure declarations */

#ifndef _dma_pub_
#define _dma_pub_
struct dma_pub;
#endif /* _dma_pub_ */

/* DMA structure:
* support two DMA engines: 32 bits address or 64 bit addressing
* basic DMA register set is per channel(transmit or receive)
* a pair of channels is defined for convenience
*/

/* 32 bits addressing */

typedef volatile struct { /* diag access */
u32 fifoaddr; /* diag address */
u32 fifodatalow; /* low 32bits of data */
u32 fifodatahigh; /* high 32bits of data */
u32 pad; /* reserved */
} dma32diag_t;

/* 64 bits addressing */

/* dma registers per channel(xmt or rcv) */
typedef volatile struct {
u32 control; /* enable, et al */
u32 ptr; /* last descriptor posted to chip */
u32 addrlow; /* descriptor ring base address low 32-bits (8K aligned) */
u32 addrhigh; /* descriptor ring base address bits 63:32 (8K aligned) */
u32 status0; /* current descriptor, xmt state */
u32 status1; /* active descriptor, xmt error */
} dma64regs_t;

/* map/unmap direction */
#define DMA_TX 1 /* TX direction for DMA */
#define DMA_RX 2 /* RX direction for DMA */
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <aiutils.h>

#include "wlc_types.h"
#include <sbdma.h>
#include "bcmdma.h"
#include <bcmdma.h>

#if defined(__mips__)
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <bcmnvram.h>
#include <chipcommon.h>
#include <bcmdevs.h>
#include <sbdma.h>
#include "bcmdma.h"

#include <wlc_types.h>
#include <wlc_phy_int.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <bcmnvram.h>

#include <bcmdevs.h>
#include <sbdma.h>
#include "bcmdma.h"

#include "wlc_phy_radio.h"
#include "wlc_phy_int.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <wlc_pmu.h>

#include <bcmdevs.h>
#include <sbdma.h>
#include "bcmdma.h"

#include <wlc_types.h>
#include <wlc_phy_radio.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/phy/wlc_phytbl_lcn.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

#include <linux/types.h>
#include <sbdma.h>
#include "bcmdma.h"
#include <wlc_phy_int.h>
#include <wlc_phytbl_lcn.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/phy/wlc_phytbl_n.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <linux/kernel.h>

#include <sbdma.h>
#include "bcmdma.h"
#include <wlc_phy_int.h>
#include <wlc_phytbl_n.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <bcmutils.h>
#include <bcmnvram.h>
#include <nicpci.h>
#include <sbdma.h>
#include "bcmdma.h"

#include "phy/wlc_phy_int.h"
#include "d11.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <bcmdefs.h>
#include <bcmutils.h>
#include <aiutils.h>
#include <sbdma.h>
#include "bcmdma.h"

#include "d11.h"
#include "wlc_types.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <bcmdefs.h>
#include <bcmutils.h>
#include <aiutils.h>
#include <sbdma.h>
#include "bcmdma.h"
#include <bcmdma.h>
#include <d11.h>

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_antsel.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <bcmnvram.h>
#include <aiutils.h>
#include <bcmdevs.h>
#include <sbdma.h>
#include "bcmdma.h"

#include "d11.h"
#include "wlc_rate.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <bcmnvram.h>
#include <chipcommon.h>
#include <nicpci.h>
#include <sbdma.h>
#include <bcmdma.h>

#include "wlc_types.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <bcmutils.h>
#include <bcmnvram.h>
#include <aiutils.h>
#include <sbdma.h>
#include "bcmdma.h"

#include "wlc_types.h"
#include "d11.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <bcmnvram.h>
#include <aiutils.h>
#include <bcmsrom.h>
#include <sbdma.h>
#include "bcmdma.h"
#include <bcmdma.h>

#include "wlc_pmu.h"
Expand Down
3 changes: 1 addition & 2 deletions drivers/staging/brcm80211/brcmsmac/wlc_phy_shim.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
#include <bcmwifi.h>
#include <aiutils.h>
#include <chipcommon.h>
#include <sbdma.h>
#include <bcmdma.h>
#include "bcmdma.h"
#include <wlc_pmu.h>

#include "wlc_types.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_rate.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <bcmdefs.h>
#include <bcmutils.h>
#include <aiutils.h>
#include <sbdma.h>
#include "bcmdma.h"

#include "wlc_types.h"
#include "d11.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmsmac/wlc_stf.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <aiutils.h>
#include <bcmwifi.h>
#include <bcmnvram.h>
#include <sbdma.h>
#include "bcmdma.h"

#include "wlc_types.h"
#include "d11.h"
Expand Down
3 changes: 3 additions & 0 deletions drivers/staging/brcm80211/brcmsmac/wlc_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#define MAX_DMA_SEGS 4

/* forward declarations */
struct sk_buff;
struct wl_info;
struct wlc_info;
struct wlc_hw_info;
Expand All @@ -45,5 +46,7 @@ struct bmac_pmq;
struct d11init;
struct dma_pub;
struct wlc_bsscfg;
struct bcmstrbuf;
struct si_pub;

#endif /* _wlc_types_h_ */
47 changes: 0 additions & 47 deletions drivers/staging/brcm80211/include/sbdma.h

This file was deleted.

0 comments on commit d33fcc3

Please sign in to comment.