typedef int SDIOH_API_RC;
-/* SDio Host structure */
-typedef struct sdioh_info sdioh_info_t;
-
/* callback function, taking one arg */
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 *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,
+extern struct sdioh_info *brcmf_sdioh_attach(void *cfghdl, uint irq);
+extern SDIOH_API_RC brcmf_sdioh_detach(struct sdioh_info *si);
+extern SDIOH_API_RC brcmf_sdioh_interrupt_register(struct sdioh_info *si,
sdioh_cb_fn_t fn, void *argh);
-extern SDIOH_API_RC brcmf_sdioh_interrupt_deregister(sdioh_info_t *si);
+extern SDIOH_API_RC brcmf_sdioh_interrupt_deregister(struct sdioh_info *si);
/* query whether SD interrupt is enabled or not */
-extern SDIOH_API_RC brcmf_sdioh_interrupt_query(sdioh_info_t *si, bool *onoff);
+extern SDIOH_API_RC
+brcmf_sdioh_interrupt_query(struct sdioh_info *si, bool *onoff);
/* enable or disable SD interrupt */
extern SDIOH_API_RC
-brcmf_sdioh_interrupt_set(sdioh_info_t *si, bool enable_disable);
+brcmf_sdioh_interrupt_set(struct sdioh_info *si, bool enable_disable);
#if defined(DHD_DEBUG)
-extern bool brcmf_sdioh_interrupt_pending(sdioh_info_t *si);
+extern bool brcmf_sdioh_interrupt_pending(struct sdioh_info *si);
#endif
-extern int brcmf_sdioh_claim_host_and_lock(sdioh_info_t *si);
-extern int brcmf_sdioh_release_host_and_unlock(sdioh_info_t *si);
+extern int brcmf_sdioh_claim_host_and_lock(struct sdioh_info *si);
+extern int brcmf_sdioh_release_host_and_unlock(struct sdioh_info *si);
/* read or write one byte using cmd52 */
extern SDIOH_API_RC
-brcmf_sdioh_request_byte(sdioh_info_t *si, uint rw, uint fnc, uint addr,
+brcmf_sdioh_request_byte(struct sdioh_info *si, uint rw, uint fnc, uint addr,
u8 *byte);
/* read or write 2/4 bytes using cmd53 */
-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);
+extern SDIOH_API_RC
+brcmf_sdioh_request_word(struct sdioh_info *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 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);
+extern SDIOH_API_RC
+brcmf_sdioh_request_buffer(struct sdioh_info *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 brcmf_sdioh_cis_read(sdioh_info_t *si, uint fuc, u8 *cis,
- u32 length);
+extern SDIOH_API_RC
+brcmf_sdioh_cis_read(struct sdioh_info *si, uint fuc, u8 *cis, u32 length);
-extern SDIOH_API_RC brcmf_sdioh_cfg_read(sdioh_info_t *si, uint fuc, u32 addr,
- u8 *data);
-extern SDIOH_API_RC brcmf_sdioh_cfg_write(sdioh_info_t *si, uint fuc, u32 addr,
- u8 *data);
+extern SDIOH_API_RC
+brcmf_sdioh_cfg_read(struct sdioh_info *si, uint fuc, u32 addr, u8 *data);
+extern SDIOH_API_RC
+brcmf_sdioh_cfg_write(struct sdioh_info *si, uint fuc, u32 addr, u8 *data);
/* query number of io functions */
-extern uint brcmf_sdioh_query_iofnum(sdioh_info_t *si);
+extern uint brcmf_sdioh_query_iofnum(struct sdioh_info *si);
/* handle iovars */
-extern int brcmf_sdioh_iovar_op(sdioh_info_t *si, const char *name,
+extern int brcmf_sdioh_iovar_op(struct sdioh_info *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 brcmf_sdioh_abort(sdioh_info_t *si, uint fnc);
+extern int brcmf_sdioh_abort(struct sdioh_info *si, uint fnc);
/* Start and Stop SDIO without re-enumerating the SD card. */
-extern int brcmf_sdioh_start(sdioh_info_t *si, int stage);
-extern int brcmf_sdioh_stop(sdioh_info_t *si);
+extern int brcmf_sdioh_start(struct sdioh_info *si, int stage);
+extern int brcmf_sdioh_stop(struct sdioh_info *si);
/* Reset and re-initialize the device */
-extern int brcmf_sdioh_reset(sdioh_info_t *si);
+extern int brcmf_sdioh_reset(struct sdioh_info *si);
/* Helper function */
void *brcmf_sdcard_get_sdioh(bcmsdh_info_t *sdh);
static void brcmf_sdioh_irqhandler(struct sdio_func *func);
static void brcmf_sdioh_irqhandler_f2(struct sdio_func *func);
#endif /* !defined(OOB_INTR_ONLY) */
-static int brcmf_sdioh_get_cisaddr(sdioh_info_t *sd, u32 regaddr);
+static int brcmf_sdioh_get_cisaddr(struct sdioh_info *sd, u32 regaddr);
extern int brcmf_sdioh_reset_comm(struct mmc_card *card);
extern PBCMSDH_SDMMC_INSTANCE gInstance;
#define DMA_ALIGN_MASK 0x03
-int brcmf_sdioh_card_regread(sdioh_info_t *sd, int func, u32 regaddr,
+int brcmf_sdioh_card_regread(struct sdioh_info *sd, int func, u32 regaddr,
int regsize, u32 *data);
void brcmf_sdioh_set_host_pm_flags(int flag)
__func__, (unsigned int)flag);
}
-static int brcmf_sdioh_enablefuncs(sdioh_info_t *sd)
+static int brcmf_sdioh_enablefuncs(struct sdioh_info *sd)
{
int err_ret;
u32 fbraddr;
/*
* Public entry points & extern's
*/
-sdioh_info_t *brcmf_sdioh_attach(void *bar0, uint irq)
+struct sdioh_info *brcmf_sdioh_attach(void *bar0, uint irq)
{
- sdioh_info_t *sd;
+ struct sdioh_info *sd;
int err_ret;
sd_trace(("%s\n", __func__));
return NULL;
}
- sd = kzalloc(sizeof(sdioh_info_t), GFP_ATOMIC);
+ sd = kzalloc(sizeof(struct sdioh_info), GFP_ATOMIC);
if (sd == NULL) {
sd_err(("sdioh_attach: out of memory\n"));
return NULL;
return sd;
}
-extern SDIOH_API_RC brcmf_sdioh_detach(sdioh_info_t *sd)
+extern SDIOH_API_RC brcmf_sdioh_detach(struct sdioh_info *sd)
{
sd_trace(("%s\n", __func__));
/* Configure callback to client when we receive client interrupt */
extern SDIOH_API_RC
-brcmf_sdioh_interrupt_register(sdioh_info_t *sd, sdioh_cb_fn_t fn, void *argh)
+brcmf_sdioh_interrupt_register(struct sdioh_info *sd, sdioh_cb_fn_t fn,
+ void *argh)
{
sd_trace(("%s: Entering\n", __func__));
if (fn == NULL) {
return SDIOH_API_RC_SUCCESS;
}
-extern SDIOH_API_RC brcmf_sdioh_interrupt_deregister(sdioh_info_t *sd)
+extern SDIOH_API_RC brcmf_sdioh_interrupt_deregister(struct sdioh_info *sd)
{
sd_trace(("%s: Entering\n", __func__));
return SDIOH_API_RC_SUCCESS;
}
-extern SDIOH_API_RC brcmf_sdioh_interrupt_query(sdioh_info_t *sd, bool *onoff)
+extern SDIOH_API_RC
+brcmf_sdioh_interrupt_query(struct sdioh_info *sd, bool *onoff)
{
sd_trace(("%s: Entering\n", __func__));
*onoff = sd->client_intr_enabled;
}
#if defined(DHD_DEBUG)
-extern bool brcmf_sdioh_interrupt_pending(sdioh_info_t *sd)
+extern bool brcmf_sdioh_interrupt_pending(struct sdioh_info *sd)
{
return 0;
}
#endif
-uint brcmf_sdioh_query_iofnum(sdioh_info_t *sd)
+uint brcmf_sdioh_query_iofnum(struct sdioh_info *sd)
{
return sd->num_funcs;
}
};
int
-brcmf_sdioh_iovar_op(sdioh_info_t *si, const char *name,
+brcmf_sdioh_iovar_op(struct sdioh_info *si, const char *name,
void *params, int plen, void *arg, int len, bool set)
{
const struct brcmu_iovar *vi = NULL;
#if defined(OOB_INTR_ONLY) && defined(HW_OOB)
-SDIOH_API_RC brcmf_sdioh_enable_hw_oob_intr(sdioh_info_t *sd, bool enable)
+SDIOH_API_RC brcmf_sdioh_enable_hw_oob_intr(struct sdioh_info *sd, bool enable)
{
SDIOH_API_RC status;
u8 data;
#endif /* defined(OOB_INTR_ONLY) && defined(HW_OOB) */
extern SDIOH_API_RC
-brcmf_sdioh_cfg_read(sdioh_info_t *sd, uint fnc_num, u32 addr, u8 *data)
+brcmf_sdioh_cfg_read(struct sdioh_info *sd, uint fnc_num, u32 addr, u8 *data)
{
SDIOH_API_RC status;
/* No lock needed since brcmf_sdioh_request_byte does locking */
}
extern SDIOH_API_RC
-brcmf_sdioh_cfg_write(sdioh_info_t *sd, uint fnc_num, u32 addr, u8 *data)
+brcmf_sdioh_cfg_write(struct sdioh_info *sd, uint fnc_num, u32 addr, u8 *data)
{
/* No lock needed since brcmf_sdioh_request_byte does locking */
SDIOH_API_RC status;
return status;
}
-static int brcmf_sdioh_get_cisaddr(sdioh_info_t *sd, u32 regaddr)
+static int brcmf_sdioh_get_cisaddr(struct sdioh_info *sd, u32 regaddr)
{
/* read 24 bits and return valid 17 bit addr */
int i;
}
extern SDIOH_API_RC
-brcmf_sdioh_cis_read(sdioh_info_t *sd, uint func, u8 *cisd, u32 length)
+brcmf_sdioh_cis_read(struct sdioh_info *sd, uint func, u8 *cisd, u32 length)
{
u32 count;
int offset;
}
extern SDIOH_API_RC
-brcmf_sdioh_request_byte(sdioh_info_t *sd, uint rw, uint func, uint regaddr,
- u8 *byte)
+brcmf_sdioh_request_byte(struct sdioh_info *sd, uint rw, uint func,
+ uint regaddr, u8 *byte)
{
int err_ret;
}
extern SDIOH_API_RC
-brcmf_sdioh_request_word(sdioh_info_t *sd, uint cmd_type, uint rw, uint func,
- uint addr, u32 *word, uint nbytes)
+brcmf_sdioh_request_word(struct sdioh_info *sd, uint cmd_type, uint rw,
+ uint func, uint addr, u32 *word, uint nbytes)
{
int err_ret = SDIOH_API_RC_FAIL;
}
static SDIOH_API_RC
-brcmf_sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write,
+brcmf_sdioh_request_packet(struct sdioh_info *sd, uint fix_inc, uint write,
uint func, uint addr, struct sk_buff *pkt)
{
bool fifo = (fix_inc == SDIOH_DATA_FIX);
*
*/
extern SDIOH_API_RC
-brcmf_sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc,
+brcmf_sdioh_request_buffer(struct sdioh_info *sd, uint pio_dma, uint fix_inc,
uint write, uint func, uint addr, uint reg_width,
uint buflen_u, u8 *buffer, struct sk_buff *pkt)
{
}
/* this function performs "abort" for both of host & device */
-extern int brcmf_sdioh_abort(sdioh_info_t *sd, uint func)
+extern int brcmf_sdioh_abort(struct sdioh_info *sd, uint func)
{
#if defined(MMC_SDIO_ABORT)
char t_func = (char)func;
}
/* Reset and re-initialize the device */
-int brcmf_sdioh_reset(sdioh_info_t *si)
+int brcmf_sdioh_reset(struct sdioh_info *si)
{
sd_trace(("%s: Enter\n", __func__));
sd_trace(("%s: Exit\n", __func__));
}
/* Disable device interrupt */
-void brcmf_sdioh_dev_intr_off(sdioh_info_t *sd)
+void brcmf_sdioh_dev_intr_off(struct sdioh_info *sd)
{
sd_trace(("%s: %d\n", __func__, sd->use_client_ints));
sd->intmask &= ~CLIENT_INTR;
}
/* Enable device interrupt */
-void brcmf_sdioh_dev_intr_on(sdioh_info_t *sd)
+void brcmf_sdioh_dev_intr_on(struct sdioh_info *sd)
{
sd_trace(("%s: %d\n", __func__, sd->use_client_ints));
sd->intmask |= CLIENT_INTR;
/* Read client card reg */
int
-brcmf_sdioh_card_regread(sdioh_info_t *sd, int func, u32 regaddr,
+brcmf_sdioh_card_regread(struct sdioh_info *sd, int func, u32 regaddr,
int regsize, u32 *data)
{
/* bcmsdh_sdmmc interrupt handler */
static void brcmf_sdioh_irqhandler(struct sdio_func *func)
{
- sdioh_info_t *sd;
+ struct sdioh_info *sd;
sd_trace(("bcmsdh_sdmmc: ***IRQHandler\n"));
sd = gInstance->sd;
/* bcmsdh_sdmmc interrupt handler for F2 (dummy handler) */
static void brcmf_sdioh_irqhandler_f2(struct sdio_func *func)
{
- sdioh_info_t *sd;
+ struct sdioh_info *sd;
sd_trace(("bcmsdh_sdmmc: ***IRQHandlerF2\n"));
#ifdef NOTUSED
/* Write client card reg */
static int
-brcmf_sdioh_card_regwrite(sdioh_info_t *sd, int func, u32 regaddr,
+brcmf_sdioh_card_regwrite(struct sdioh_info *sd, int func, u32 regaddr,
int regsize, u32 data)
{
}
#endif /* NOTUSED */
-int brcmf_sdioh_start(sdioh_info_t *si, int stage)
+int brcmf_sdioh_start(struct sdioh_info *si, int stage)
{
return 0;
}
-int brcmf_sdioh_stop(sdioh_info_t *si)
+int brcmf_sdioh_stop(struct sdioh_info *si)
{
return 0;
}