Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sdio_host.h File Reference
#include <linux/skbuff.h>

Go to the source code of this file.

Data Structures

struct  brcmf_sdreg
 
struct  brcmf_sdio_dev
 

Macros

#define SDIO_FUNC_0   0
 
#define SDIO_FUNC_1   1
 
#define SDIO_FUNC_2   2
 
#define SDIOD_FBR_SIZE   0x100
 
#define SDIO_FUNC_ENABLE_1   0x02
 
#define SDIO_FUNC_ENABLE_2   0x04
 
#define SDIO_FUNC_READY_1   0x02
 
#define SDIO_FUNC_READY_2   0x04
 
#define INTR_STATUS_FUNC1   0x2
 
#define INTR_STATUS_FUNC2   0x4
 
#define SDIOD_MAX_IOFUNCS   7
 
#define REG_F0_REG_MASK   0x7FF
 
#define REG_F1_MISC_MASK   0x1FFFF
 
#define SBSDIO_NUM_FUNCTION   3
 
#define SDIO_CCCR_BRCM_SEPINT   0xf2
 
#define SDIO_SEPINT_MASK   0x01
 
#define SDIO_SEPINT_OE   0x02
 
#define SDIO_SEPINT_ACT_HI   0x04
 
#define SBSDIO_SPROM_CS   0x10000
 
#define SBSDIO_SPROM_INFO   0x10001
 
#define SBSDIO_SPROM_DATA_LOW   0x10002
 
#define SBSDIO_SPROM_DATA_HIGH   0x10003
 
#define SBSDIO_SPROM_ADDR_LOW   0x10004
 
#define SBSDIO_SPROM_ADDR_HIGH   0x10005
 
#define SBSDIO_CHIP_CTRL_DATA   0x10006
 
#define SBSDIO_CHIP_CTRL_EN   0x10007
 
#define SBSDIO_WATERMARK   0x10008
 
#define SBSDIO_DEVICE_CTL   0x10009
 
#define SBSDIO_FUNC1_SBADDRLOW   0x1000A
 
#define SBSDIO_FUNC1_SBADDRMID   0x1000B
 
#define SBSDIO_FUNC1_SBADDRHIGH   0x1000C
 
#define SBSDIO_FUNC1_FRAMECTRL   0x1000D
 
#define SBSDIO_FUNC1_CHIPCLKCSR   0x1000E
 
#define SBSDIO_FUNC1_SDIOPULLUP   0x1000F
 
#define SBSDIO_FUNC1_WFRAMEBCLO   0x10019
 
#define SBSDIO_FUNC1_WFRAMEBCHI   0x1001A
 
#define SBSDIO_FUNC1_RFRAMEBCLO   0x1001B
 
#define SBSDIO_FUNC1_RFRAMEBCHI   0x1001C
 
#define SBSDIO_FUNC1_MISC_REG_START   0x10000 /* f1 misc register start */
 
#define SBSDIO_FUNC1_MISC_REG_LIMIT   0x1001C /* f1 misc register end */
 
#define SBSDIO_SB_OFT_ADDR_MASK   0x07FFF
 
#define SBSDIO_SB_OFT_ADDR_LIMIT   0x08000
 
#define SBSDIO_SB_ACCESS_2_4B_FLAG   0x08000
 
#define SBSDIO_SBADDRLOW_MASK   0x80 /* Valid bits in SBADDRLOW */
 
#define SBSDIO_SBADDRMID_MASK   0xff /* Valid bits in SBADDRMID */
 
#define SBSDIO_SBADDRHIGH_MASK   0xffU /* Valid bits in SBADDRHIGH */
 
#define SBSDIO_SBWINDOW_MASK   0xffff8000
 
#define SDIOH_READ   0 /* Read request */
 
#define SDIOH_WRITE   1 /* Write request */
 
#define SDIOH_DATA_FIX   0 /* Fixed addressing */
 
#define SDIOH_DATA_INC   1 /* Incremental addressing */
 
#define SUCCESS   0
 
#define ERROR   1
 
#define BRCMF_SDALIGN   (1 << 6)
 
#define BRCMF_WD_POLL_MS   10
 
#define SDIO_REQ_4BYTE   0x1
 
#define SDIO_REQ_FIXED   0x2
 
#define SDIO_REQ_ASYNC   0x4
 

Functions

int brcmf_sdio_intr_register (struct brcmf_sdio_dev *sdiodev)
 
int brcmf_sdio_intr_unregister (struct brcmf_sdio_dev *sdiodev)
 
u8 brcmf_sdio_regrb (struct brcmf_sdio_dev *sdiodev, u32 addr, int *ret)
 
u32 brcmf_sdio_regrl (struct brcmf_sdio_dev *sdiodev, u32 addr, int *ret)
 
void brcmf_sdio_regwb (struct brcmf_sdio_dev *sdiodev, u32 addr, u8 data, int *ret)
 
void brcmf_sdio_regwl (struct brcmf_sdio_dev *sdiodev, u32 addr, u32 data, int *ret)
 
int brcmf_sdio_regrw_helper (struct brcmf_sdio_dev *sdiodev, u32 addr, void *data, bool write)
 
int brcmf_sdcard_send_pkt (struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn, uint flags, struct sk_buff *pkt)
 
int brcmf_sdcard_send_buf (struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn, uint flags, u8 *buf, uint nbytes)
 
int brcmf_sdcard_recv_pkt (struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn, uint flags, struct sk_buff *pkt)
 
int brcmf_sdcard_recv_buf (struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn, uint flags, u8 *buf, uint nbytes)
 
int brcmf_sdcard_recv_chain (struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn, uint flags, struct sk_buff_head *pktq)
 
int brcmf_sdcard_rwdata (struct brcmf_sdio_dev *sdiodev, uint rw, u32 addr, u8 *buf, uint nbytes)
 
int brcmf_sdcard_abort (struct brcmf_sdio_dev *sdiodev, uint fn)
 
int brcmf_sdio_probe (struct brcmf_sdio_dev *sdiodev)
 
int brcmf_sdio_remove (struct brcmf_sdio_dev *sdiodev)
 
int brcmf_sdcard_set_sbaddr_window (struct brcmf_sdio_dev *sdiodev, u32 address)
 
int brcmf_sdioh_attach (struct brcmf_sdio_dev *sdiodev)
 
void brcmf_sdioh_detach (struct brcmf_sdio_dev *sdiodev)
 
int brcmf_sdioh_request_byte (struct brcmf_sdio_dev *sdiodev, uint rw, uint fnc, uint addr, u8 *byte)
 
int brcmf_sdioh_request_word (struct brcmf_sdio_dev *sdiodev, uint rw, uint fnc, uint addr, u32 *word, uint nbyte)
 
int brcmf_sdioh_request_buffer (struct brcmf_sdio_dev *sdiodev, uint fix_inc, uint rw, uint fnc_num, u32 addr, struct sk_buff *pkt)
 
int brcmf_sdioh_request_chain (struct brcmf_sdio_dev *sdiodev, uint fix_inc, uint write, uint func, uint addr, struct sk_buff_head *pktq)
 
void brcmf_sdio_wdtmr_enable (struct brcmf_sdio_dev *sdiodev, bool enable)
 
voidbrcmf_sdbrcm_probe (u32 regsva, struct brcmf_sdio_dev *sdiodev)
 
void brcmf_sdbrcm_disconnect (void *ptr)
 
void brcmf_sdbrcm_isr (void *arg)
 
void brcmf_sdbrcm_wd_timer (struct brcmf_sdio *bus, uint wdtick)
 

Macro Definition Documentation

#define BRCMF_SDALIGN   (1 << 6)

Definition at line 131 of file sdio_host.h.

#define BRCMF_WD_POLL_MS   10

Definition at line 134 of file sdio_host.h.

#define ERROR   1

Definition at line 128 of file sdio_host.h.

#define INTR_STATUS_FUNC1   0x2

Definition at line 37 of file sdio_host.h.

#define INTR_STATUS_FUNC2   0x4

Definition at line 38 of file sdio_host.h.

#define REG_F0_REG_MASK   0x7FF

Definition at line 44 of file sdio_host.h.

#define REG_F1_MISC_MASK   0x1FFFF

Definition at line 45 of file sdio_host.h.

#define SBSDIO_CHIP_CTRL_DATA   0x10006

Definition at line 72 of file sdio_host.h.

#define SBSDIO_CHIP_CTRL_EN   0x10007

Definition at line 74 of file sdio_host.h.

#define SBSDIO_DEVICE_CTL   0x10009

Definition at line 78 of file sdio_host.h.

#define SBSDIO_FUNC1_CHIPCLKCSR   0x1000E

Definition at line 89 of file sdio_host.h.

#define SBSDIO_FUNC1_FRAMECTRL   0x1000D

Definition at line 87 of file sdio_host.h.

#define SBSDIO_FUNC1_MISC_REG_LIMIT   0x1001C /* f1 misc register end */

Definition at line 102 of file sdio_host.h.

#define SBSDIO_FUNC1_MISC_REG_START   0x10000 /* f1 misc register start */

Definition at line 101 of file sdio_host.h.

#define SBSDIO_FUNC1_RFRAMEBCHI   0x1001C

Definition at line 99 of file sdio_host.h.

#define SBSDIO_FUNC1_RFRAMEBCLO   0x1001B

Definition at line 97 of file sdio_host.h.

#define SBSDIO_FUNC1_SBADDRHIGH   0x1000C

Definition at line 85 of file sdio_host.h.

#define SBSDIO_FUNC1_SBADDRLOW   0x1000A

Definition at line 81 of file sdio_host.h.

#define SBSDIO_FUNC1_SBADDRMID   0x1000B

Definition at line 83 of file sdio_host.h.

#define SBSDIO_FUNC1_SDIOPULLUP   0x1000F

Definition at line 91 of file sdio_host.h.

#define SBSDIO_FUNC1_WFRAMEBCHI   0x1001A

Definition at line 95 of file sdio_host.h.

#define SBSDIO_FUNC1_WFRAMEBCLO   0x10019

Definition at line 93 of file sdio_host.h.

#define SBSDIO_NUM_FUNCTION   3

Definition at line 48 of file sdio_host.h.

#define SBSDIO_SB_ACCESS_2_4B_FLAG   0x08000

Definition at line 110 of file sdio_host.h.

#define SBSDIO_SB_OFT_ADDR_LIMIT   0x08000

Definition at line 108 of file sdio_host.h.

#define SBSDIO_SB_OFT_ADDR_MASK   0x07FFF

Definition at line 107 of file sdio_host.h.

#define SBSDIO_SBADDRHIGH_MASK   0xffU /* Valid bits in SBADDRHIGH */

Definition at line 116 of file sdio_host.h.

#define SBSDIO_SBADDRLOW_MASK   0x80 /* Valid bits in SBADDRLOW */

Definition at line 114 of file sdio_host.h.

#define SBSDIO_SBADDRMID_MASK   0xff /* Valid bits in SBADDRMID */

Definition at line 115 of file sdio_host.h.

#define SBSDIO_SBWINDOW_MASK   0xffff8000

Definition at line 118 of file sdio_host.h.

#define SBSDIO_SPROM_ADDR_HIGH   0x10005

Definition at line 70 of file sdio_host.h.

#define SBSDIO_SPROM_ADDR_LOW   0x10004

Definition at line 68 of file sdio_host.h.

#define SBSDIO_SPROM_CS   0x10000

Definition at line 60 of file sdio_host.h.

#define SBSDIO_SPROM_DATA_HIGH   0x10003

Definition at line 66 of file sdio_host.h.

#define SBSDIO_SPROM_DATA_LOW   0x10002

Definition at line 64 of file sdio_host.h.

#define SBSDIO_SPROM_INFO   0x10001

Definition at line 62 of file sdio_host.h.

#define SBSDIO_WATERMARK   0x10008

Definition at line 76 of file sdio_host.h.

#define SDIO_CCCR_BRCM_SEPINT   0xf2

Definition at line 51 of file sdio_host.h.

#define SDIO_FUNC_0   0

Definition at line 22 of file sdio_host.h.

#define SDIO_FUNC_1   1

Definition at line 23 of file sdio_host.h.

#define SDIO_FUNC_2   2

Definition at line 24 of file sdio_host.h.

#define SDIO_FUNC_ENABLE_1   0x02

Definition at line 29 of file sdio_host.h.

#define SDIO_FUNC_ENABLE_2   0x04

Definition at line 30 of file sdio_host.h.

#define SDIO_FUNC_READY_1   0x02

Definition at line 33 of file sdio_host.h.

#define SDIO_FUNC_READY_2   0x04

Definition at line 34 of file sdio_host.h.

#define SDIO_REQ_4BYTE   0x1

Definition at line 212 of file sdio_host.h.

#define SDIO_REQ_ASYNC   0x4

Definition at line 216 of file sdio_host.h.

#define SDIO_REQ_FIXED   0x2

Definition at line 214 of file sdio_host.h.

#define SDIO_SEPINT_ACT_HI   0x04

Definition at line 55 of file sdio_host.h.

#define SDIO_SEPINT_MASK   0x01

Definition at line 53 of file sdio_host.h.

#define SDIO_SEPINT_OE   0x02

Definition at line 54 of file sdio_host.h.

#define SDIOD_FBR_SIZE   0x100

Definition at line 26 of file sdio_host.h.

#define SDIOD_MAX_IOFUNCS   7

Definition at line 41 of file sdio_host.h.

#define SDIOH_DATA_FIX   0 /* Fixed addressing */

Definition at line 123 of file sdio_host.h.

#define SDIOH_DATA_INC   1 /* Incremental addressing */

Definition at line 124 of file sdio_host.h.

#define SDIOH_READ   0 /* Read request */

Definition at line 120 of file sdio_host.h.

#define SDIOH_WRITE   1 /* Write request */

Definition at line 121 of file sdio_host.h.

#define SUCCESS   0

Definition at line 127 of file sdio_host.h.

Function Documentation

void brcmf_sdbrcm_disconnect ( void ptr)

Definition at line 4001 of file dhd_sdio.c.

void brcmf_sdbrcm_isr ( void arg)

Definition at line 3494 of file dhd_sdio.c.

void* brcmf_sdbrcm_probe ( u32  regsva,
struct brcmf_sdio_dev sdiodev 
)

Definition at line 3874 of file dhd_sdio.c.

void brcmf_sdbrcm_wd_timer ( struct brcmf_sdio bus,
uint  wdtick 
)

Definition at line 4014 of file dhd_sdio.c.

int brcmf_sdcard_abort ( struct brcmf_sdio_dev sdiodev,
uint  fn 
)

Definition at line 507 of file bcmsdh.c.

int brcmf_sdcard_recv_buf ( struct brcmf_sdio_dev sdiodev,
u32  addr,
uint  fn,
uint  flags,
u8 buf,
uint  nbytes 
)

Definition at line 335 of file bcmsdh.c.

int brcmf_sdcard_recv_chain ( struct brcmf_sdio_dev sdiodev,
u32  addr,
uint  fn,
uint  flags,
struct sk_buff_head pktq 
)

Definition at line 384 of file bcmsdh.c.

int brcmf_sdcard_recv_pkt ( struct brcmf_sdio_dev sdiodev,
u32  addr,
uint  fn,
uint  flags,
struct sk_buff pkt 
)

Definition at line 357 of file bcmsdh.c.

int brcmf_sdcard_rwdata ( struct brcmf_sdio_dev sdiodev,
uint  rw,
u32  addr,
u8 buf,
uint  nbytes 
)

Definition at line 475 of file bcmsdh.c.

int brcmf_sdcard_send_buf ( struct brcmf_sdio_dev sdiodev,
u32  addr,
uint  fn,
uint  flags,
u8 buf,
uint  nbytes 
)

Definition at line 412 of file bcmsdh.c.

int brcmf_sdcard_send_pkt ( struct brcmf_sdio_dev sdiodev,
u32  addr,
uint  fn,
uint  flags,
struct sk_buff pkt 
)

Definition at line 434 of file bcmsdh.c.

int brcmf_sdcard_set_sbaddr_window ( struct brcmf_sdio_dev sdiodev,
u32  address 
)

Definition at line 158 of file bcmsdh.c.

int brcmf_sdio_intr_register ( struct brcmf_sdio_dev sdiodev)

Definition at line 132 of file bcmsdh.c.

int brcmf_sdio_intr_unregister ( struct brcmf_sdio_dev sdiodev)

Definition at line 144 of file bcmsdh.c.

int brcmf_sdio_probe ( struct brcmf_sdio_dev sdiodev)

Definition at line 522 of file bcmsdh.c.

u8 brcmf_sdio_regrb ( struct brcmf_sdio_dev sdiodev,
u32  addr,
int ret 
)

Definition at line 246 of file bcmsdh.c.

u32 brcmf_sdio_regrl ( struct brcmf_sdio_dev sdiodev,
u32  addr,
int ret 
)

Definition at line 263 of file bcmsdh.c.

int brcmf_sdio_regrw_helper ( struct brcmf_sdio_dev sdiodev,
u32  addr,
void data,
bool  write 
)

Definition at line 189 of file bcmsdh.c.

void brcmf_sdio_regwb ( struct brcmf_sdio_dev sdiodev,
u32  addr,
u8  data,
int ret 
)

Definition at line 280 of file bcmsdh.c.

void brcmf_sdio_regwl ( struct brcmf_sdio_dev sdiodev,
u32  addr,
u32  data,
int ret 
)

Definition at line 294 of file bcmsdh.c.

int brcmf_sdio_remove ( struct brcmf_sdio_dev sdiodev)

Definition at line 552 of file bcmsdh.c.

void brcmf_sdio_wdtmr_enable ( struct brcmf_sdio_dev sdiodev,
bool  enable 
)

Definition at line 567 of file bcmsdh.c.

int brcmf_sdioh_attach ( struct brcmf_sdio_dev sdiodev)

Definition at line 387 of file bcmsdh_sdmmc.c.

void brcmf_sdioh_detach ( struct brcmf_sdio_dev sdiodev)

Definition at line 418 of file bcmsdh_sdmmc.c.

int brcmf_sdioh_request_buffer ( struct brcmf_sdio_dev sdiodev,
uint  fix_inc,
uint  rw,
uint  fnc_num,
u32  addr,
struct sk_buff pkt 
)

Definition at line 294 of file bcmsdh_sdmmc.c.

int brcmf_sdioh_request_byte ( struct brcmf_sdio_dev sdiodev,
uint  rw,
uint  fnc,
uint  addr,
u8 byte 
)

Definition at line 141 of file bcmsdh_sdmmc.c.

int brcmf_sdioh_request_chain ( struct brcmf_sdio_dev sdiodev,
uint  fix_inc,
uint  write,
uint  func,
uint  addr,
struct sk_buff_head pktq 
)

Definition at line 249 of file bcmsdh_sdmmc.c.

int brcmf_sdioh_request_word ( struct brcmf_sdio_dev sdiodev,
uint  rw,
uint  fnc,
uint  addr,
u32 word,
uint  nbyte 
)

Definition at line 175 of file bcmsdh_sdmmc.c.