Skip to content

Commit

Permalink
staging: brcm80211: replaced prefix of SDIO related functions
Browse files Browse the repository at this point in the history
Code cleanup. Prefixed functions with brcmf_ for unique namespace. In addition
to that, prefix has been changed to categorize functions depending on their
place in the drivers SDIO stack.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent 7faf8c5 commit 54ca296
Show file tree
Hide file tree
Showing 13 changed files with 855 additions and 808 deletions.
48 changes: 25 additions & 23 deletions drivers/staging/brcm80211/brcmfmac/bcmsdbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,68 +48,70 @@ typedef void (*sdioh_cb_fn_t) (void *);
* The handler shall be provided by all subsequent calls. No local cache
* cfghdl points to the starting address of pci device mapped memory
*/
extern sdioh_info_t *sdioh_attach(void *cfghdl, uint irq);
extern SDIOH_API_RC sdioh_detach(sdioh_info_t *si);
extern SDIOH_API_RC sdioh_interrupt_register(sdioh_info_t *si,
extern sdioh_info_t *brcmf_sdioh_attach(void *cfghdl, uint irq);
extern SDIOH_API_RC brcmf_sdioh_detach(sdioh_info_t *si);
extern SDIOH_API_RC brcmf_sdioh_interrupt_register(sdioh_info_t *si,
sdioh_cb_fn_t fn, void *argh);
extern SDIOH_API_RC sdioh_interrupt_deregister(sdioh_info_t *si);
extern SDIOH_API_RC brcmf_sdioh_interrupt_deregister(sdioh_info_t *si);

/* query whether SD interrupt is enabled or not */
extern SDIOH_API_RC sdioh_interrupt_query(sdioh_info_t *si, bool *onoff);
extern SDIOH_API_RC brcmf_sdioh_interrupt_query(sdioh_info_t *si, bool *onoff);

/* enable or disable SD interrupt */
extern SDIOH_API_RC sdioh_interrupt_set(sdioh_info_t *si, bool enable_disable);
extern SDIOH_API_RC
brcmf_sdioh_interrupt_set(sdioh_info_t *si, bool enable_disable);

#if defined(DHD_DEBUG)
extern bool sdioh_interrupt_pending(sdioh_info_t *si);
extern bool brcmf_sdioh_interrupt_pending(sdioh_info_t *si);
#endif

extern int sdioh_claim_host_and_lock(sdioh_info_t *si);
extern int sdioh_release_host_and_unlock(sdioh_info_t *si);
extern int brcmf_sdioh_claim_host_and_lock(sdioh_info_t *si);
extern int brcmf_sdioh_release_host_and_unlock(sdioh_info_t *si);

/* read or write one byte using cmd52 */
extern SDIOH_API_RC sdioh_request_byte(sdioh_info_t *si, uint rw, uint fnc,
uint addr, u8 *byte);
extern SDIOH_API_RC
brcmf_sdioh_request_byte(sdioh_info_t *si, uint rw, uint fnc, uint addr,
u8 *byte);

/* read or write 2/4 bytes using cmd53 */
extern SDIOH_API_RC sdioh_request_word(sdioh_info_t *si, uint cmd_type,
extern SDIOH_API_RC brcmf_sdioh_request_word(sdioh_info_t *si, uint cmd_type,
uint rw, uint fnc, uint addr,
u32 *word, uint nbyte);

/* read or write any buffer using cmd53 */
extern SDIOH_API_RC sdioh_request_buffer(sdioh_info_t *si, uint pio_dma,
extern SDIOH_API_RC brcmf_sdioh_request_buffer(sdioh_info_t *si, uint pio_dma,
uint fix_inc, uint rw, uint fnc_num,
u32 addr, uint regwidth,
u32 buflen, u8 *buffer,
struct sk_buff *pkt);

/* get cis data */
extern SDIOH_API_RC sdioh_cis_read(sdioh_info_t *si, uint fuc, u8 *cis,
extern SDIOH_API_RC brcmf_sdioh_cis_read(sdioh_info_t *si, uint fuc, u8 *cis,
u32 length);

extern SDIOH_API_RC sdioh_cfg_read(sdioh_info_t *si, uint fuc, u32 addr,
extern SDIOH_API_RC brcmf_sdioh_cfg_read(sdioh_info_t *si, uint fuc, u32 addr,
u8 *data);
extern SDIOH_API_RC sdioh_cfg_write(sdioh_info_t *si, uint fuc, u32 addr,
extern SDIOH_API_RC brcmf_sdioh_cfg_write(sdioh_info_t *si, uint fuc, u32 addr,
u8 *data);

/* query number of io functions */
extern uint sdioh_query_iofnum(sdioh_info_t *si);
extern uint brcmf_sdioh_query_iofnum(sdioh_info_t *si);

/* handle iovars */
extern int sdioh_iovar_op(sdioh_info_t *si, const char *name,
extern int brcmf_sdioh_iovar_op(sdioh_info_t *si, const char *name,
void *params, int plen, void *arg, int len, bool set);

/* Issue abort to the specified function and clear controller as needed */
extern int sdioh_abort(sdioh_info_t *si, uint fnc);
extern int brcmf_sdioh_abort(sdioh_info_t *si, uint fnc);

/* Start and Stop SDIO without re-enumerating the SD card. */
extern int sdioh_start(sdioh_info_t *si, int stage);
extern int sdioh_stop(sdioh_info_t *si);
extern int brcmf_sdioh_start(sdioh_info_t *si, int stage);
extern int brcmf_sdioh_stop(sdioh_info_t *si);

/* Reset and re-initialize the device */
extern int sdioh_sdio_reset(sdioh_info_t *si);
extern int brcmf_sdioh_reset(sdioh_info_t *si);

/* Helper function */
void *bcmsdh_get_sdioh(bcmsdh_info_t *sdh);
void *brcmf_sdcard_get_sdioh(bcmsdh_info_t *sdh);

#endif /* _sdio_api_h_ */
Loading

0 comments on commit 54ca296

Please sign in to comment.