mirror of https://gitee.com/openkylin/linux.git
staging: brcm80211: replaced prefix of SDIO related functions
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>
This commit is contained in:
parent
7faf8c5b72
commit
54ca296913
|
@ -48,68 +48,70 @@ typedef void (*sdioh_cb_fn_t) (void *);
|
||||||
* The handler shall be provided by all subsequent calls. No local cache
|
* The handler shall be provided by all subsequent calls. No local cache
|
||||||
* cfghdl points to the starting address of pci device mapped memory
|
* cfghdl points to the starting address of pci device mapped memory
|
||||||
*/
|
*/
|
||||||
extern sdioh_info_t *sdioh_attach(void *cfghdl, uint irq);
|
extern sdioh_info_t *brcmf_sdioh_attach(void *cfghdl, uint irq);
|
||||||
extern SDIOH_API_RC sdioh_detach(sdioh_info_t *si);
|
extern SDIOH_API_RC brcmf_sdioh_detach(sdioh_info_t *si);
|
||||||
extern SDIOH_API_RC sdioh_interrupt_register(sdioh_info_t *si,
|
extern SDIOH_API_RC brcmf_sdioh_interrupt_register(sdioh_info_t *si,
|
||||||
sdioh_cb_fn_t fn, void *argh);
|
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 */
|
/* 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 */
|
/* 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)
|
#if defined(DHD_DEBUG)
|
||||||
extern bool sdioh_interrupt_pending(sdioh_info_t *si);
|
extern bool brcmf_sdioh_interrupt_pending(sdioh_info_t *si);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int sdioh_claim_host_and_lock(sdioh_info_t *si);
|
extern int brcmf_sdioh_claim_host_and_lock(sdioh_info_t *si);
|
||||||
extern int sdioh_release_host_and_unlock(sdioh_info_t *si);
|
extern int brcmf_sdioh_release_host_and_unlock(sdioh_info_t *si);
|
||||||
|
|
||||||
/* read or write one byte using cmd52 */
|
/* read or write one byte using cmd52 */
|
||||||
extern SDIOH_API_RC sdioh_request_byte(sdioh_info_t *si, uint rw, uint fnc,
|
extern SDIOH_API_RC
|
||||||
uint addr, u8 *byte);
|
brcmf_sdioh_request_byte(sdioh_info_t *si, uint rw, uint fnc, uint addr,
|
||||||
|
u8 *byte);
|
||||||
|
|
||||||
/* read or write 2/4 bytes using cmd53 */
|
/* 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,
|
uint rw, uint fnc, uint addr,
|
||||||
u32 *word, uint nbyte);
|
u32 *word, uint nbyte);
|
||||||
|
|
||||||
/* read or write any buffer using cmd53 */
|
/* 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,
|
uint fix_inc, uint rw, uint fnc_num,
|
||||||
u32 addr, uint regwidth,
|
u32 addr, uint regwidth,
|
||||||
u32 buflen, u8 *buffer,
|
u32 buflen, u8 *buffer,
|
||||||
struct sk_buff *pkt);
|
struct sk_buff *pkt);
|
||||||
|
|
||||||
/* get cis data */
|
/* 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);
|
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);
|
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);
|
u8 *data);
|
||||||
|
|
||||||
/* query number of io functions */
|
/* 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 */
|
/* 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);
|
void *params, int plen, void *arg, int len, bool set);
|
||||||
|
|
||||||
/* Issue abort to the specified function and clear controller as needed */
|
/* 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. */
|
/* Start and Stop SDIO without re-enumerating the SD card. */
|
||||||
extern int sdioh_start(sdioh_info_t *si, int stage);
|
extern int brcmf_sdioh_start(sdioh_info_t *si, int stage);
|
||||||
extern int sdioh_stop(sdioh_info_t *si);
|
extern int brcmf_sdioh_stop(sdioh_info_t *si);
|
||||||
|
|
||||||
/* Reset and re-initialize the device */
|
/* 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 */
|
/* Helper function */
|
||||||
void *bcmsdh_get_sdioh(bcmsdh_info_t *sdh);
|
void *brcmf_sdcard_get_sdioh(bcmsdh_info_t *sdh);
|
||||||
|
|
||||||
#endif /* _sdio_api_h_ */
|
#endif /* _sdio_api_h_ */
|
||||||
|
|
|
@ -45,15 +45,15 @@ struct bcmsdh_info {
|
||||||
bcmsdh_info_t *l_bcmsdh;
|
bcmsdh_info_t *l_bcmsdh;
|
||||||
|
|
||||||
#if defined(OOB_INTR_ONLY) && defined(HW_OOB)
|
#if defined(OOB_INTR_ONLY) && defined(HW_OOB)
|
||||||
extern int sdioh_enable_hw_oob_intr(void *sdioh, bool enable);
|
extern int brcmf_sdioh_enable_hw_oob_intr(void *sdioh, bool enable);
|
||||||
|
|
||||||
void bcmsdh_enable_hw_oob_intr(bcmsdh_info_t *sdh, bool enable)
|
void brcmf_sdcard_enable_hw_oob_intr(bcmsdh_info_t *sdh, bool enable)
|
||||||
{
|
{
|
||||||
sdioh_enable_hw_oob_intr(sdh->sdioh, enable);
|
brcmf_sdioh_enable_hw_oob_intr(sdh->sdioh, enable);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bcmsdh_info_t *bcmsdh_attach(void *cfghdl, void **regsva, uint irq)
|
bcmsdh_info_t *brcmf_sdcard_attach(void *cfghdl, void **regsva, uint irq)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh;
|
bcmsdh_info_t *bcmsdh;
|
||||||
|
|
||||||
|
@ -66,9 +66,9 @@ bcmsdh_info_t *bcmsdh_attach(void *cfghdl, void **regsva, uint irq)
|
||||||
/* save the handler locally */
|
/* save the handler locally */
|
||||||
l_bcmsdh = bcmsdh;
|
l_bcmsdh = bcmsdh;
|
||||||
|
|
||||||
bcmsdh->sdioh = sdioh_attach(cfghdl, irq);
|
bcmsdh->sdioh = brcmf_sdioh_attach(cfghdl, irq);
|
||||||
if (!bcmsdh->sdioh) {
|
if (!bcmsdh->sdioh) {
|
||||||
bcmsdh_detach(bcmsdh);
|
brcmf_sdcard_detach(bcmsdh);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,13 +81,13 @@ bcmsdh_info_t *bcmsdh_attach(void *cfghdl, void **regsva, uint irq)
|
||||||
return bcmsdh;
|
return bcmsdh;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_detach(void *sdh)
|
int brcmf_sdcard_detach(void *sdh)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
|
|
||||||
if (bcmsdh != NULL) {
|
if (bcmsdh != NULL) {
|
||||||
if (bcmsdh->sdioh) {
|
if (bcmsdh->sdioh) {
|
||||||
sdioh_detach(bcmsdh->sdioh);
|
brcmf_sdioh_detach(bcmsdh->sdioh);
|
||||||
bcmsdh->sdioh = NULL;
|
bcmsdh->sdioh = NULL;
|
||||||
}
|
}
|
||||||
kfree(bcmsdh);
|
kfree(bcmsdh);
|
||||||
|
@ -98,78 +98,79 @@ int bcmsdh_detach(void *sdh)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
bcmsdh_iovar_op(void *sdh, const char *name,
|
brcmf_sdcard_iovar_op(void *sdh, const char *name,
|
||||||
void *params, int plen, void *arg, int len, bool set)
|
void *params, int plen, void *arg, int len, bool set)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
return sdioh_iovar_op(bcmsdh->sdioh, name, params, plen, arg, len, set);
|
return brcmf_sdioh_iovar_op(bcmsdh->sdioh, name, params, plen, arg,
|
||||||
|
len, set);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bcmsdh_intr_query(void *sdh)
|
bool brcmf_sdcard_intr_query(void *sdh)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
bool on;
|
bool on;
|
||||||
|
|
||||||
ASSERT(bcmsdh);
|
ASSERT(bcmsdh);
|
||||||
status = sdioh_interrupt_query(bcmsdh->sdioh, &on);
|
status = brcmf_sdioh_interrupt_query(bcmsdh->sdioh, &on);
|
||||||
if (SDIOH_API_SUCCESS(status))
|
if (SDIOH_API_SUCCESS(status))
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
return on;
|
return on;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_intr_enable(void *sdh)
|
int brcmf_sdcard_intr_enable(void *sdh)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
ASSERT(bcmsdh);
|
ASSERT(bcmsdh);
|
||||||
|
|
||||||
status = sdioh_interrupt_set(bcmsdh->sdioh, true);
|
status = brcmf_sdioh_interrupt_set(bcmsdh->sdioh, true);
|
||||||
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_intr_disable(void *sdh)
|
int brcmf_sdcard_intr_disable(void *sdh)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
ASSERT(bcmsdh);
|
ASSERT(bcmsdh);
|
||||||
|
|
||||||
status = sdioh_interrupt_set(bcmsdh->sdioh, false);
|
status = brcmf_sdioh_interrupt_set(bcmsdh->sdioh, false);
|
||||||
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_intr_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh)
|
int brcmf_sdcard_intr_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
ASSERT(bcmsdh);
|
ASSERT(bcmsdh);
|
||||||
|
|
||||||
status = sdioh_interrupt_register(bcmsdh->sdioh, fn, argh);
|
status = brcmf_sdioh_interrupt_register(bcmsdh->sdioh, fn, argh);
|
||||||
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_intr_dereg(void *sdh)
|
int brcmf_sdcard_intr_dereg(void *sdh)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
ASSERT(bcmsdh);
|
ASSERT(bcmsdh);
|
||||||
|
|
||||||
status = sdioh_interrupt_deregister(bcmsdh->sdioh);
|
status = brcmf_sdioh_interrupt_deregister(bcmsdh->sdioh);
|
||||||
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DHD_DEBUG)
|
#if defined(DHD_DEBUG)
|
||||||
bool bcmsdh_intr_pending(void *sdh)
|
bool brcmf_sdcard_intr_pending(void *sdh)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
|
|
||||||
ASSERT(sdh);
|
ASSERT(sdh);
|
||||||
return sdioh_interrupt_pending(bcmsdh->sdioh);
|
return brcmf_sdioh_interrupt_pending(bcmsdh->sdioh);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int bcmsdh_devremove_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh)
|
int brcmf_sdcard_devremove_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh)
|
||||||
{
|
{
|
||||||
ASSERT(sdh);
|
ASSERT(sdh);
|
||||||
|
|
||||||
|
@ -177,7 +178,7 @@ int bcmsdh_devremove_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh)
|
||||||
return -ENOTSUPP;
|
return -ENOTSUPP;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 bcmsdh_cfg_read(void *sdh, uint fnc_num, u32 addr, int *err)
|
u8 brcmf_sdcard_cfg_read(void *sdh, uint fnc_num, u32 addr, int *err)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
|
@ -197,7 +198,7 @@ u8 bcmsdh_cfg_read(void *sdh, uint fnc_num, u32 addr, int *err)
|
||||||
udelay(1000);
|
udelay(1000);
|
||||||
#endif
|
#endif
|
||||||
status =
|
status =
|
||||||
sdioh_cfg_read(bcmsdh->sdioh, fnc_num, addr,
|
brcmf_sdioh_cfg_read(bcmsdh->sdioh, fnc_num, addr,
|
||||||
(u8 *) &data);
|
(u8 *) &data);
|
||||||
#ifdef SDIOH_API_ACCESS_RETRY_LIMIT
|
#ifdef SDIOH_API_ACCESS_RETRY_LIMIT
|
||||||
} while (!SDIOH_API_SUCCESS(status)
|
} while (!SDIOH_API_SUCCESS(status)
|
||||||
|
@ -213,7 +214,7 @@ u8 bcmsdh_cfg_read(void *sdh, uint fnc_num, u32 addr, int *err)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
bcmsdh_cfg_write(void *sdh, uint fnc_num, u32 addr, u8 data, int *err)
|
brcmf_sdcard_cfg_write(void *sdh, uint fnc_num, u32 addr, u8 data, int *err)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
|
@ -232,7 +233,7 @@ bcmsdh_cfg_write(void *sdh, uint fnc_num, u32 addr, u8 data, int *err)
|
||||||
udelay(1000);
|
udelay(1000);
|
||||||
#endif
|
#endif
|
||||||
status =
|
status =
|
||||||
sdioh_cfg_write(bcmsdh->sdioh, fnc_num, addr,
|
brcmf_sdioh_cfg_write(bcmsdh->sdioh, fnc_num, addr,
|
||||||
(u8 *) &data);
|
(u8 *) &data);
|
||||||
#ifdef SDIOH_API_ACCESS_RETRY_LIMIT
|
#ifdef SDIOH_API_ACCESS_RETRY_LIMIT
|
||||||
} while (!SDIOH_API_SUCCESS(status)
|
} while (!SDIOH_API_SUCCESS(status)
|
||||||
|
@ -245,7 +246,7 @@ bcmsdh_cfg_write(void *sdh, uint fnc_num, u32 addr, u8 data, int *err)
|
||||||
__func__, fnc_num, addr, data));
|
__func__, fnc_num, addr, data));
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 bcmsdh_cfg_read_word(void *sdh, uint fnc_num, u32 addr, int *err)
|
u32 brcmf_sdcard_cfg_read_word(void *sdh, uint fnc_num, u32 addr, int *err)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
|
@ -256,9 +257,8 @@ u32 bcmsdh_cfg_read_word(void *sdh, uint fnc_num, u32 addr, int *err)
|
||||||
|
|
||||||
ASSERT(bcmsdh->init_success);
|
ASSERT(bcmsdh->init_success);
|
||||||
|
|
||||||
status =
|
status = brcmf_sdioh_request_word(bcmsdh->sdioh, SDIOH_CMD_TYPE_NORMAL,
|
||||||
sdioh_request_word(bcmsdh->sdioh, SDIOH_CMD_TYPE_NORMAL, SDIOH_READ,
|
SDIOH_READ, fnc_num, addr, &data, 4);
|
||||||
fnc_num, addr, &data, 4);
|
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
*err = (SDIOH_API_SUCCESS(status) ? 0 : -EIO);
|
*err = (SDIOH_API_SUCCESS(status) ? 0 : -EIO);
|
||||||
|
@ -270,7 +270,7 @@ u32 bcmsdh_cfg_read_word(void *sdh, uint fnc_num, u32 addr, int *err)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
bcmsdh_cfg_write_word(void *sdh, uint fnc_num, u32 addr, u32 data,
|
brcmf_sdcard_cfg_write_word(void *sdh, uint fnc_num, u32 addr, u32 data,
|
||||||
int *err)
|
int *err)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
|
@ -282,7 +282,7 @@ bcmsdh_cfg_write_word(void *sdh, uint fnc_num, u32 addr, u32 data,
|
||||||
ASSERT(bcmsdh->init_success);
|
ASSERT(bcmsdh->init_success);
|
||||||
|
|
||||||
status =
|
status =
|
||||||
sdioh_request_word(bcmsdh->sdioh, SDIOH_CMD_TYPE_NORMAL,
|
brcmf_sdioh_request_word(bcmsdh->sdioh, SDIOH_CMD_TYPE_NORMAL,
|
||||||
SDIOH_WRITE, fnc_num, addr, &data, 4);
|
SDIOH_WRITE, fnc_num, addr, &data, 4);
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
|
@ -292,7 +292,7 @@ bcmsdh_cfg_write_word(void *sdh, uint fnc_num, u32 addr, u32 data,
|
||||||
__func__, fnc_num, addr, data));
|
__func__, fnc_num, addr, data));
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_cis_read(void *sdh, uint func, u8 * cis, uint length)
|
int brcmf_sdcard_cis_read(void *sdh, uint func, u8 * cis, uint length)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
|
@ -309,7 +309,7 @@ int bcmsdh_cis_read(void *sdh, uint func, u8 * cis, uint length)
|
||||||
ASSERT(cis);
|
ASSERT(cis);
|
||||||
ASSERT(length <= SBSDIO_CIS_SIZE_LIMIT);
|
ASSERT(length <= SBSDIO_CIS_SIZE_LIMIT);
|
||||||
|
|
||||||
status = sdioh_cis_read(bcmsdh->sdioh, func, cis, length);
|
status = brcmf_sdioh_cis_read(bcmsdh->sdioh, func, cis, length);
|
||||||
|
|
||||||
if (ascii) {
|
if (ascii) {
|
||||||
/* Move binary bits to tmp and format them
|
/* Move binary bits to tmp and format them
|
||||||
|
@ -332,24 +332,27 @@ int bcmsdh_cis_read(void *sdh, uint func, u8 * cis, uint length)
|
||||||
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bcmsdhsdio_set_sbaddr_window(void *sdh, u32 address)
|
static int brcmf_sdcard_set_sbaddr_window(void *sdh, u32 address)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
bcmsdh_cfg_write(bcmsdh, SDIO_FUNC_1, SBSDIO_FUNC1_SBADDRLOW,
|
brcmf_sdcard_cfg_write(bcmsdh, SDIO_FUNC_1, SBSDIO_FUNC1_SBADDRLOW,
|
||||||
(address >> 8) & SBSDIO_SBADDRLOW_MASK, &err);
|
(address >> 8) & SBSDIO_SBADDRLOW_MASK, &err);
|
||||||
if (!err)
|
if (!err)
|
||||||
bcmsdh_cfg_write(bcmsdh, SDIO_FUNC_1, SBSDIO_FUNC1_SBADDRMID,
|
brcmf_sdcard_cfg_write(bcmsdh, SDIO_FUNC_1,
|
||||||
(address >> 16) & SBSDIO_SBADDRMID_MASK, &err);
|
SBSDIO_FUNC1_SBADDRMID,
|
||||||
|
(address >> 16) & SBSDIO_SBADDRMID_MASK,
|
||||||
|
&err);
|
||||||
if (!err)
|
if (!err)
|
||||||
bcmsdh_cfg_write(bcmsdh, SDIO_FUNC_1, SBSDIO_FUNC1_SBADDRHIGH,
|
brcmf_sdcard_cfg_write(bcmsdh, SDIO_FUNC_1,
|
||||||
(address >> 24) & SBSDIO_SBADDRHIGH_MASK,
|
SBSDIO_FUNC1_SBADDRHIGH,
|
||||||
&err);
|
(address >> 24) & SBSDIO_SBADDRHIGH_MASK,
|
||||||
|
&err);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 bcmsdh_reg_read(void *sdh, u32 addr, uint size)
|
u32 brcmf_sdcard_reg_read(void *sdh, u32 addr, uint size)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
|
@ -364,7 +367,7 @@ u32 bcmsdh_reg_read(void *sdh, u32 addr, uint size)
|
||||||
ASSERT(bcmsdh->init_success);
|
ASSERT(bcmsdh->init_success);
|
||||||
|
|
||||||
if (bar0 != bcmsdh->sbwad) {
|
if (bar0 != bcmsdh->sbwad) {
|
||||||
if (bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0))
|
if (brcmf_sdcard_set_sbaddr_window(bcmsdh, bar0))
|
||||||
return 0xFFFFFFFF;
|
return 0xFFFFFFFF;
|
||||||
|
|
||||||
bcmsdh->sbwad = bar0;
|
bcmsdh->sbwad = bar0;
|
||||||
|
@ -374,7 +377,7 @@ u32 bcmsdh_reg_read(void *sdh, u32 addr, uint size)
|
||||||
if (size == 4)
|
if (size == 4)
|
||||||
addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
|
addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
|
||||||
|
|
||||||
status = sdioh_request_word(bcmsdh->sdioh, SDIOH_CMD_TYPE_NORMAL,
|
status = brcmf_sdioh_request_word(bcmsdh->sdioh, SDIOH_CMD_TYPE_NORMAL,
|
||||||
SDIOH_READ, SDIO_FUNC_1, addr, &word, size);
|
SDIOH_READ, SDIO_FUNC_1, addr, &word, size);
|
||||||
|
|
||||||
bcmsdh->regfail = !(SDIOH_API_SUCCESS(status));
|
bcmsdh->regfail = !(SDIOH_API_SUCCESS(status));
|
||||||
|
@ -402,7 +405,7 @@ u32 bcmsdh_reg_read(void *sdh, u32 addr, uint size)
|
||||||
return 0xFFFFFFFF;
|
return 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 bcmsdh_reg_write(void *sdh, u32 addr, uint size, u32 data)
|
u32 brcmf_sdcard_reg_write(void *sdh, u32 addr, uint size, u32 data)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
|
@ -418,7 +421,7 @@ u32 bcmsdh_reg_write(void *sdh, u32 addr, uint size, u32 data)
|
||||||
ASSERT(bcmsdh->init_success);
|
ASSERT(bcmsdh->init_success);
|
||||||
|
|
||||||
if (bar0 != bcmsdh->sbwad) {
|
if (bar0 != bcmsdh->sbwad) {
|
||||||
err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0);
|
err = brcmf_sdcard_set_sbaddr_window(bcmsdh, bar0);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -429,7 +432,7 @@ u32 bcmsdh_reg_write(void *sdh, u32 addr, uint size, u32 data)
|
||||||
if (size == 4)
|
if (size == 4)
|
||||||
addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
|
addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
|
||||||
status =
|
status =
|
||||||
sdioh_request_word(bcmsdh->sdioh, SDIOH_CMD_TYPE_NORMAL,
|
brcmf_sdioh_request_word(bcmsdh->sdioh, SDIOH_CMD_TYPE_NORMAL,
|
||||||
SDIOH_WRITE, SDIO_FUNC_1, addr, &data, size);
|
SDIOH_WRITE, SDIO_FUNC_1, addr, &data, size);
|
||||||
bcmsdh->regfail = !(SDIOH_API_SUCCESS(status));
|
bcmsdh->regfail = !(SDIOH_API_SUCCESS(status));
|
||||||
|
|
||||||
|
@ -441,13 +444,13 @@ u32 bcmsdh_reg_write(void *sdh, u32 addr, uint size, u32 data)
|
||||||
return 0xFFFFFFFF;
|
return 0xFFFFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bcmsdh_regfail(void *sdh)
|
bool brcmf_sdcard_regfail(void *sdh)
|
||||||
{
|
{
|
||||||
return ((bcmsdh_info_t *) sdh)->regfail;
|
return ((bcmsdh_info_t *) sdh)->regfail;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
bcmsdh_recv_buf(bcmsdh_info_t *bcmsdh, u32 addr, uint fn, uint flags,
|
brcmf_sdcard_recv_buf(bcmsdh_info_t *bcmsdh, u32 addr, uint fn, uint flags,
|
||||||
u8 *buf, uint nbytes, struct sk_buff *pkt,
|
u8 *buf, uint nbytes, struct sk_buff *pkt,
|
||||||
bcmsdh_cmplt_fn_t complete, void *handle)
|
bcmsdh_cmplt_fn_t complete, void *handle)
|
||||||
{
|
{
|
||||||
|
@ -469,7 +472,7 @@ bcmsdh_recv_buf(bcmsdh_info_t *bcmsdh, u32 addr, uint fn, uint flags,
|
||||||
return -ENOTSUPP;
|
return -ENOTSUPP;
|
||||||
|
|
||||||
if (bar0 != bcmsdh->sbwad) {
|
if (bar0 != bcmsdh->sbwad) {
|
||||||
err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0);
|
err = brcmf_sdcard_set_sbaddr_window(bcmsdh, bar0);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -483,15 +486,14 @@ bcmsdh_recv_buf(bcmsdh_info_t *bcmsdh, u32 addr, uint fn, uint flags,
|
||||||
if (width == 4)
|
if (width == 4)
|
||||||
addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
|
addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
|
||||||
|
|
||||||
status = sdioh_request_buffer(bcmsdh->sdioh, SDIOH_DATA_PIO, incr_fix,
|
status = brcmf_sdioh_request_buffer(bcmsdh->sdioh, SDIOH_DATA_PIO,
|
||||||
SDIOH_READ, fn, addr, width, nbytes, buf,
|
incr_fix, SDIOH_READ, fn, addr, width, nbytes, buf, pkt);
|
||||||
pkt);
|
|
||||||
|
|
||||||
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
bcmsdh_send_buf(void *sdh, u32 addr, uint fn, uint flags,
|
brcmf_sdcard_send_buf(void *sdh, u32 addr, uint fn, uint flags,
|
||||||
u8 *buf, uint nbytes, void *pkt,
|
u8 *buf, uint nbytes, void *pkt,
|
||||||
bcmsdh_cmplt_fn_t complete, void *handle)
|
bcmsdh_cmplt_fn_t complete, void *handle)
|
||||||
{
|
{
|
||||||
|
@ -514,7 +516,7 @@ bcmsdh_send_buf(void *sdh, u32 addr, uint fn, uint flags,
|
||||||
return -ENOTSUPP;
|
return -ENOTSUPP;
|
||||||
|
|
||||||
if (bar0 != bcmsdh->sbwad) {
|
if (bar0 != bcmsdh->sbwad) {
|
||||||
err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0);
|
err = brcmf_sdcard_set_sbaddr_window(bcmsdh, bar0);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -528,14 +530,13 @@ bcmsdh_send_buf(void *sdh, u32 addr, uint fn, uint flags,
|
||||||
if (width == 4)
|
if (width == 4)
|
||||||
addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
|
addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
|
||||||
|
|
||||||
status = sdioh_request_buffer(bcmsdh->sdioh, SDIOH_DATA_PIO, incr_fix,
|
status = brcmf_sdioh_request_buffer(bcmsdh->sdioh, SDIOH_DATA_PIO,
|
||||||
SDIOH_WRITE, fn, addr, width, nbytes, buf,
|
incr_fix, SDIOH_WRITE, fn, addr, width, nbytes, buf, pkt);
|
||||||
pkt);
|
|
||||||
|
|
||||||
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_rwdata(void *sdh, uint rw, u32 addr, u8 *buf, uint nbytes)
|
int brcmf_sdcard_rwdata(void *sdh, uint rw, u32 addr, u8 *buf, uint nbytes)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
|
@ -547,72 +548,71 @@ int bcmsdh_rwdata(void *sdh, uint rw, u32 addr, u8 *buf, uint nbytes)
|
||||||
addr &= SBSDIO_SB_OFT_ADDR_MASK;
|
addr &= SBSDIO_SB_OFT_ADDR_MASK;
|
||||||
addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
|
addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
|
||||||
|
|
||||||
status =
|
status = brcmf_sdioh_request_buffer(bcmsdh->sdioh, SDIOH_DATA_PIO,
|
||||||
sdioh_request_buffer(bcmsdh->sdioh, SDIOH_DATA_PIO, SDIOH_DATA_INC,
|
SDIOH_DATA_INC, (rw ? SDIOH_WRITE : SDIOH_READ), SDIO_FUNC_1,
|
||||||
(rw ? SDIOH_WRITE : SDIOH_READ), SDIO_FUNC_1,
|
addr, 4, nbytes, buf, NULL);
|
||||||
addr, 4, nbytes, buf, NULL);
|
|
||||||
|
|
||||||
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
return SDIOH_API_SUCCESS(status) ? 0 : -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_abort(void *sdh, uint fn)
|
int brcmf_sdcard_abort(void *sdh, uint fn)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
|
|
||||||
return sdioh_abort(bcmsdh->sdioh, fn);
|
return brcmf_sdioh_abort(bcmsdh->sdioh, fn);
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_start(void *sdh, int stage)
|
int brcmf_sdcard_start(void *sdh, int stage)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
|
|
||||||
return sdioh_start(bcmsdh->sdioh, stage);
|
return brcmf_sdioh_start(bcmsdh->sdioh, stage);
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_stop(void *sdh)
|
int brcmf_sdcard_stop(void *sdh)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
|
|
||||||
return sdioh_stop(bcmsdh->sdioh);
|
return brcmf_sdioh_stop(bcmsdh->sdioh);
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_query_device(void *sdh)
|
int brcmf_sdcard_query_device(void *sdh)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
bcmsdh->vendevid = (PCI_VENDOR_ID_BROADCOM << 16) | 0;
|
bcmsdh->vendevid = (PCI_VENDOR_ID_BROADCOM << 16) | 0;
|
||||||
return bcmsdh->vendevid;
|
return bcmsdh->vendevid;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint bcmsdh_query_iofnum(void *sdh)
|
uint brcmf_sdcard_query_iofnum(void *sdh)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
|
|
||||||
if (!bcmsdh)
|
if (!bcmsdh)
|
||||||
bcmsdh = l_bcmsdh;
|
bcmsdh = l_bcmsdh;
|
||||||
|
|
||||||
return sdioh_query_iofnum(bcmsdh->sdioh);
|
return brcmf_sdioh_query_iofnum(bcmsdh->sdioh);
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_reset(bcmsdh_info_t *sdh)
|
int brcmf_sdcard_reset(bcmsdh_info_t *sdh)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
|
|
||||||
return sdioh_sdio_reset(bcmsdh->sdioh);
|
return brcmf_sdioh_reset(bcmsdh->sdioh);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *bcmsdh_get_sdioh(bcmsdh_info_t *sdh)
|
void *brcmf_sdcard_get_sdioh(bcmsdh_info_t *sdh)
|
||||||
{
|
{
|
||||||
ASSERT(sdh);
|
ASSERT(sdh);
|
||||||
return sdh->sdioh;
|
return sdh->sdioh;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Function to pass device-status bits to DHD. */
|
/* Function to pass device-status bits to DHD. */
|
||||||
u32 bcmsdh_get_dstatus(void *sdh)
|
u32 brcmf_sdcard_get_dstatus(void *sdh)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 bcmsdh_cur_sbwad(void *sdh)
|
u32 brcmf_sdcard_cur_sbwad(void *sdh)
|
||||||
{
|
{
|
||||||
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh;
|
||||||
|
|
||||||
|
@ -622,7 +622,7 @@ u32 bcmsdh_cur_sbwad(void *sdh)
|
||||||
return bcmsdh->sbwad;
|
return bcmsdh->sbwad;
|
||||||
}
|
}
|
||||||
|
|
||||||
void bcmsdh_chipinfo(void *sdh, u32 chip, u32 chiprev)
|
void brcmf_sdcard_chipinfo(void *sdh, u32 chip, u32 chiprev)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
#if defined(OOB_INTR_ONLY)
|
#if defined(OOB_INTR_ONLY)
|
||||||
#include <linux/irq.h>
|
#include <linux/irq.h>
|
||||||
extern void dhdsdio_isr(void *args);
|
extern void brcmf_sdbrcm_isr(void *args);
|
||||||
#endif /* defined(OOB_INTR_ONLY) */
|
#endif /* defined(OOB_INTR_ONLY) */
|
||||||
#if defined(CONFIG_MACH_SANDGATE2G) || defined(CONFIG_MACH_LOGICPD_PXA270)
|
#if defined(CONFIG_MACH_SANDGATE2G) || defined(CONFIG_MACH_LOGICPD_PXA270)
|
||||||
#if !defined(BCMPLATFORM_BUS)
|
#if !defined(BCMPLATFORM_BUS)
|
||||||
|
@ -71,7 +71,7 @@ struct bcmsdh_hc {
|
||||||
};
|
};
|
||||||
static bcmsdh_hc_t *sdhcinfo;
|
static bcmsdh_hc_t *sdhcinfo;
|
||||||
|
|
||||||
/* driver info, initialized when bcmsdh_register is called */
|
/* driver info, initialized when brcmf_sdio_register is called */
|
||||||
static bcmsdh_driver_t drvinfo = { NULL, NULL };
|
static bcmsdh_driver_t drvinfo = { NULL, NULL };
|
||||||
|
|
||||||
/* debugging macros */
|
/* debugging macros */
|
||||||
|
@ -80,7 +80,7 @@ static bcmsdh_driver_t drvinfo = { NULL, NULL };
|
||||||
/**
|
/**
|
||||||
* Checks to see if vendor and device IDs match a supported SDIO Host Controller.
|
* Checks to see if vendor and device IDs match a supported SDIO Host Controller.
|
||||||
*/
|
*/
|
||||||
bool bcmsdh_chipmatch(u16 vendor, u16 device)
|
bool brcmf_sdio_chipmatch(u16 vendor, u16 device)
|
||||||
{
|
{
|
||||||
/* Add other vendors and devices as required */
|
/* Add other vendors and devices as required */
|
||||||
|
|
||||||
|
@ -125,22 +125,22 @@ bool bcmsdh_chipmatch(u16 vendor, u16 device)
|
||||||
#if defined(BCMPLATFORM_BUS)
|
#if defined(BCMPLATFORM_BUS)
|
||||||
#if defined(BCMLXSDMMC)
|
#if defined(BCMLXSDMMC)
|
||||||
/* forward declarations */
|
/* forward declarations */
|
||||||
int bcmsdh_probe(struct device *dev);
|
int brcmf_sdio_probe(struct device *dev);
|
||||||
EXPORT_SYMBOL(bcmsdh_probe);
|
EXPORT_SYMBOL(brcmf_sdio_probe);
|
||||||
|
|
||||||
int bcmsdh_remove(struct device *dev);
|
int brcmf_sdio_remove(struct device *dev);
|
||||||
EXPORT_SYMBOL(bcmsdh_remove);
|
EXPORT_SYMBOL(brcmf_sdio_remove);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* forward declarations */
|
/* forward declarations */
|
||||||
static int __devinit bcmsdh_probe(struct device *dev);
|
static int __devinit brcmf_sdio_probe(struct device *dev);
|
||||||
static int __devexit bcmsdh_remove(struct device *dev);
|
static int __devexit brcmf_sdio_remove(struct device *dev);
|
||||||
#endif /* BCMLXSDMMC */
|
#endif /* BCMLXSDMMC */
|
||||||
|
|
||||||
#ifndef BCMLXSDMMC
|
#ifndef BCMLXSDMMC
|
||||||
static
|
static
|
||||||
#endif /* BCMLXSDMMC */
|
#endif /* BCMLXSDMMC */
|
||||||
int bcmsdh_probe(struct device *dev)
|
int brcmf_sdio_probe(struct device *dev)
|
||||||
{
|
{
|
||||||
bcmsdh_hc_t *sdhc = NULL;
|
bcmsdh_hc_t *sdhc = NULL;
|
||||||
unsigned long regs = 0;
|
unsigned long regs = 0;
|
||||||
|
@ -184,13 +184,13 @@ int bcmsdh_probe(struct device *dev)
|
||||||
sdhc->dev = (void *)dev;
|
sdhc->dev = (void *)dev;
|
||||||
|
|
||||||
#ifdef BCMLXSDMMC
|
#ifdef BCMLXSDMMC
|
||||||
sdh = bcmsdh_attach((void *)0, (void **)®s, irq);
|
sdh = brcmf_sdcard_attach((void *)0, (void **)®s, irq);
|
||||||
if (!sdh) {
|
if (!sdh) {
|
||||||
SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__));
|
SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__));
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
sdh = bcmsdh_attach((void *)r->start, (void **)®s, irq);
|
sdh = brcmf_sdcard_attach((void *)r->start, (void **)®s, irq);
|
||||||
if (!sdh) {
|
if (!sdh) {
|
||||||
SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__));
|
SDLX_MSG(("%s: bcmsdh_attach failed\n", __func__));
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -208,7 +208,7 @@ int bcmsdh_probe(struct device *dev)
|
||||||
sdhc->next = sdhcinfo;
|
sdhc->next = sdhcinfo;
|
||||||
sdhcinfo = sdhc;
|
sdhcinfo = sdhc;
|
||||||
/* Read the vendor/device ID from the CIS */
|
/* Read the vendor/device ID from the CIS */
|
||||||
vendevid = bcmsdh_query_device(sdh);
|
vendevid = brcmf_sdcard_query_device(sdh);
|
||||||
|
|
||||||
/* try to attach to the target device */
|
/* try to attach to the target device */
|
||||||
sdhc->ch = drvinfo.attach((vendevid >> 16), (vendevid & 0xFFFF),
|
sdhc->ch = drvinfo.attach((vendevid >> 16), (vendevid & 0xFFFF),
|
||||||
|
@ -224,7 +224,7 @@ int bcmsdh_probe(struct device *dev)
|
||||||
err:
|
err:
|
||||||
if (sdhc) {
|
if (sdhc) {
|
||||||
if (sdhc->sdh)
|
if (sdhc->sdh)
|
||||||
bcmsdh_detach(sdhc->sdh);
|
brcmf_sdcard_detach(sdhc->sdh);
|
||||||
kfree(sdhc);
|
kfree(sdhc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,13 +234,13 @@ int bcmsdh_probe(struct device *dev)
|
||||||
#ifndef BCMLXSDMMC
|
#ifndef BCMLXSDMMC
|
||||||
static
|
static
|
||||||
#endif /* BCMLXSDMMC */
|
#endif /* BCMLXSDMMC */
|
||||||
int bcmsdh_remove(struct device *dev)
|
int brcmf_sdio_remove(struct device *dev)
|
||||||
{
|
{
|
||||||
bcmsdh_hc_t *sdhc, *prev;
|
bcmsdh_hc_t *sdhc, *prev;
|
||||||
|
|
||||||
sdhc = sdhcinfo;
|
sdhc = sdhcinfo;
|
||||||
drvinfo.detach(sdhc->ch);
|
drvinfo.detach(sdhc->ch);
|
||||||
bcmsdh_detach(sdhc->sdh);
|
brcmf_sdcard_detach(sdhc->sdh);
|
||||||
/* find the SDIO Host Controller state for this pdev
|
/* find the SDIO Host Controller state for this pdev
|
||||||
and take it out from the list */
|
and take it out from the list */
|
||||||
for (sdhc = sdhcinfo, prev = NULL; sdhc; sdhc = sdhc->next) {
|
for (sdhc = sdhcinfo, prev = NULL; sdhc; sdhc = sdhc->next) {
|
||||||
|
@ -269,25 +269,25 @@ int bcmsdh_remove(struct device *dev)
|
||||||
}
|
}
|
||||||
#endif /* BCMPLATFORM_BUS */
|
#endif /* BCMPLATFORM_BUS */
|
||||||
|
|
||||||
extern int sdio_function_init(void);
|
extern int brcmf_sdio_function_init(void);
|
||||||
|
|
||||||
int bcmsdh_register(bcmsdh_driver_t *driver)
|
int brcmf_sdio_register(bcmsdh_driver_t *driver)
|
||||||
{
|
{
|
||||||
drvinfo = *driver;
|
drvinfo = *driver;
|
||||||
|
|
||||||
SDLX_MSG(("Linux Kernel SDIO/MMC Driver\n"));
|
SDLX_MSG(("Linux Kernel SDIO/MMC Driver\n"));
|
||||||
return sdio_function_init();
|
return brcmf_sdio_function_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void sdio_function_cleanup(void);
|
extern void brcmf_sdio_function_cleanup(void);
|
||||||
|
|
||||||
void bcmsdh_unregister(void)
|
void brcmf_sdio_unregister(void)
|
||||||
{
|
{
|
||||||
sdio_function_cleanup();
|
brcmf_sdio_function_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(OOB_INTR_ONLY)
|
#if defined(OOB_INTR_ONLY)
|
||||||
void bcmsdh_oob_intr_set(bool enable)
|
void brcmf_sdio_oob_intr_set(bool enable)
|
||||||
{
|
{
|
||||||
static bool curstate = 1;
|
static bool curstate = 1;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -303,25 +303,25 @@ void bcmsdh_oob_intr_set(bool enable)
|
||||||
spin_unlock_irqrestore(&sdhcinfo->irq_lock, flags);
|
spin_unlock_irqrestore(&sdhcinfo->irq_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t wlan_oob_irq(int irq, void *dev_id)
|
static irqreturn_t brcmf_sdio_oob_irq(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
dhd_pub_t *dhdp;
|
dhd_pub_t *dhdp;
|
||||||
|
|
||||||
dhdp = (dhd_pub_t *) dev_get_drvdata(sdhcinfo->dev);
|
dhdp = (dhd_pub_t *) dev_get_drvdata(sdhcinfo->dev);
|
||||||
|
|
||||||
bcmsdh_oob_intr_set(0);
|
brcmf_sdio_oob_intr_set(0);
|
||||||
|
|
||||||
if (dhdp == NULL) {
|
if (dhdp == NULL) {
|
||||||
SDLX_MSG(("Out of band GPIO interrupt fired way too early\n"));
|
SDLX_MSG(("Out of band GPIO interrupt fired way too early\n"));
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
dhdsdio_isr((void *)dhdp->bus);
|
brcmf_sdbrcm_isr((void *)dhdp->bus);
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bcmsdh_register_oob_intr(void *dhdp)
|
int brcmf_sdio_register_oob_intr(void *dhdp)
|
||||||
{
|
{
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@ int bcmsdh_register_oob_intr(void *dhdp)
|
||||||
/* Refer to customer Host IRQ docs about
|
/* Refer to customer Host IRQ docs about
|
||||||
proper irqflags definition */
|
proper irqflags definition */
|
||||||
error =
|
error =
|
||||||
request_irq(sdhcinfo->oob_irq, wlan_oob_irq,
|
request_irq(sdhcinfo->oob_irq, brcmf_sdio_oob_irq,
|
||||||
sdhcinfo->oob_flags, "bcmsdh_sdmmc", NULL);
|
sdhcinfo->oob_flags, "bcmsdh_sdmmc", NULL);
|
||||||
if (error)
|
if (error)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
@ -350,7 +350,7 @@ int bcmsdh_register_oob_intr(void *dhdp)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void bcmsdh_unregister_oob_intr(void)
|
void brcmf_sdio_unregister_oob_intr(void)
|
||||||
{
|
{
|
||||||
SDLX_MSG(("%s: Enter\n", __func__));
|
SDLX_MSG(("%s: Enter\n", __func__));
|
||||||
|
|
||||||
|
|
|
@ -32,15 +32,15 @@
|
||||||
#include "dhd.h"
|
#include "dhd.h"
|
||||||
#include "bcmsdh_sdmmc.h"
|
#include "bcmsdh_sdmmc.h"
|
||||||
|
|
||||||
extern int sdio_function_init(void);
|
extern int brcmf_sdio_function_init(void);
|
||||||
extern void sdio_function_cleanup(void);
|
extern void brcmf_sdio_function_cleanup(void);
|
||||||
|
|
||||||
#if !defined(OOB_INTR_ONLY)
|
#if !defined(OOB_INTR_ONLY)
|
||||||
static void IRQHandler(struct sdio_func *func);
|
static void brcmf_sdioh_irqhandler(struct sdio_func *func);
|
||||||
static void IRQHandlerF2(struct sdio_func *func);
|
static void brcmf_sdioh_irqhandler_f2(struct sdio_func *func);
|
||||||
#endif /* !defined(OOB_INTR_ONLY) */
|
#endif /* !defined(OOB_INTR_ONLY) */
|
||||||
static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, u32 regaddr);
|
static int brcmf_sdioh_get_cisaddr(sdioh_info_t *sd, u32 regaddr);
|
||||||
extern int sdio_reset_comm(struct mmc_card *card);
|
extern int brcmf_sdioh_reset_comm(struct mmc_card *card);
|
||||||
|
|
||||||
extern PBCMSDH_SDMMC_INSTANCE gInstance;
|
extern PBCMSDH_SDMMC_INSTANCE gInstance;
|
||||||
|
|
||||||
|
@ -54,17 +54,17 @@ DHD_PM_RESUME_WAIT_INIT(sdioh_request_buffer_wait);
|
||||||
|
|
||||||
#define DMA_ALIGN_MASK 0x03
|
#define DMA_ALIGN_MASK 0x03
|
||||||
|
|
||||||
int sdioh_sdmmc_card_regread(sdioh_info_t *sd, int func, u32 regaddr,
|
int brcmf_sdioh_card_regread(sdioh_info_t *sd, int func, u32 regaddr,
|
||||||
int regsize, u32 *data);
|
int regsize, u32 *data);
|
||||||
|
|
||||||
void sdioh_sdio_set_host_pm_flags(int flag)
|
void brcmf_sdioh_set_host_pm_flags(int flag)
|
||||||
{
|
{
|
||||||
if (sdio_set_host_pm_flags(gInstance->func[1], flag))
|
if (sdio_set_host_pm_flags(gInstance->func[1], flag))
|
||||||
printk(KERN_ERR "%s: Failed to set pm_flags 0x%08x\n",\
|
printk(KERN_ERR "%s: Failed to set pm_flags 0x%08x\n",\
|
||||||
__func__, (unsigned int)flag);
|
__func__, (unsigned int)flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd)
|
static int brcmf_sdioh_enablefuncs(sdioh_info_t *sd)
|
||||||
{
|
{
|
||||||
int err_ret;
|
int err_ret;
|
||||||
u32 fbraddr;
|
u32 fbraddr;
|
||||||
|
@ -73,7 +73,7 @@ static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd)
|
||||||
sd_trace(("%s\n", __func__));
|
sd_trace(("%s\n", __func__));
|
||||||
|
|
||||||
/* Get the Card's common CIS address */
|
/* Get the Card's common CIS address */
|
||||||
sd->com_cis_ptr = sdioh_sdmmc_get_cisaddr(sd, SDIO_CCCR_CIS);
|
sd->com_cis_ptr = brcmf_sdioh_get_cisaddr(sd, SDIO_CCCR_CIS);
|
||||||
sd->func_cis_ptr[0] = sd->com_cis_ptr;
|
sd->func_cis_ptr[0] = sd->com_cis_ptr;
|
||||||
sd_info(("%s: Card's Common CIS Ptr = 0x%x\n", __func__,
|
sd_info(("%s: Card's Common CIS Ptr = 0x%x\n", __func__,
|
||||||
sd->com_cis_ptr));
|
sd->com_cis_ptr));
|
||||||
|
@ -82,7 +82,7 @@ static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd)
|
||||||
for (fbraddr = SDIO_FBR_BASE(1), func = 1;
|
for (fbraddr = SDIO_FBR_BASE(1), func = 1;
|
||||||
func <= sd->num_funcs; func++, fbraddr += SDIOD_FBR_SIZE) {
|
func <= sd->num_funcs; func++, fbraddr += SDIOD_FBR_SIZE) {
|
||||||
sd->func_cis_ptr[func] =
|
sd->func_cis_ptr[func] =
|
||||||
sdioh_sdmmc_get_cisaddr(sd, SDIO_FBR_CIS + fbraddr);
|
brcmf_sdioh_get_cisaddr(sd, SDIO_FBR_CIS + fbraddr);
|
||||||
sd_info(("%s: Function %d CIS Ptr = 0x%x\n", __func__, func,
|
sd_info(("%s: Function %d CIS Ptr = 0x%x\n", __func__, func,
|
||||||
sd->func_cis_ptr[func]));
|
sd->func_cis_ptr[func]));
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ static int sdioh_sdmmc_card_enablefuncs(sdioh_info_t *sd)
|
||||||
/*
|
/*
|
||||||
* Public entry points & extern's
|
* Public entry points & extern's
|
||||||
*/
|
*/
|
||||||
sdioh_info_t *sdioh_attach(void *bar0, uint irq)
|
sdioh_info_t *brcmf_sdioh_attach(void *bar0, uint irq)
|
||||||
{
|
{
|
||||||
sdioh_info_t *sd;
|
sdioh_info_t *sd;
|
||||||
int err_ret;
|
int err_ret;
|
||||||
|
@ -123,7 +123,7 @@ sdioh_info_t *sdioh_attach(void *bar0, uint irq)
|
||||||
sd_err(("sdioh_attach: out of memory\n"));
|
sd_err(("sdioh_attach: out of memory\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (sdioh_sdmmc_osinit(sd) != 0) {
|
if (brcmf_sdioh_osinit(sd) != 0) {
|
||||||
sd_err(("%s:sdioh_sdmmc_osinit() failed\n", __func__));
|
sd_err(("%s:sdioh_sdmmc_osinit() failed\n", __func__));
|
||||||
kfree(sd);
|
kfree(sd);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -161,13 +161,13 @@ sdioh_info_t *sdioh_attach(void *bar0, uint irq)
|
||||||
sdio_release_host(gInstance->func[2]);
|
sdio_release_host(gInstance->func[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
sdioh_sdmmc_card_enablefuncs(sd);
|
brcmf_sdioh_enablefuncs(sd);
|
||||||
|
|
||||||
sd_trace(("%s: Done\n", __func__));
|
sd_trace(("%s: Done\n", __func__));
|
||||||
return sd;
|
return sd;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern SDIOH_API_RC sdioh_detach(sdioh_info_t *sd)
|
extern SDIOH_API_RC brcmf_sdioh_detach(sdioh_info_t *sd)
|
||||||
{
|
{
|
||||||
sd_trace(("%s\n", __func__));
|
sd_trace(("%s\n", __func__));
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ extern SDIOH_API_RC sdioh_detach(sdioh_info_t *sd)
|
||||||
sdio_release_host(gInstance->func[1]);
|
sdio_release_host(gInstance->func[1]);
|
||||||
|
|
||||||
/* deregister irq */
|
/* deregister irq */
|
||||||
sdioh_sdmmc_osfree(sd);
|
brcmf_sdioh_osfree(sd);
|
||||||
|
|
||||||
kfree(sd);
|
kfree(sd);
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,7 @@ extern SDIOH_API_RC sdioh_detach(sdioh_info_t *sd)
|
||||||
|
|
||||||
#if defined(OOB_INTR_ONLY) && defined(HW_OOB)
|
#if defined(OOB_INTR_ONLY) && defined(HW_OOB)
|
||||||
|
|
||||||
extern SDIOH_API_RC sdioh_enable_func_intr(void)
|
extern SDIOH_API_RC brcmf_sdioh_enable_func_intr(void)
|
||||||
{
|
{
|
||||||
u8 reg;
|
u8 reg;
|
||||||
int err;
|
int err;
|
||||||
|
@ -227,7 +227,7 @@ extern SDIOH_API_RC sdioh_enable_func_intr(void)
|
||||||
return SDIOH_API_RC_SUCCESS;
|
return SDIOH_API_RC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern SDIOH_API_RC sdioh_disable_func_intr(void)
|
extern SDIOH_API_RC brcmf_sdioh_disable_func_intr(void)
|
||||||
{
|
{
|
||||||
u8 reg;
|
u8 reg;
|
||||||
int err;
|
int err;
|
||||||
|
@ -261,7 +261,7 @@ extern SDIOH_API_RC sdioh_disable_func_intr(void)
|
||||||
|
|
||||||
/* Configure callback to client when we receive client interrupt */
|
/* Configure callback to client when we receive client interrupt */
|
||||||
extern SDIOH_API_RC
|
extern SDIOH_API_RC
|
||||||
sdioh_interrupt_register(sdioh_info_t *sd, sdioh_cb_fn_t fn, void *argh)
|
brcmf_sdioh_interrupt_register(sdioh_info_t *sd, sdioh_cb_fn_t fn, void *argh)
|
||||||
{
|
{
|
||||||
sd_trace(("%s: Entering\n", __func__));
|
sd_trace(("%s: Entering\n", __func__));
|
||||||
if (fn == NULL) {
|
if (fn == NULL) {
|
||||||
|
@ -277,22 +277,22 @@ sdioh_interrupt_register(sdioh_info_t *sd, sdioh_cb_fn_t fn, void *argh)
|
||||||
/* register and unmask irq */
|
/* register and unmask irq */
|
||||||
if (gInstance->func[2]) {
|
if (gInstance->func[2]) {
|
||||||
sdio_claim_host(gInstance->func[2]);
|
sdio_claim_host(gInstance->func[2]);
|
||||||
sdio_claim_irq(gInstance->func[2], IRQHandlerF2);
|
sdio_claim_irq(gInstance->func[2], brcmf_sdioh_irqhandler_f2);
|
||||||
sdio_release_host(gInstance->func[2]);
|
sdio_release_host(gInstance->func[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gInstance->func[1]) {
|
if (gInstance->func[1]) {
|
||||||
sdio_claim_host(gInstance->func[1]);
|
sdio_claim_host(gInstance->func[1]);
|
||||||
sdio_claim_irq(gInstance->func[1], IRQHandler);
|
sdio_claim_irq(gInstance->func[1], brcmf_sdioh_irqhandler);
|
||||||
sdio_release_host(gInstance->func[1]);
|
sdio_release_host(gInstance->func[1]);
|
||||||
}
|
}
|
||||||
#elif defined(HW_OOB)
|
#elif defined(HW_OOB)
|
||||||
sdioh_enable_func_intr();
|
brcmf_sdioh_enable_func_intr();
|
||||||
#endif /* defined(OOB_INTR_ONLY) */
|
#endif /* defined(OOB_INTR_ONLY) */
|
||||||
return SDIOH_API_RC_SUCCESS;
|
return SDIOH_API_RC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern SDIOH_API_RC sdioh_interrupt_deregister(sdioh_info_t *sd)
|
extern SDIOH_API_RC brcmf_sdioh_interrupt_deregister(sdioh_info_t *sd)
|
||||||
{
|
{
|
||||||
sd_trace(("%s: Entering\n", __func__));
|
sd_trace(("%s: Entering\n", __func__));
|
||||||
|
|
||||||
|
@ -316,12 +316,12 @@ extern SDIOH_API_RC sdioh_interrupt_deregister(sdioh_info_t *sd)
|
||||||
sd->intr_handler = NULL;
|
sd->intr_handler = NULL;
|
||||||
sd->intr_handler_arg = NULL;
|
sd->intr_handler_arg = NULL;
|
||||||
#elif defined(HW_OOB)
|
#elif defined(HW_OOB)
|
||||||
sdioh_disable_func_intr();
|
brcmf_sdioh_disable_func_intr();
|
||||||
#endif /* !defined(OOB_INTR_ONLY) */
|
#endif /* !defined(OOB_INTR_ONLY) */
|
||||||
return SDIOH_API_RC_SUCCESS;
|
return SDIOH_API_RC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern SDIOH_API_RC sdioh_interrupt_query(sdioh_info_t *sd, bool *onoff)
|
extern SDIOH_API_RC brcmf_sdioh_interrupt_query(sdioh_info_t *sd, bool *onoff)
|
||||||
{
|
{
|
||||||
sd_trace(("%s: Entering\n", __func__));
|
sd_trace(("%s: Entering\n", __func__));
|
||||||
*onoff = sd->client_intr_enabled;
|
*onoff = sd->client_intr_enabled;
|
||||||
|
@ -329,13 +329,13 @@ extern SDIOH_API_RC sdioh_interrupt_query(sdioh_info_t *sd, bool *onoff)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DHD_DEBUG)
|
#if defined(DHD_DEBUG)
|
||||||
extern bool sdioh_interrupt_pending(sdioh_info_t *sd)
|
extern bool brcmf_sdioh_interrupt_pending(sdioh_info_t *sd)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint sdioh_query_iofnum(sdioh_info_t *sd)
|
uint brcmf_sdioh_query_iofnum(sdioh_info_t *sd)
|
||||||
{
|
{
|
||||||
return sd->num_funcs;
|
return sd->num_funcs;
|
||||||
}
|
}
|
||||||
|
@ -365,8 +365,8 @@ const struct brcmu_iovar sdioh_iovars[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
sdioh_iovar_op(sdioh_info_t *si, const char *name,
|
brcmf_sdioh_iovar_op(sdioh_info_t *si, const char *name,
|
||||||
void *params, int plen, void *arg, int len, bool set)
|
void *params, int plen, void *arg, int len, bool set)
|
||||||
{
|
{
|
||||||
const struct brcmu_iovar *vi = NULL;
|
const struct brcmu_iovar *vi = NULL;
|
||||||
int bcmerror = 0;
|
int bcmerror = 0;
|
||||||
|
@ -499,7 +499,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
|
||||||
sdreg_t *sd_ptr = (sdreg_t *) params;
|
sdreg_t *sd_ptr = (sdreg_t *) params;
|
||||||
u8 data = 0;
|
u8 data = 0;
|
||||||
|
|
||||||
if (sdioh_cfg_read
|
if (brcmf_sdioh_cfg_read
|
||||||
(si, sd_ptr->func, sd_ptr->offset, &data)) {
|
(si, sd_ptr->func, sd_ptr->offset, &data)) {
|
||||||
bcmerror = -EIO;
|
bcmerror = -EIO;
|
||||||
break;
|
break;
|
||||||
|
@ -515,7 +515,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
|
||||||
sdreg_t *sd_ptr = (sdreg_t *) params;
|
sdreg_t *sd_ptr = (sdreg_t *) params;
|
||||||
u8 data = (u8) sd_ptr->value;
|
u8 data = (u8) sd_ptr->value;
|
||||||
|
|
||||||
if (sdioh_cfg_write
|
if (brcmf_sdioh_cfg_write
|
||||||
(si, sd_ptr->func, sd_ptr->offset, &data)) {
|
(si, sd_ptr->func, sd_ptr->offset, &data)) {
|
||||||
bcmerror = -EIO;
|
bcmerror = -EIO;
|
||||||
break;
|
break;
|
||||||
|
@ -534,7 +534,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
|
||||||
|
|
||||||
#if defined(OOB_INTR_ONLY) && defined(HW_OOB)
|
#if defined(OOB_INTR_ONLY) && defined(HW_OOB)
|
||||||
|
|
||||||
SDIOH_API_RC sdioh_enable_hw_oob_intr(sdioh_info_t *sd, bool enable)
|
SDIOH_API_RC brcmf_sdioh_enable_hw_oob_intr(sdioh_info_t *sd, bool enable)
|
||||||
{
|
{
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
u8 data;
|
u8 data;
|
||||||
|
@ -545,37 +545,37 @@ SDIOH_API_RC sdioh_enable_hw_oob_intr(sdioh_info_t *sd, bool enable)
|
||||||
data = 4; /* disable hw oob interrupt */
|
data = 4; /* disable hw oob interrupt */
|
||||||
data |= 4; /* Active HIGH */
|
data |= 4; /* Active HIGH */
|
||||||
|
|
||||||
status = sdioh_request_byte(sd, SDIOH_WRITE, 0, 0xf2, &data);
|
status = brcmf_sdioh_request_byte(sd, SDIOH_WRITE, 0, 0xf2, &data);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
#endif /* defined(OOB_INTR_ONLY) && defined(HW_OOB) */
|
#endif /* defined(OOB_INTR_ONLY) && defined(HW_OOB) */
|
||||||
|
|
||||||
extern SDIOH_API_RC
|
extern SDIOH_API_RC
|
||||||
sdioh_cfg_read(sdioh_info_t *sd, uint fnc_num, u32 addr, u8 *data)
|
brcmf_sdioh_cfg_read(sdioh_info_t *sd, uint fnc_num, u32 addr, u8 *data)
|
||||||
{
|
{
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
/* No lock needed since sdioh_request_byte does locking */
|
/* No lock needed since brcmf_sdioh_request_byte does locking */
|
||||||
status = sdioh_request_byte(sd, SDIOH_READ, fnc_num, addr, data);
|
status = brcmf_sdioh_request_byte(sd, SDIOH_READ, fnc_num, addr, data);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern SDIOH_API_RC
|
extern SDIOH_API_RC
|
||||||
sdioh_cfg_write(sdioh_info_t *sd, uint fnc_num, u32 addr, u8 *data)
|
brcmf_sdioh_cfg_write(sdioh_info_t *sd, uint fnc_num, u32 addr, u8 *data)
|
||||||
{
|
{
|
||||||
/* No lock needed since sdioh_request_byte does locking */
|
/* No lock needed since brcmf_sdioh_request_byte does locking */
|
||||||
SDIOH_API_RC status;
|
SDIOH_API_RC status;
|
||||||
status = sdioh_request_byte(sd, SDIOH_WRITE, fnc_num, addr, data);
|
status = brcmf_sdioh_request_byte(sd, SDIOH_WRITE, fnc_num, addr, data);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, u32 regaddr)
|
static int brcmf_sdioh_get_cisaddr(sdioh_info_t *sd, u32 regaddr)
|
||||||
{
|
{
|
||||||
/* read 24 bits and return valid 17 bit addr */
|
/* read 24 bits and return valid 17 bit addr */
|
||||||
int i;
|
int i;
|
||||||
u32 scratch, regdata;
|
u32 scratch, regdata;
|
||||||
u8 *ptr = (u8 *)&scratch;
|
u8 *ptr = (u8 *)&scratch;
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
if ((sdioh_sdmmc_card_regread(sd, 0, regaddr, 1, ®data)) !=
|
if ((brcmf_sdioh_card_regread(sd, 0, regaddr, 1, ®data)) !=
|
||||||
SUCCESS)
|
SUCCESS)
|
||||||
sd_err(("%s: Can't read!\n", __func__));
|
sd_err(("%s: Can't read!\n", __func__));
|
||||||
|
|
||||||
|
@ -590,7 +590,7 @@ static int sdioh_sdmmc_get_cisaddr(sdioh_info_t *sd, u32 regaddr)
|
||||||
}
|
}
|
||||||
|
|
||||||
extern SDIOH_API_RC
|
extern SDIOH_API_RC
|
||||||
sdioh_cis_read(sdioh_info_t *sd, uint func, u8 *cisd, u32 length)
|
brcmf_sdioh_cis_read(sdioh_info_t *sd, uint func, u8 *cisd, u32 length)
|
||||||
{
|
{
|
||||||
u32 count;
|
u32 count;
|
||||||
int offset;
|
int offset;
|
||||||
|
@ -610,7 +610,7 @@ sdioh_cis_read(sdioh_info_t *sd, uint func, u8 *cisd, u32 length)
|
||||||
|
|
||||||
for (count = 0; count < length; count++) {
|
for (count = 0; count < length; count++) {
|
||||||
offset = sd->func_cis_ptr[func] + count;
|
offset = sd->func_cis_ptr[func] + count;
|
||||||
if (sdioh_sdmmc_card_regread(sd, 0, offset, 1, &foo) < 0) {
|
if (brcmf_sdioh_card_regread(sd, 0, offset, 1, &foo) < 0) {
|
||||||
sd_err(("%s: regread failed: Can't read CIS\n",
|
sd_err(("%s: regread failed: Can't read CIS\n",
|
||||||
__func__));
|
__func__));
|
||||||
return SDIOH_API_RC_FAIL;
|
return SDIOH_API_RC_FAIL;
|
||||||
|
@ -624,7 +624,7 @@ sdioh_cis_read(sdioh_info_t *sd, uint func, u8 *cisd, u32 length)
|
||||||
}
|
}
|
||||||
|
|
||||||
extern SDIOH_API_RC
|
extern SDIOH_API_RC
|
||||||
sdioh_request_byte(sdioh_info_t *sd, uint rw, uint func, uint regaddr,
|
brcmf_sdioh_request_byte(sdioh_info_t *sd, uint rw, uint func, uint regaddr,
|
||||||
u8 *byte)
|
u8 *byte)
|
||||||
{
|
{
|
||||||
int err_ret;
|
int err_ret;
|
||||||
|
@ -723,7 +723,7 @@ sdioh_request_byte(sdioh_info_t *sd, uint rw, uint func, uint regaddr,
|
||||||
}
|
}
|
||||||
|
|
||||||
extern SDIOH_API_RC
|
extern SDIOH_API_RC
|
||||||
sdioh_request_word(sdioh_info_t *sd, uint cmd_type, uint rw, uint func,
|
brcmf_sdioh_request_word(sdioh_info_t *sd, uint cmd_type, uint rw, uint func,
|
||||||
uint addr, u32 *word, uint nbytes)
|
uint addr, u32 *word, uint nbytes)
|
||||||
{
|
{
|
||||||
int err_ret = SDIOH_API_RC_FAIL;
|
int err_ret = SDIOH_API_RC_FAIL;
|
||||||
|
@ -776,8 +776,8 @@ sdioh_request_word(sdioh_info_t *sd, uint cmd_type, uint rw, uint func,
|
||||||
}
|
}
|
||||||
|
|
||||||
static SDIOH_API_RC
|
static SDIOH_API_RC
|
||||||
sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func,
|
brcmf_sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write,
|
||||||
uint addr, struct sk_buff *pkt)
|
uint func, uint addr, struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
bool fifo = (fix_inc == SDIOH_DATA_FIX);
|
bool fifo = (fix_inc == SDIOH_DATA_FIX);
|
||||||
u32 SGCount = 0;
|
u32 SGCount = 0;
|
||||||
|
@ -807,7 +807,7 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func,
|
||||||
#endif /* CONFIG_MMC_MSM7X00A */
|
#endif /* CONFIG_MMC_MSM7X00A */
|
||||||
/* Make sure the packet is aligned properly.
|
/* Make sure the packet is aligned properly.
|
||||||
* If it isn't, then this
|
* If it isn't, then this
|
||||||
* is the fault of sdioh_request_buffer() which
|
* is the fault of brcmf_sdioh_request_buffer() which
|
||||||
* is supposed to give
|
* is supposed to give
|
||||||
* us something we can work with.
|
* us something we can work with.
|
||||||
*/
|
*/
|
||||||
|
@ -872,9 +872,9 @@ sdioh_request_packet(sdioh_info_t *sd, uint fix_inc, uint write, uint func,
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
extern SDIOH_API_RC
|
extern SDIOH_API_RC
|
||||||
sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
|
brcmf_sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc,
|
||||||
uint func, uint addr, uint reg_width, uint buflen_u,
|
uint write, uint func, uint addr, uint reg_width,
|
||||||
u8 *buffer, struct sk_buff *pkt)
|
uint buflen_u, u8 *buffer, struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
SDIOH_API_RC Status;
|
SDIOH_API_RC Status;
|
||||||
struct sk_buff *mypkt = NULL;
|
struct sk_buff *mypkt = NULL;
|
||||||
|
@ -898,8 +898,8 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
|
||||||
if (write)
|
if (write)
|
||||||
memcpy(mypkt->data, buffer, buflen_u);
|
memcpy(mypkt->data, buffer, buflen_u);
|
||||||
|
|
||||||
Status =
|
Status = brcmf_sdioh_request_packet(sd, fix_inc, write, func,
|
||||||
sdioh_request_packet(sd, fix_inc, write, func, addr, mypkt);
|
addr, mypkt);
|
||||||
|
|
||||||
/* For a read, copy the packet data back to the buffer. */
|
/* For a read, copy the packet data back to the buffer. */
|
||||||
if (!write)
|
if (!write)
|
||||||
|
@ -925,8 +925,8 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
|
||||||
if (write)
|
if (write)
|
||||||
memcpy(mypkt->data, pkt->data, pkt->len);
|
memcpy(mypkt->data, pkt->data, pkt->len);
|
||||||
|
|
||||||
Status =
|
Status = brcmf_sdioh_request_packet(sd, fix_inc, write, func,
|
||||||
sdioh_request_packet(sd, fix_inc, write, func, addr, mypkt);
|
addr, mypkt);
|
||||||
|
|
||||||
/* For a read, copy the packet data back to the buffer. */
|
/* For a read, copy the packet data back to the buffer. */
|
||||||
if (!write)
|
if (!write)
|
||||||
|
@ -937,15 +937,15 @@ sdioh_request_buffer(sdioh_info_t *sd, uint pio_dma, uint fix_inc, uint write,
|
||||||
it is aligned. */
|
it is aligned. */
|
||||||
sd_data(("%s: Aligned %s Packet, direct DMA\n",
|
sd_data(("%s: Aligned %s Packet, direct DMA\n",
|
||||||
__func__, write ? "Tx" : "Rx"));
|
__func__, write ? "Tx" : "Rx"));
|
||||||
Status =
|
Status = brcmf_sdioh_request_packet(sd, fix_inc, write, func,
|
||||||
sdioh_request_packet(sd, fix_inc, write, func, addr, pkt);
|
addr, pkt);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* this function performs "abort" for both of host & device */
|
/* this function performs "abort" for both of host & device */
|
||||||
extern int sdioh_abort(sdioh_info_t *sd, uint func)
|
extern int brcmf_sdioh_abort(sdioh_info_t *sd, uint func)
|
||||||
{
|
{
|
||||||
#if defined(MMC_SDIO_ABORT)
|
#if defined(MMC_SDIO_ABORT)
|
||||||
char t_func = (char)func;
|
char t_func = (char)func;
|
||||||
|
@ -954,7 +954,7 @@ extern int sdioh_abort(sdioh_info_t *sd, uint func)
|
||||||
|
|
||||||
#if defined(MMC_SDIO_ABORT)
|
#if defined(MMC_SDIO_ABORT)
|
||||||
/* issue abort cmd52 command through F0 */
|
/* issue abort cmd52 command through F0 */
|
||||||
sdioh_request_byte(sd, SDIOH_WRITE, SDIO_FUNC_0, SDIO_CCCR_ABORT,
|
brcmf_sdioh_request_byte(sd, SDIOH_WRITE, SDIO_FUNC_0, SDIO_CCCR_ABORT,
|
||||||
&t_func);
|
&t_func);
|
||||||
#endif /* defined(MMC_SDIO_ABORT) */
|
#endif /* defined(MMC_SDIO_ABORT) */
|
||||||
|
|
||||||
|
@ -963,7 +963,7 @@ extern int sdioh_abort(sdioh_info_t *sd, uint func)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset and re-initialize the device */
|
/* Reset and re-initialize the device */
|
||||||
int sdioh_sdio_reset(sdioh_info_t *si)
|
int brcmf_sdioh_reset(sdioh_info_t *si)
|
||||||
{
|
{
|
||||||
sd_trace(("%s: Enter\n", __func__));
|
sd_trace(("%s: Enter\n", __func__));
|
||||||
sd_trace(("%s: Exit\n", __func__));
|
sd_trace(("%s: Exit\n", __func__));
|
||||||
|
@ -971,14 +971,14 @@ int sdioh_sdio_reset(sdioh_info_t *si)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable device interrupt */
|
/* Disable device interrupt */
|
||||||
void sdioh_sdmmc_devintr_off(sdioh_info_t *sd)
|
void brcmf_sdioh_dev_intr_off(sdioh_info_t *sd)
|
||||||
{
|
{
|
||||||
sd_trace(("%s: %d\n", __func__, sd->use_client_ints));
|
sd_trace(("%s: %d\n", __func__, sd->use_client_ints));
|
||||||
sd->intmask &= ~CLIENT_INTR;
|
sd->intmask &= ~CLIENT_INTR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable device interrupt */
|
/* Enable device interrupt */
|
||||||
void sdioh_sdmmc_devintr_on(sdioh_info_t *sd)
|
void brcmf_sdioh_dev_intr_on(sdioh_info_t *sd)
|
||||||
{
|
{
|
||||||
sd_trace(("%s: %d\n", __func__, sd->use_client_ints));
|
sd_trace(("%s: %d\n", __func__, sd->use_client_ints));
|
||||||
sd->intmask |= CLIENT_INTR;
|
sd->intmask |= CLIENT_INTR;
|
||||||
|
@ -986,19 +986,19 @@ void sdioh_sdmmc_devintr_on(sdioh_info_t *sd)
|
||||||
|
|
||||||
/* Read client card reg */
|
/* Read client card reg */
|
||||||
int
|
int
|
||||||
sdioh_sdmmc_card_regread(sdioh_info_t *sd, int func, u32 regaddr,
|
brcmf_sdioh_card_regread(sdioh_info_t *sd, int func, u32 regaddr,
|
||||||
int regsize, u32 *data)
|
int regsize, u32 *data)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((func == 0) || (regsize == 1)) {
|
if ((func == 0) || (regsize == 1)) {
|
||||||
u8 temp = 0;
|
u8 temp = 0;
|
||||||
|
|
||||||
sdioh_request_byte(sd, SDIOH_READ, func, regaddr, &temp);
|
brcmf_sdioh_request_byte(sd, SDIOH_READ, func, regaddr, &temp);
|
||||||
*data = temp;
|
*data = temp;
|
||||||
*data &= 0xff;
|
*data &= 0xff;
|
||||||
sd_data(("%s: byte read data=0x%02x\n", __func__, *data));
|
sd_data(("%s: byte read data=0x%02x\n", __func__, *data));
|
||||||
} else {
|
} else {
|
||||||
sdioh_request_word(sd, 0, SDIOH_READ, func, regaddr, data,
|
brcmf_sdioh_request_word(sd, 0, SDIOH_READ, func, regaddr, data,
|
||||||
regsize);
|
regsize);
|
||||||
if (regsize == 2)
|
if (regsize == 2)
|
||||||
*data &= 0xffff;
|
*data &= 0xffff;
|
||||||
|
@ -1011,7 +1011,7 @@ sdioh_sdmmc_card_regread(sdioh_info_t *sd, int func, u32 regaddr,
|
||||||
|
|
||||||
#if !defined(OOB_INTR_ONLY)
|
#if !defined(OOB_INTR_ONLY)
|
||||||
/* bcmsdh_sdmmc interrupt handler */
|
/* bcmsdh_sdmmc interrupt handler */
|
||||||
static void IRQHandler(struct sdio_func *func)
|
static void brcmf_sdioh_irqhandler(struct sdio_func *func)
|
||||||
{
|
{
|
||||||
sdioh_info_t *sd;
|
sdioh_info_t *sd;
|
||||||
|
|
||||||
|
@ -1037,7 +1037,7 @@ static void IRQHandler(struct sdio_func *func)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* bcmsdh_sdmmc interrupt handler for F2 (dummy handler) */
|
/* bcmsdh_sdmmc interrupt handler for F2 (dummy handler) */
|
||||||
static void IRQHandlerF2(struct sdio_func *func)
|
static void brcmf_sdioh_irqhandler_f2(struct sdio_func *func)
|
||||||
{
|
{
|
||||||
sdioh_info_t *sd;
|
sdioh_info_t *sd;
|
||||||
|
|
||||||
|
@ -1052,7 +1052,7 @@ static void IRQHandlerF2(struct sdio_func *func)
|
||||||
#ifdef NOTUSED
|
#ifdef NOTUSED
|
||||||
/* Write client card reg */
|
/* Write client card reg */
|
||||||
static int
|
static int
|
||||||
sdioh_sdmmc_card_regwrite(sdioh_info_t *sd, int func, u32 regaddr,
|
brcmf_sdioh_card_regwrite(sdioh_info_t *sd, int func, u32 regaddr,
|
||||||
int regsize, u32 data)
|
int regsize, u32 data)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1060,14 +1060,14 @@ sdioh_sdmmc_card_regwrite(sdioh_info_t *sd, int func, u32 regaddr,
|
||||||
u8 temp;
|
u8 temp;
|
||||||
|
|
||||||
temp = data & 0xff;
|
temp = data & 0xff;
|
||||||
sdioh_request_byte(sd, SDIOH_READ, func, regaddr, &temp);
|
brcmf_sdioh_request_byte(sd, SDIOH_READ, func, regaddr, &temp);
|
||||||
sd_data(("%s: byte write data=0x%02x\n", __func__, data));
|
sd_data(("%s: byte write data=0x%02x\n", __func__, data));
|
||||||
} else {
|
} else {
|
||||||
if (regsize == 2)
|
if (regsize == 2)
|
||||||
data &= 0xffff;
|
data &= 0xffff;
|
||||||
|
|
||||||
sdioh_request_word(sd, 0, SDIOH_READ, func, regaddr, &data,
|
brcmf_sdioh_request_word(sd, 0, SDIOH_READ, func, regaddr,
|
||||||
regsize);
|
&data, regsize);
|
||||||
|
|
||||||
sd_data(("%s: word write data=0x%08x\n", __func__, data));
|
sd_data(("%s: word write data=0x%08x\n", __func__, data));
|
||||||
}
|
}
|
||||||
|
@ -1076,12 +1076,12 @@ sdioh_sdmmc_card_regwrite(sdioh_info_t *sd, int func, u32 regaddr,
|
||||||
}
|
}
|
||||||
#endif /* NOTUSED */
|
#endif /* NOTUSED */
|
||||||
|
|
||||||
int sdioh_start(sdioh_info_t *si, int stage)
|
int brcmf_sdioh_start(sdioh_info_t *si, int stage)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sdioh_stop(sdioh_info_t *si)
|
int brcmf_sdioh_stop(sdioh_info_t *si)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,10 @@
|
||||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* BCMSDH Function Driver for the native SDIO/MMC driver in the Linux Kernel
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef __BCMSDH_SDMMC_H__
|
#ifndef __BCMSDH_SDMMC_H__
|
||||||
#define __BCMSDH_SDMMC_H__
|
#define __BCMSDH_SDMMC_H__
|
||||||
|
|
||||||
|
@ -58,8 +62,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Allocate/init/free per-OS private data */
|
/* Allocate/init/free per-OS private data */
|
||||||
extern int sdioh_sdmmc_osinit(sdioh_info_t *sd);
|
extern int brcmf_sdioh_osinit(sdioh_info_t *sd);
|
||||||
extern void sdioh_sdmmc_osfree(sdioh_info_t *sd);
|
extern void brcmf_sdioh_osfree(sdioh_info_t *sd);
|
||||||
|
|
||||||
#define BLOCK_SIZE_64 64
|
#define BLOCK_SIZE_64 64
|
||||||
#define BLOCK_SIZE_512 512
|
#define BLOCK_SIZE_512 512
|
||||||
|
@ -105,23 +109,23 @@ struct sdioh_info {
|
||||||
extern uint sd_msglevel;
|
extern uint sd_msglevel;
|
||||||
|
|
||||||
/* OS-independent interrupt handler */
|
/* OS-independent interrupt handler */
|
||||||
extern bool check_client_intr(sdioh_info_t *sd);
|
extern bool brcmf_sdioh_check_client_intr(sdioh_info_t *sd);
|
||||||
|
|
||||||
/* Core interrupt enable/disable of device interrupts */
|
/* Core interrupt enable/disable of device interrupts */
|
||||||
extern void sdioh_sdmmc_devintr_on(sdioh_info_t *sd);
|
extern void brcmf_sdioh_dev_intr_on(sdioh_info_t *sd);
|
||||||
extern void sdioh_sdmmc_devintr_off(sdioh_info_t *sd);
|
extern void brcmf_sdioh_dev_intr_off(sdioh_info_t *sd);
|
||||||
|
|
||||||
/**************************************************************
|
/**************************************************************
|
||||||
* Internal interfaces: bcmsdh_sdmmc.c references to per-port code
|
* Internal interfaces: bcmsdh_sdmmc.c references to per-port code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Register mapping routines */
|
/* Register mapping routines */
|
||||||
extern u32 *sdioh_sdmmc_reg_map(s32 addr, int size);
|
extern u32 *brcmf_sdioh_reg_map(s32 addr, int size);
|
||||||
extern void sdioh_sdmmc_reg_unmap(s32 addr, int size);
|
extern void brcmf_sdioh_reg_unmap(s32 addr, int size);
|
||||||
|
|
||||||
/* Interrupt (de)registration routines */
|
/* Interrupt (de)registration routines */
|
||||||
extern int sdioh_sdmmc_register_irq(sdioh_info_t *sd, uint irq);
|
extern int brcmf_sdioh_register_irq(sdioh_info_t *sd, uint irq);
|
||||||
extern void sdioh_sdmmc_free_irq(uint irq, sdioh_info_t *sd);
|
extern void brcmf_sdioh_free_irq(uint irq, sdioh_info_t *sd);
|
||||||
|
|
||||||
typedef struct _BCMSDH_SDMMC_INSTANCE {
|
typedef struct _BCMSDH_SDMMC_INSTANCE {
|
||||||
sdioh_info_t *sd;
|
sdioh_info_t *sd;
|
||||||
|
|
|
@ -55,11 +55,11 @@
|
||||||
#include "dhd_dbg.h"
|
#include "dhd_dbg.h"
|
||||||
#include "wl_cfg80211.h"
|
#include "wl_cfg80211.h"
|
||||||
|
|
||||||
extern void sdioh_sdmmc_devintr_off(sdioh_info_t *sd);
|
extern void brcmf_sdioh_dev_intr_off(sdioh_info_t *sd);
|
||||||
extern void sdioh_sdmmc_devintr_on(sdioh_info_t *sd);
|
extern void brcmf_sdioh_dev_intr_on(sdioh_info_t *sd);
|
||||||
|
|
||||||
int sdio_function_init(void);
|
int brcmf_sdio_function_init(void);
|
||||||
void sdio_function_cleanup(void);
|
void brcmf_sdio_function_cleanup(void);
|
||||||
|
|
||||||
/* module param defaults */
|
/* module param defaults */
|
||||||
static int clockoverride;
|
static int clockoverride;
|
||||||
|
@ -72,11 +72,11 @@ PBCMSDH_SDMMC_INSTANCE gInstance;
|
||||||
/* Maximum number of bcmsdh_sdmmc devices supported by driver */
|
/* Maximum number of bcmsdh_sdmmc devices supported by driver */
|
||||||
#define BCMSDH_SDMMC_MAX_DEVICES 1
|
#define BCMSDH_SDMMC_MAX_DEVICES 1
|
||||||
|
|
||||||
extern int bcmsdh_probe(struct device *dev);
|
extern int brcmf_sdio_probe(struct device *dev);
|
||||||
extern int bcmsdh_remove(struct device *dev);
|
extern int brcmf_sdio_remove(struct device *dev);
|
||||||
struct device sdmmc_dev;
|
struct device sdmmc_dev;
|
||||||
|
|
||||||
static int bcmsdh_sdmmc_probe(struct sdio_func *func,
|
static int brcmf_ops_sdio_probe(struct sdio_func *func,
|
||||||
const struct sdio_device_id *id)
|
const struct sdio_device_id *id)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -93,8 +93,8 @@ static int bcmsdh_sdmmc_probe(struct sdio_func *func,
|
||||||
gInstance->func[0] = &sdio_func_0;
|
gInstance->func[0] = &sdio_func_0;
|
||||||
if (func->device == 0x4) { /* 4318 */
|
if (func->device == 0x4) { /* 4318 */
|
||||||
gInstance->func[2] = NULL;
|
gInstance->func[2] = NULL;
|
||||||
sd_trace(("NIC found, calling bcmsdh_probe...\n"));
|
sd_trace(("NIC found, calling brcmf_sdio_probe...\n"));
|
||||||
ret = bcmsdh_probe(&sdmmc_dev);
|
ret = brcmf_sdio_probe(&sdmmc_dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,24 +102,24 @@ static int bcmsdh_sdmmc_probe(struct sdio_func *func,
|
||||||
|
|
||||||
if (func->num == 2) {
|
if (func->num == 2) {
|
||||||
wl_cfg80211_sdio_func(func);
|
wl_cfg80211_sdio_func(func);
|
||||||
sd_trace(("F2 found, calling bcmsdh_probe...\n"));
|
sd_trace(("F2 found, calling brcmf_sdio_probe...\n"));
|
||||||
ret = bcmsdh_probe(&sdmmc_dev);
|
ret = brcmf_sdio_probe(&sdmmc_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bcmsdh_sdmmc_remove(struct sdio_func *func)
|
static void brcmf_ops_sdio_remove(struct sdio_func *func)
|
||||||
{
|
{
|
||||||
sd_trace(("bcmsdh_sdmmc: %s Enter\n", __func__));
|
sd_trace(("%s Enter\n", __func__));
|
||||||
sd_info(("sdio_bcmsdh: func->class=%x\n", func->class));
|
sd_info(("func->class=%x\n", func->class));
|
||||||
sd_info(("sdio_vendor: 0x%04x\n", func->vendor));
|
sd_info(("sdio_vendor: 0x%04x\n", func->vendor));
|
||||||
sd_info(("sdio_device: 0x%04x\n", func->device));
|
sd_info(("sdio_device: 0x%04x\n", func->device));
|
||||||
sd_info(("Function#: 0x%04x\n", func->num));
|
sd_info(("Function#: 0x%04x\n", func->num));
|
||||||
|
|
||||||
if (func->num == 2) {
|
if (func->num == 2) {
|
||||||
sd_trace(("F2 found, calling bcmsdh_remove...\n"));
|
sd_trace(("F2 found, calling brcmf_sdio_remove...\n"));
|
||||||
bcmsdh_remove(&sdmmc_dev);
|
brcmf_sdio_remove(&sdmmc_dev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,8 +137,8 @@ static const struct sdio_device_id bcmsdh_sdmmc_ids[] = {
|
||||||
MODULE_DEVICE_TABLE(sdio, bcmsdh_sdmmc_ids);
|
MODULE_DEVICE_TABLE(sdio, bcmsdh_sdmmc_ids);
|
||||||
|
|
||||||
static struct sdio_driver bcmsdh_sdmmc_driver = {
|
static struct sdio_driver bcmsdh_sdmmc_driver = {
|
||||||
.probe = bcmsdh_sdmmc_probe,
|
.probe = brcmf_ops_sdio_probe,
|
||||||
.remove = bcmsdh_sdmmc_remove,
|
.remove = brcmf_ops_sdio_remove,
|
||||||
.name = "brcmfmac",
|
.name = "brcmfmac",
|
||||||
.id_table = bcmsdh_sdmmc_ids,
|
.id_table = bcmsdh_sdmmc_ids,
|
||||||
};
|
};
|
||||||
|
@ -148,7 +148,7 @@ struct sdos_info {
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
int sdioh_sdmmc_osinit(sdioh_info_t *sd)
|
int brcmf_sdioh_osinit(sdioh_info_t *sd)
|
||||||
{
|
{
|
||||||
struct sdos_info *sdos;
|
struct sdos_info *sdos;
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ int sdioh_sdmmc_osinit(sdioh_info_t *sd)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sdioh_sdmmc_osfree(sdioh_info_t *sd)
|
void brcmf_sdioh_osfree(sdioh_info_t *sd)
|
||||||
{
|
{
|
||||||
struct sdos_info *sdos;
|
struct sdos_info *sdos;
|
||||||
ASSERT(sd && sd->sdos_info);
|
ASSERT(sd && sd->sdos_info);
|
||||||
|
@ -172,7 +172,7 @@ void sdioh_sdmmc_osfree(sdioh_info_t *sd)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Interrupt enable/disable */
|
/* Interrupt enable/disable */
|
||||||
SDIOH_API_RC sdioh_interrupt_set(sdioh_info_t *sd, bool enable)
|
SDIOH_API_RC brcmf_sdioh_interrupt_set(sdioh_info_t *sd, bool enable)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct sdos_info *sdos;
|
struct sdos_info *sdos;
|
||||||
|
@ -195,9 +195,9 @@ SDIOH_API_RC sdioh_interrupt_set(sdioh_info_t *sd, bool enable)
|
||||||
|
|
||||||
sd->client_intr_enabled = enable;
|
sd->client_intr_enabled = enable;
|
||||||
if (enable)
|
if (enable)
|
||||||
sdioh_sdmmc_devintr_on(sd);
|
brcmf_sdioh_dev_intr_on(sd);
|
||||||
else
|
else
|
||||||
sdioh_sdmmc_devintr_off(sd);
|
brcmf_sdioh_dev_intr_off(sd);
|
||||||
|
|
||||||
spin_unlock_irqrestore(&sdos->lock, flags);
|
spin_unlock_irqrestore(&sdos->lock, flags);
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ SDIOH_API_RC sdioh_interrupt_set(sdioh_info_t *sd, bool enable)
|
||||||
/*
|
/*
|
||||||
* module init
|
* module init
|
||||||
*/
|
*/
|
||||||
int sdio_function_init(void)
|
int brcmf_sdio_function_init(void)
|
||||||
{
|
{
|
||||||
int error = 0;
|
int error = 0;
|
||||||
sd_trace(("bcmsdh_sdmmc: %s Enter\n", __func__));
|
sd_trace(("bcmsdh_sdmmc: %s Enter\n", __func__));
|
||||||
|
@ -225,8 +225,8 @@ int sdio_function_init(void)
|
||||||
/*
|
/*
|
||||||
* module cleanup
|
* module cleanup
|
||||||
*/
|
*/
|
||||||
extern int bcmsdh_remove(struct device *dev);
|
extern int brcmf_sdio_remove(struct device *dev);
|
||||||
void sdio_function_cleanup(void)
|
void brcmf_sdio_function_cleanup(void)
|
||||||
{
|
{
|
||||||
sd_trace(("%s Enter\n", __func__));
|
sd_trace(("%s Enter\n", __func__));
|
||||||
|
|
||||||
|
|
|
@ -30,26 +30,30 @@ extern bool dhd_bus_download_firmware(struct dhd_bus *bus,
|
||||||
char *fw_path, char *nv_path);
|
char *fw_path, char *nv_path);
|
||||||
|
|
||||||
/* Stop bus module: clear pending frames, disable data flow */
|
/* Stop bus module: clear pending frames, disable data flow */
|
||||||
extern void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex);
|
extern void brcmf_sdbrcm_bus_stop(struct dhd_bus *bus, bool enforce_mutex);
|
||||||
|
|
||||||
/* Initialize bus module: prepare for communication w/dongle */
|
/* Initialize bus module: prepare for communication w/dongle */
|
||||||
extern int dhd_bus_init(dhd_pub_t *dhdp, bool enforce_mutex);
|
extern int brcmf_sdbrcm_bus_init(dhd_pub_t *dhdp, bool enforce_mutex);
|
||||||
|
|
||||||
/* Send a data frame to the dongle. Callee disposes of txp. */
|
/* Send a data frame to the dongle. Callee disposes of txp. */
|
||||||
extern int dhd_bus_txdata(struct dhd_bus *bus, struct sk_buff *txp);
|
extern int brcmf_sdbrcm_bus_txdata(struct dhd_bus *bus, struct sk_buff *txp);
|
||||||
|
|
||||||
/* Send/receive a control message to/from the dongle.
|
/* Send/receive a control message to/from the dongle.
|
||||||
* Expects caller to enforce a single outstanding transaction.
|
* Expects caller to enforce a single outstanding transaction.
|
||||||
*/
|
*/
|
||||||
extern int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
|
extern int
|
||||||
extern int dhd_bus_rxctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
|
brcmf_sdbrcm_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
|
||||||
|
|
||||||
|
extern int
|
||||||
|
brcmf_sdbrcm_bus_rxctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
|
||||||
|
|
||||||
/* Watchdog timer function */
|
/* Watchdog timer function */
|
||||||
extern bool dhd_bus_watchdog(dhd_pub_t *dhd);
|
extern bool brcmf_sdbrcm_bus_watchdog(dhd_pub_t *dhd);
|
||||||
|
|
||||||
#ifdef DHD_DEBUG
|
#ifdef DHD_DEBUG
|
||||||
/* Device console input function */
|
/* Device console input function */
|
||||||
extern int dhd_bus_console_in(dhd_pub_t *dhd, unsigned char *msg, uint msglen);
|
extern int
|
||||||
|
brcmf_sdbrcm_bus_console_in(dhd_pub_t *dhd, unsigned char *msg, uint msglen);
|
||||||
#endif /* DHD_DEBUG */
|
#endif /* DHD_DEBUG */
|
||||||
|
|
||||||
/* Deferred processing for the bus, return true requests reschedule */
|
/* Deferred processing for the bus, return true requests reschedule */
|
||||||
|
@ -58,12 +62,12 @@ extern void dhd_bus_isr(bool *InterruptRecognized,
|
||||||
bool *QueueMiniportHandleInterrupt, void *arg);
|
bool *QueueMiniportHandleInterrupt, void *arg);
|
||||||
|
|
||||||
/* Check for and handle local prot-specific iovar commands */
|
/* Check for and handle local prot-specific iovar commands */
|
||||||
extern int dhd_bus_iovar_op(dhd_pub_t *dhdp, const char *name,
|
extern int brcmf_sdbrcm_bus_iovar_op(dhd_pub_t *dhdp, const char *name,
|
||||||
void *params, int plen, void *arg, int len,
|
void *params, int plen, void *arg, int len,
|
||||||
bool set);
|
bool set);
|
||||||
|
|
||||||
/* Add bus dump output to a buffer */
|
/* Add bus dump output to a buffer */
|
||||||
extern void dhd_bus_dump(dhd_pub_t *dhdp, struct brcmu_strbuf *strbuf);
|
extern void brcmf_sdbrcm_bus_dump(dhd_pub_t *dhdp, struct brcmu_strbuf *strbuf);
|
||||||
|
|
||||||
/* Clear any bus counters */
|
/* Clear any bus counters */
|
||||||
extern void dhd_bus_clearcounts(dhd_pub_t *dhdp);
|
extern void dhd_bus_clearcounts(dhd_pub_t *dhdp);
|
||||||
|
|
|
@ -129,7 +129,8 @@ static int dhdcdc_msg(dhd_pub_t *dhd)
|
||||||
len = CDC_MAX_MSG_SIZE;
|
len = CDC_MAX_MSG_SIZE;
|
||||||
|
|
||||||
/* Send request */
|
/* Send request */
|
||||||
return dhd_bus_txctl(dhd->bus, (unsigned char *)&prot->msg, len);
|
return brcmf_sdbrcm_bus_txctl(dhd->bus, (unsigned char *)&prot->msg,
|
||||||
|
len);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dhdcdc_cmplt(dhd_pub_t *dhd, u32 id, u32 len)
|
static int dhdcdc_cmplt(dhd_pub_t *dhd, u32 id, u32 len)
|
||||||
|
@ -140,9 +141,9 @@ static int dhdcdc_cmplt(dhd_pub_t *dhd, u32 id, u32 len)
|
||||||
DHD_TRACE(("%s: Enter\n", __func__));
|
DHD_TRACE(("%s: Enter\n", __func__));
|
||||||
|
|
||||||
do {
|
do {
|
||||||
ret =
|
ret = brcmf_sdbrcm_bus_rxctl(dhd->bus,
|
||||||
dhd_bus_rxctl(dhd->bus, (unsigned char *)&prot->msg,
|
(unsigned char *)&prot->msg,
|
||||||
len + sizeof(struct cdc_ioctl));
|
len + sizeof(struct cdc_ioctl));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
break;
|
break;
|
||||||
} while (CDC_IOC_ID(le32_to_cpu(prot->msg.flags)) != id);
|
} while (CDC_IOC_ID(le32_to_cpu(prot->msg.flags)) != id);
|
||||||
|
|
|
@ -210,7 +210,7 @@ static int dhd_dump(dhd_pub_t *dhdp, char *buf, int buflen)
|
||||||
brcmu_bprintf(strbuf, "\n");
|
brcmu_bprintf(strbuf, "\n");
|
||||||
|
|
||||||
/* Add any bus info */
|
/* Add any bus info */
|
||||||
dhd_bus_dump(dhdp, strbuf);
|
brcmf_sdbrcm_bus_dump(dhdp, strbuf);
|
||||||
|
|
||||||
return !strbuf->size ? -EOVERFLOW : 0;
|
return !strbuf->size ? -EOVERFLOW : 0;
|
||||||
}
|
}
|
||||||
|
@ -287,7 +287,8 @@ dhd_doiovar(dhd_pub_t *dhd_pub, const struct brcmu_iovar *vi, u32 actionid,
|
||||||
|
|
||||||
case IOV_SVAL(IOV_CONS):
|
case IOV_SVAL(IOV_CONS):
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
bcmerror = dhd_bus_console_in(dhd_pub, arg, len - 1);
|
bcmerror = brcmf_sdbrcm_bus_console_in(dhd_pub, arg,
|
||||||
|
len - 1);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -504,13 +505,13 @@ int dhd_ioctl(dhd_pub_t *dhd_pub, dhd_ioctl_t *ioc, void *buf, uint buflen)
|
||||||
|
|
||||||
/* if still not found, try bus module */
|
/* if still not found, try bus module */
|
||||||
if (ioc->cmd == DHD_GET_VAR)
|
if (ioc->cmd == DHD_GET_VAR)
|
||||||
bcmerror = dhd_bus_iovar_op(dhd_pub, buf,
|
bcmerror = brcmf_sdbrcm_bus_iovar_op(dhd_pub,
|
||||||
arg, arglen, buf,
|
buf, arg, arglen, buf, buflen,
|
||||||
buflen, IOV_GET);
|
IOV_GET);
|
||||||
else
|
else
|
||||||
bcmerror = dhd_bus_iovar_op(dhd_pub, buf,
|
bcmerror = brcmf_sdbrcm_bus_iovar_op(dhd_pub,
|
||||||
NULL, 0, arg,
|
buf, NULL, 0, arg, arglen,
|
||||||
arglen, IOV_SET);
|
IOV_SET);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1168,7 +1169,8 @@ void dhd_arp_offload_set(dhd_pub_t *dhd, int arp_mode)
|
||||||
int retcode;
|
int retcode;
|
||||||
|
|
||||||
brcmu_mkiovar("arp_ol", (char *)&arp_mode, 4, iovbuf, sizeof(iovbuf));
|
brcmu_mkiovar("arp_ol", (char *)&arp_mode, 4, iovbuf, sizeof(iovbuf));
|
||||||
retcode = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
|
retcode = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf,
|
||||||
|
sizeof(iovbuf));
|
||||||
retcode = retcode >= 0 ? 0 : retcode;
|
retcode = retcode >= 0 ? 0 : retcode;
|
||||||
if (retcode)
|
if (retcode)
|
||||||
DHD_TRACE(("%s: failed to set ARP offload mode to 0x%x, "
|
DHD_TRACE(("%s: failed to set ARP offload mode to 0x%x, "
|
||||||
|
@ -1184,7 +1186,8 @@ void dhd_arp_offload_enable(dhd_pub_t *dhd, int arp_enable)
|
||||||
int retcode;
|
int retcode;
|
||||||
|
|
||||||
brcmu_mkiovar("arpoe", (char *)&arp_enable, 4, iovbuf, sizeof(iovbuf));
|
brcmu_mkiovar("arpoe", (char *)&arp_enable, 4, iovbuf, sizeof(iovbuf));
|
||||||
retcode = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf, sizeof(iovbuf));
|
retcode = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, iovbuf,
|
||||||
|
sizeof(iovbuf));
|
||||||
retcode = retcode >= 0 ? 0 : retcode;
|
retcode = retcode >= 0 ? 0 : retcode;
|
||||||
if (retcode)
|
if (retcode)
|
||||||
DHD_TRACE(("%s: failed to enabe ARP offload to %d, "
|
DHD_TRACE(("%s: failed to enabe ARP offload to %d, "
|
||||||
|
@ -1224,7 +1227,8 @@ int dhd_preinit_ioctls(dhd_pub_t *dhd)
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
brcmu_mkiovar("cur_etheraddr", (void *)ea_addr, ETH_ALEN,
|
brcmu_mkiovar("cur_etheraddr", (void *)ea_addr, ETH_ALEN,
|
||||||
buf, sizeof(buf));
|
buf, sizeof(buf));
|
||||||
ret = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, buf, sizeof(buf));
|
ret = dhdcdc_set_ioctl(dhd, 0, WLC_SET_VAR, buf,
|
||||||
|
sizeof(buf));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
DHD_ERROR(("%s: can't set MAC address , error=%d\n",
|
DHD_ERROR(("%s: can't set MAC address , error=%d\n",
|
||||||
__func__, ret));
|
__func__, ret));
|
||||||
|
|
|
@ -175,7 +175,7 @@ DECLARE_WAIT_QUEUE_HEAD(dhd_dpc_wait);
|
||||||
#endif /* defined(CONFIG_PM_SLEEP) */
|
#endif /* defined(CONFIG_PM_SLEEP) */
|
||||||
|
|
||||||
#if defined(OOB_INTR_ONLY)
|
#if defined(OOB_INTR_ONLY)
|
||||||
extern void dhd_enable_oob_intr(struct dhd_bus *bus, bool enable);
|
extern void brcmf_sdbrcm_enable_oob_intr(struct dhd_bus *bus, bool enable);
|
||||||
#endif /* defined(OOB_INTR_ONLY) */
|
#endif /* defined(OOB_INTR_ONLY) */
|
||||||
|
|
||||||
MODULE_AUTHOR("Broadcom Corporation");
|
MODULE_AUTHOR("Broadcom Corporation");
|
||||||
|
@ -995,7 +995,7 @@ int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf)
|
||||||
#ifdef BCMDBUS
|
#ifdef BCMDBUS
|
||||||
ret = dbus_send_pkt(dhdp->dbus, pktbuf, NULL /* pktinfo */);
|
ret = dbus_send_pkt(dhdp->dbus, pktbuf, NULL /* pktinfo */);
|
||||||
#else
|
#else
|
||||||
ret = dhd_bus_txdata(dhdp->bus, pktbuf);
|
ret = brcmf_sdbrcm_bus_txdata(dhdp->bus, pktbuf);
|
||||||
#endif /* BCMDBUS */
|
#endif /* BCMDBUS */
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1264,7 +1264,7 @@ static int dhd_watchdog_thread(void *data)
|
||||||
if (down_interruptible(&dhd->watchdog_sem) == 0) {
|
if (down_interruptible(&dhd->watchdog_sem) == 0) {
|
||||||
if (dhd->pub.dongle_reset == false) {
|
if (dhd->pub.dongle_reset == false) {
|
||||||
/* Call the bus module watchdog */
|
/* Call the bus module watchdog */
|
||||||
dhd_bus_watchdog(&dhd->pub);
|
brcmf_sdbrcm_bus_watchdog(&dhd->pub);
|
||||||
}
|
}
|
||||||
/* Count the tick for reference */
|
/* Count the tick for reference */
|
||||||
dhd->pub.tickcnt++;
|
dhd->pub.tickcnt++;
|
||||||
|
@ -1290,7 +1290,7 @@ static void dhd_watchdog(unsigned long data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Call the bus module watchdog */
|
/* Call the bus module watchdog */
|
||||||
dhd_bus_watchdog(&dhd->pub);
|
brcmf_sdbrcm_bus_watchdog(&dhd->pub);
|
||||||
|
|
||||||
/* Count the tick for reference */
|
/* Count the tick for reference */
|
||||||
dhd->pub.tickcnt++;
|
dhd->pub.tickcnt++;
|
||||||
|
@ -1330,7 +1330,7 @@ static int dhd_dpc_thread(void *data)
|
||||||
up(&dhd->dpc_sem);
|
up(&dhd->dpc_sem);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dhd_bus_stop(dhd->pub.bus, true);
|
brcmf_sdbrcm_bus_stop(dhd->pub.bus, true);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
|
@ -1349,7 +1349,7 @@ static void dhd_dpc(unsigned long data)
|
||||||
if (dhd_bus_dpc(dhd->pub.bus))
|
if (dhd_bus_dpc(dhd->pub.bus))
|
||||||
tasklet_schedule(&dhd->tasklet);
|
tasklet_schedule(&dhd->tasklet);
|
||||||
} else {
|
} else {
|
||||||
dhd_bus_stop(dhd->pub.bus, true);
|
brcmf_sdbrcm_bus_stop(dhd->pub.bus, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1990,7 +1990,7 @@ int dhd_bus_start(dhd_pub_t *dhdp)
|
||||||
if (dhd->pub.busstate == DHD_BUS_DOWN) {
|
if (dhd->pub.busstate == DHD_BUS_DOWN) {
|
||||||
if (!(dhd_bus_download_firmware(dhd->pub.bus,
|
if (!(dhd_bus_download_firmware(dhd->pub.bus,
|
||||||
fw_path, nv_path))) {
|
fw_path, nv_path))) {
|
||||||
DHD_ERROR(("%s: dhdsdio_probe_download failed. "
|
DHD_ERROR(("%s: dhd_bus_download_firmware failed. "
|
||||||
"firmware = %s nvram = %s\n",
|
"firmware = %s nvram = %s\n",
|
||||||
__func__, fw_path, nv_path));
|
__func__, fw_path, nv_path));
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -2002,14 +2002,15 @@ int dhd_bus_start(dhd_pub_t *dhdp)
|
||||||
dhd_os_wd_timer(&dhd->pub, dhd_watchdog_ms);
|
dhd_os_wd_timer(&dhd->pub, dhd_watchdog_ms);
|
||||||
|
|
||||||
/* Bring up the bus */
|
/* Bring up the bus */
|
||||||
ret = dhd_bus_init(&dhd->pub, true);
|
ret = brcmf_sdbrcm_bus_init(&dhd->pub, true);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DHD_ERROR(("%s, dhd_bus_init failed %d\n", __func__, ret));
|
DHD_ERROR(("%s, brcmf_sdbrcm_bus_init failed %d\n", __func__,
|
||||||
|
ret));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#if defined(OOB_INTR_ONLY)
|
#if defined(OOB_INTR_ONLY)
|
||||||
/* Host registration for OOB interrupt */
|
/* Host registration for OOB interrupt */
|
||||||
if (bcmsdh_register_oob_intr(dhdp)) {
|
if (brcmf_sdio_register_oob_intr(dhdp)) {
|
||||||
del_timer_sync(&dhd->timer);
|
del_timer_sync(&dhd->timer);
|
||||||
dhd->wd_timer_valid = false;
|
dhd->wd_timer_valid = false;
|
||||||
DHD_ERROR(("%s Host failed to resgister for OOB\n", __func__));
|
DHD_ERROR(("%s Host failed to resgister for OOB\n", __func__));
|
||||||
|
@ -2017,7 +2018,7 @@ int dhd_bus_start(dhd_pub_t *dhdp)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable oob at firmware */
|
/* Enable oob at firmware */
|
||||||
dhd_enable_oob_intr(dhd->pub.bus, true);
|
brcmf_sdbrcm_enable_oob_intr(dhd->pub.bus, true);
|
||||||
#endif /* defined(OOB_INTR_ONLY) */
|
#endif /* defined(OOB_INTR_ONLY) */
|
||||||
|
|
||||||
/* If bus is not ready, can't come up */
|
/* If bus is not ready, can't come up */
|
||||||
|
@ -2173,9 +2174,9 @@ void dhd_bus_detach(dhd_pub_t *dhdp)
|
||||||
dhd_prot_stop(&dhd->pub);
|
dhd_prot_stop(&dhd->pub);
|
||||||
|
|
||||||
/* Stop the bus module */
|
/* Stop the bus module */
|
||||||
dhd_bus_stop(dhd->pub.bus, true);
|
brcmf_sdbrcm_bus_stop(dhd->pub.bus, true);
|
||||||
#if defined(OOB_INTR_ONLY)
|
#if defined(OOB_INTR_ONLY)
|
||||||
bcmsdh_unregister_oob_intr();
|
brcmf_sdio_unregister_oob_intr();
|
||||||
#endif /* defined(OOB_INTR_ONLY) */
|
#endif /* defined(OOB_INTR_ONLY) */
|
||||||
|
|
||||||
/* Clear the watchdog timer */
|
/* Clear the watchdog timer */
|
||||||
|
@ -2305,7 +2306,7 @@ static int __init dhd_module_init(void)
|
||||||
error = dhd_bus_register();
|
error = dhd_bus_register();
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
DHD_ERROR(("%s: sdio_register_driver failed\n", __func__));
|
DHD_ERROR(("%s: dhd_bus_register failed\n", __func__));
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
return error;
|
return error;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -70,25 +70,26 @@ typedef void (*bcmsdh_cb_fn_t) (void *);
|
||||||
* implementation may maintain a single "default" handle (e.g. the first or
|
* implementation may maintain a single "default" handle (e.g. the first or
|
||||||
* most recent one) to enable single-instance implementations to pass NULL.
|
* most recent one) to enable single-instance implementations to pass NULL.
|
||||||
*/
|
*/
|
||||||
extern bcmsdh_info_t *bcmsdh_attach(void *cfghdl, void **regsva, uint irq);
|
extern bcmsdh_info_t *brcmf_sdcard_attach(void *cfghdl, void **regsva,
|
||||||
|
uint irq);
|
||||||
|
|
||||||
/* Detach - freeup resources allocated in attach */
|
/* Detach - freeup resources allocated in attach */
|
||||||
extern int bcmsdh_detach(void *sdh);
|
extern int brcmf_sdcard_detach(void *sdh);
|
||||||
|
|
||||||
/* Query if SD device interrupts are enabled */
|
/* Query if SD device interrupts are enabled */
|
||||||
extern bool bcmsdh_intr_query(void *sdh);
|
extern bool brcmf_sdcard_intr_query(void *sdh);
|
||||||
|
|
||||||
/* Enable/disable SD interrupt */
|
/* Enable/disable SD interrupt */
|
||||||
extern int bcmsdh_intr_enable(void *sdh);
|
extern int brcmf_sdcard_intr_enable(void *sdh);
|
||||||
extern int bcmsdh_intr_disable(void *sdh);
|
extern int brcmf_sdcard_intr_disable(void *sdh);
|
||||||
|
|
||||||
/* Register/deregister device interrupt handler. */
|
/* Register/deregister device interrupt handler. */
|
||||||
extern int bcmsdh_intr_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh);
|
extern int brcmf_sdcard_intr_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh);
|
||||||
extern int bcmsdh_intr_dereg(void *sdh);
|
extern int brcmf_sdcard_intr_dereg(void *sdh);
|
||||||
|
|
||||||
#if defined(DHD_DEBUG)
|
#if defined(DHD_DEBUG)
|
||||||
/* Query pending interrupt status from the host controller */
|
/* Query pending interrupt status from the host controller */
|
||||||
extern bool bcmsdh_intr_pending(void *sdh);
|
extern bool brcmf_sdcard_intr_pending(void *sdh);
|
||||||
#endif
|
#endif
|
||||||
extern int bcmsdh_claim_host_and_lock(void *sdh);
|
extern int bcmsdh_claim_host_and_lock(void *sdh);
|
||||||
extern int bcmsdh_release_host_and_unlock(void *sdh);
|
extern int bcmsdh_release_host_and_unlock(void *sdh);
|
||||||
|
@ -96,7 +97,7 @@ extern int bcmsdh_release_host_and_unlock(void *sdh);
|
||||||
/* Register a callback to be called if and when bcmsdh detects
|
/* Register a callback to be called if and when bcmsdh detects
|
||||||
* device removal. No-op in the case of non-removable/hardwired devices.
|
* device removal. No-op in the case of non-removable/hardwired devices.
|
||||||
*/
|
*/
|
||||||
extern int bcmsdh_devremove_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh);
|
extern int brcmf_sdcard_devremove_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh);
|
||||||
|
|
||||||
/* Access SDIO address space (e.g. CCCR) using CMD52 (single-byte interface).
|
/* Access SDIO address space (e.g. CCCR) using CMD52 (single-byte interface).
|
||||||
* fn: function number
|
* fn: function number
|
||||||
|
@ -104,14 +105,14 @@ extern int bcmsdh_devremove_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh);
|
||||||
* data: data byte to write
|
* data: data byte to write
|
||||||
* err: pointer to error code (or NULL)
|
* err: pointer to error code (or NULL)
|
||||||
*/
|
*/
|
||||||
extern u8 bcmsdh_cfg_read(void *sdh, uint func, u32 addr, int *err);
|
extern u8 brcmf_sdcard_cfg_read(void *sdh, uint func, u32 addr, int *err);
|
||||||
extern void bcmsdh_cfg_write(void *sdh, uint func, u32 addr, u8 data,
|
extern void brcmf_sdcard_cfg_write(void *sdh, uint func, u32 addr, u8 data,
|
||||||
int *err);
|
int *err);
|
||||||
|
|
||||||
/* Read/Write 4bytes from/to cfg space */
|
/* Read/Write 4bytes from/to cfg space */
|
||||||
extern u32 bcmsdh_cfg_read_word(void *sdh, uint fnc_num, u32 addr,
|
extern u32 brcmf_sdcard_cfg_read_word(void *sdh, uint fnc_num, u32 addr,
|
||||||
int *err);
|
int *err);
|
||||||
extern void bcmsdh_cfg_write_word(void *sdh, uint fnc_num, u32 addr,
|
extern void brcmf_sdcard_cfg_write_word(void *sdh, uint fnc_num, u32 addr,
|
||||||
u32 data, int *err);
|
u32 data, int *err);
|
||||||
|
|
||||||
/* Read CIS content for specified function.
|
/* Read CIS content for specified function.
|
||||||
|
@ -121,18 +122,18 @@ extern void bcmsdh_cfg_write_word(void *sdh, uint fnc_num, u32 addr,
|
||||||
* Internally, this routine uses the values from the cis base regs (0x9-0xB)
|
* Internally, this routine uses the values from the cis base regs (0x9-0xB)
|
||||||
* to form an SDIO-space address to read the data from.
|
* to form an SDIO-space address to read the data from.
|
||||||
*/
|
*/
|
||||||
extern int bcmsdh_cis_read(void *sdh, uint func, u8 *cis, uint length);
|
extern int brcmf_sdcard_cis_read(void *sdh, uint func, u8 *cis, uint length);
|
||||||
|
|
||||||
/* Synchronous access to device (client) core registers via CMD53 to F1.
|
/* Synchronous access to device (client) core registers via CMD53 to F1.
|
||||||
* addr: backplane address (i.e. >= regsva from attach)
|
* addr: backplane address (i.e. >= regsva from attach)
|
||||||
* size: register width in bytes (2 or 4)
|
* size: register width in bytes (2 or 4)
|
||||||
* data: data for register write
|
* data: data for register write
|
||||||
*/
|
*/
|
||||||
extern u32 bcmsdh_reg_read(void *sdh, u32 addr, uint size);
|
extern u32 brcmf_sdcard_reg_read(void *sdh, u32 addr, uint size);
|
||||||
extern u32 bcmsdh_reg_write(void *sdh, u32 addr, uint size, u32 data);
|
extern u32 brcmf_sdcard_reg_write(void *sdh, u32 addr, uint size, u32 data);
|
||||||
|
|
||||||
/* Indicate if last reg read/write failed */
|
/* Indicate if last reg read/write failed */
|
||||||
extern bool bcmsdh_regfail(void *sdh);
|
extern bool brcmf_sdcard_regfail(void *sdh);
|
||||||
|
|
||||||
/* Buffer transfer to/from device (client) core via cmd53.
|
/* Buffer transfer to/from device (client) core via cmd53.
|
||||||
* fn: function number
|
* fn: function number
|
||||||
|
@ -147,12 +148,12 @@ extern bool bcmsdh_regfail(void *sdh);
|
||||||
* NOTE: Async operation is not currently supported.
|
* NOTE: Async operation is not currently supported.
|
||||||
*/
|
*/
|
||||||
typedef void (*bcmsdh_cmplt_fn_t) (void *handle, int status, bool sync_waiting);
|
typedef void (*bcmsdh_cmplt_fn_t) (void *handle, int status, bool sync_waiting);
|
||||||
extern int bcmsdh_send_buf(void *sdh, u32 addr, uint fn, uint flags,
|
extern int brcmf_sdcard_send_buf(void *sdh, u32 addr, uint fn, uint flags,
|
||||||
u8 *buf, uint nbytes, void *pkt,
|
u8 *buf, uint nbytes, void *pkt,
|
||||||
bcmsdh_cmplt_fn_t complete, void *handle);
|
bcmsdh_cmplt_fn_t complete, void *handle);
|
||||||
extern int bcmsdh_recv_buf(bcmsdh_info_t *sdh, u32 addr, uint fn, uint flags,
|
extern int brcmf_sdcard_recv_buf(bcmsdh_info_t *sdh, u32 addr, uint fn,
|
||||||
u8 *buf, uint nbytes, struct sk_buff *pkt,
|
uint flags, u8 *buf, uint nbytes, struct sk_buff *pkt,
|
||||||
bcmsdh_cmplt_fn_t complete, void *handle);
|
bcmsdh_cmplt_fn_t complete, void *handle);
|
||||||
|
|
||||||
/* Flags bits */
|
/* Flags bits */
|
||||||
#define SDIO_REQ_4BYTE 0x1 /* Four-byte target (backplane) width (vs. two-byte) */
|
#define SDIO_REQ_4BYTE 0x1 /* Four-byte target (backplane) width (vs. two-byte) */
|
||||||
|
@ -169,35 +170,35 @@ extern int bcmsdh_recv_buf(bcmsdh_info_t *sdh, u32 addr, uint fn, uint flags,
|
||||||
* nbytes: number of bytes to transfer to/from buf
|
* nbytes: number of bytes to transfer to/from buf
|
||||||
* Returns 0 or error code.
|
* Returns 0 or error code.
|
||||||
*/
|
*/
|
||||||
extern int bcmsdh_rwdata(void *sdh, uint rw, u32 addr, u8 *buf,
|
extern int brcmf_sdcard_rwdata(void *sdh, uint rw, u32 addr, u8 *buf,
|
||||||
uint nbytes);
|
uint nbytes);
|
||||||
|
|
||||||
/* Issue an abort to the specified function */
|
/* Issue an abort to the specified function */
|
||||||
extern int bcmsdh_abort(void *sdh, uint fn);
|
extern int brcmf_sdcard_abort(void *sdh, uint fn);
|
||||||
|
|
||||||
/* Start SDIO Host Controller communication */
|
/* Start SDIO Host Controller communication */
|
||||||
extern int bcmsdh_start(void *sdh, int stage);
|
extern int brcmf_sdcard_start(void *sdh, int stage);
|
||||||
|
|
||||||
/* Stop SDIO Host Controller communication */
|
/* Stop SDIO Host Controller communication */
|
||||||
extern int bcmsdh_stop(void *sdh);
|
extern int brcmf_sdcard_stop(void *sdh);
|
||||||
|
|
||||||
/* Returns the "Device ID" of target device on the SDIO bus. */
|
/* Returns the "Device ID" of target device on the SDIO bus. */
|
||||||
extern int bcmsdh_query_device(void *sdh);
|
extern int brcmf_sdcard_query_device(void *sdh);
|
||||||
|
|
||||||
/* Returns the number of IO functions reported by the device */
|
/* Returns the number of IO functions reported by the device */
|
||||||
extern uint bcmsdh_query_iofnum(void *sdh);
|
extern uint brcmf_sdcard_query_iofnum(void *sdh);
|
||||||
|
|
||||||
/* Miscellaneous knob tweaker. */
|
/* Miscellaneous knob tweaker. */
|
||||||
extern int bcmsdh_iovar_op(void *sdh, const char *name,
|
extern int brcmf_sdcard_iovar_op(void *sdh, const char *name,
|
||||||
void *params, int plen, void *arg, int len,
|
void *params, int plen, void *arg, int len,
|
||||||
bool set);
|
bool set);
|
||||||
|
|
||||||
/* Reset and reinitialize the device */
|
/* Reset and reinitialize the device */
|
||||||
extern int bcmsdh_reset(bcmsdh_info_t *sdh);
|
extern int brcmf_sdcard_reset(bcmsdh_info_t *sdh);
|
||||||
|
|
||||||
/* helper functions */
|
/* helper functions */
|
||||||
|
|
||||||
extern void *bcmsdh_get_sdioh(bcmsdh_info_t *sdh);
|
extern void *brcmf_sdcard_get_sdioh(bcmsdh_info_t *sdh);
|
||||||
|
|
||||||
/* callback functions */
|
/* callback functions */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -209,18 +210,18 @@ typedef struct {
|
||||||
} bcmsdh_driver_t;
|
} bcmsdh_driver_t;
|
||||||
|
|
||||||
/* platform specific/high level functions */
|
/* platform specific/high level functions */
|
||||||
extern int bcmsdh_register(bcmsdh_driver_t *driver);
|
extern int brcmf_sdio_register(bcmsdh_driver_t *driver);
|
||||||
extern void bcmsdh_unregister(void);
|
extern void brcmf_sdio_unregister(void);
|
||||||
extern bool bcmsdh_chipmatch(u16 vendor, u16 device);
|
extern bool brcmf_sdio_chipmatch(u16 vendor, u16 device);
|
||||||
extern void bcmsdh_device_remove(void *sdh);
|
extern void brcmf_sdio_device_remove(void *sdh);
|
||||||
|
|
||||||
/* Function to pass device-status bits to DHD. */
|
/* Function to pass device-status bits to DHD. */
|
||||||
extern u32 bcmsdh_get_dstatus(void *sdh);
|
extern u32 brcmf_sdcard_get_dstatus(void *sdh);
|
||||||
|
|
||||||
/* Function to return current window addr */
|
/* Function to return current window addr */
|
||||||
extern u32 bcmsdh_cur_sbwad(void *sdh);
|
extern u32 brcmf_sdcard_cur_sbwad(void *sdh);
|
||||||
|
|
||||||
/* Function to pass chipid and rev to lower layers for controlling pr's */
|
/* Function to pass chipid and rev to lower layers for controlling pr's */
|
||||||
extern void bcmsdh_chipinfo(void *sdh, u32 chip, u32 chiprev);
|
extern void brcmf_sdcard_chipinfo(void *sdh, u32 chip, u32 chiprev);
|
||||||
|
|
||||||
#endif /* _BRCM_SDH_H_ */
|
#endif /* _BRCM_SDH_H_ */
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "dhd.h"
|
#include "dhd.h"
|
||||||
#include "wl_cfg80211.h"
|
#include "wl_cfg80211.h"
|
||||||
|
|
||||||
void sdioh_sdio_set_host_pm_flags(int flag);
|
void brcmf_sdioh_set_host_pm_flags(int flag);
|
||||||
|
|
||||||
static struct sdio_func *cfg80211_sdio_func;
|
static struct sdio_func *cfg80211_sdio_func;
|
||||||
static struct wl_dev *wl_cfg80211_dev;
|
static struct wl_dev *wl_cfg80211_dev;
|
||||||
|
@ -2155,7 +2155,7 @@ static s32 wl_cfg80211_suspend(struct wiphy *wiphy, struct cfg80211_wowlan *wow)
|
||||||
clear_bit(WL_STATUS_SCAN_ABORTING, &wl->status);
|
clear_bit(WL_STATUS_SCAN_ABORTING, &wl->status);
|
||||||
|
|
||||||
/* Inform SDIO stack not to switch off power to the chip */
|
/* Inform SDIO stack not to switch off power to the chip */
|
||||||
sdioh_sdio_set_host_pm_flags(MMC_PM_KEEP_POWER);
|
brcmf_sdioh_set_host_pm_flags(MMC_PM_KEEP_POWER);
|
||||||
|
|
||||||
/* Turn off watchdog timer */
|
/* Turn off watchdog timer */
|
||||||
if (test_bit(WL_STATUS_READY, &wl->status)) {
|
if (test_bit(WL_STATUS_READY, &wl->status)) {
|
||||||
|
|
Loading…
Reference in New Issue