Commit e16a73bc authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: removed asserts from bcmsdh.c

Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0173ecbf
...@@ -119,30 +119,22 @@ brcmf_sdcard_iovar_op(struct brcmf_sdio_card *card, const char *name, ...@@ -119,30 +119,22 @@ brcmf_sdcard_iovar_op(struct brcmf_sdio_card *card, const char *name,
int brcmf_sdcard_intr_enable(struct brcmf_sdio_card *card) int brcmf_sdcard_intr_enable(struct brcmf_sdio_card *card)
{ {
ASSERT(card);
return brcmf_sdioh_interrupt_set(card->sdioh, true); return brcmf_sdioh_interrupt_set(card->sdioh, true);
} }
int brcmf_sdcard_intr_disable(struct brcmf_sdio_card *card) int brcmf_sdcard_intr_disable(struct brcmf_sdio_card *card)
{ {
ASSERT(card);
return brcmf_sdioh_interrupt_set(card->sdioh, false); return brcmf_sdioh_interrupt_set(card->sdioh, false);
} }
int brcmf_sdcard_intr_reg(struct brcmf_sdio_card *card, int brcmf_sdcard_intr_reg(struct brcmf_sdio_card *card,
void (*fn)(void *), void *argh) void (*fn)(void *), void *argh)
{ {
ASSERT(card);
return brcmf_sdioh_interrupt_register(card->sdioh, fn, argh); return brcmf_sdioh_interrupt_register(card->sdioh, fn, argh);
} }
int brcmf_sdcard_intr_dereg(struct brcmf_sdio_card *card) int brcmf_sdcard_intr_dereg(struct brcmf_sdio_card *card)
{ {
ASSERT(card);
return brcmf_sdioh_interrupt_deregister(card->sdioh); return brcmf_sdioh_interrupt_deregister(card->sdioh);
} }
...@@ -158,8 +150,6 @@ u8 brcmf_sdcard_cfg_read(struct brcmf_sdio_card *card, uint fnc_num, u32 addr, ...@@ -158,8 +150,6 @@ u8 brcmf_sdcard_cfg_read(struct brcmf_sdio_card *card, uint fnc_num, u32 addr,
if (!card) if (!card)
card = l_card; card = l_card;
ASSERT(card->init_success);
#ifdef SDIOH_API_ACCESS_RETRY_LIMIT #ifdef SDIOH_API_ACCESS_RETRY_LIMIT
do { do {
if (retry) /* wait for 1 ms till bus get settled down */ if (retry) /* wait for 1 ms till bus get settled down */
...@@ -193,8 +183,6 @@ brcmf_sdcard_cfg_write(struct brcmf_sdio_card *card, uint fnc_num, u32 addr, ...@@ -193,8 +183,6 @@ brcmf_sdcard_cfg_write(struct brcmf_sdio_card *card, uint fnc_num, u32 addr,
if (!card) if (!card)
card = l_card; card = l_card;
ASSERT(card->init_success);
#ifdef SDIOH_API_ACCESS_RETRY_LIMIT #ifdef SDIOH_API_ACCESS_RETRY_LIMIT
do { do {
if (retry) /* wait for 1 ms till bus get settled down */ if (retry) /* wait for 1 ms till bus get settled down */
...@@ -223,8 +211,6 @@ u32 brcmf_sdcard_cfg_read_word(struct brcmf_sdio_card *card, uint fnc_num, ...@@ -223,8 +211,6 @@ u32 brcmf_sdcard_cfg_read_word(struct brcmf_sdio_card *card, uint fnc_num,
if (!card) if (!card)
card = l_card; card = l_card;
ASSERT(card->init_success);
status = brcmf_sdioh_request_word(card->sdioh, SDIOH_CMD_TYPE_NORMAL, status = brcmf_sdioh_request_word(card->sdioh, SDIOH_CMD_TYPE_NORMAL,
SDIOH_READ, fnc_num, addr, &data, 4); SDIOH_READ, fnc_num, addr, &data, 4);
...@@ -246,8 +232,6 @@ brcmf_sdcard_cfg_write_word(struct brcmf_sdio_card *card, uint fnc_num, ...@@ -246,8 +232,6 @@ brcmf_sdcard_cfg_write_word(struct brcmf_sdio_card *card, uint fnc_num,
if (!card) if (!card)
card = l_card; card = l_card;
ASSERT(card->init_success);
status = status =
brcmf_sdioh_request_word(card->sdioh, SDIOH_CMD_TYPE_NORMAL, brcmf_sdioh_request_word(card->sdioh, SDIOH_CMD_TYPE_NORMAL,
SDIOH_WRITE, fnc_num, addr, &data, 4); SDIOH_WRITE, fnc_num, addr, &data, 4);
...@@ -272,10 +256,6 @@ int brcmf_sdcard_cis_read(struct brcmf_sdio_card *card, uint func, u8 * cis, ...@@ -272,10 +256,6 @@ int brcmf_sdcard_cis_read(struct brcmf_sdio_card *card, uint func, u8 * cis,
if (!card) if (!card)
card = l_card; card = l_card;
ASSERT(card->init_success);
ASSERT(cis);
ASSERT(length <= SBSDIO_CIS_SIZE_LIMIT);
status = brcmf_sdioh_cis_read(card->sdioh, func, cis, length); status = brcmf_sdioh_cis_read(card->sdioh, func, cis, length);
if (ascii) { if (ascii) {
...@@ -330,8 +310,6 @@ u32 brcmf_sdcard_reg_read(struct brcmf_sdio_card *card, u32 addr, uint size) ...@@ -330,8 +310,6 @@ u32 brcmf_sdcard_reg_read(struct brcmf_sdio_card *card, u32 addr, uint size)
if (!card) if (!card)
card = l_card; card = l_card;
ASSERT(card->init_success);
if (bar0 != card->sbwad) { if (bar0 != card->sbwad) {
if (brcmf_sdcard_set_sbaddr_window(card, bar0)) if (brcmf_sdcard_set_sbaddr_window(card, bar0))
return 0xFFFFFFFF; return 0xFFFFFFFF;
...@@ -384,8 +362,6 @@ u32 brcmf_sdcard_reg_write(struct brcmf_sdio_card *card, u32 addr, uint size, ...@@ -384,8 +362,6 @@ u32 brcmf_sdcard_reg_write(struct brcmf_sdio_card *card, u32 addr, uint size,
if (!card) if (!card)
card = l_card; card = l_card;
ASSERT(card->init_success);
if (bar0 != card->sbwad) { if (bar0 != card->sbwad) {
err = brcmf_sdcard_set_sbaddr_window(card, bar0); err = brcmf_sdcard_set_sbaddr_window(card, bar0);
if (err) if (err)
...@@ -429,14 +405,10 @@ brcmf_sdcard_recv_buf(struct brcmf_sdio_card *card, u32 addr, uint fn, ...@@ -429,14 +405,10 @@ brcmf_sdcard_recv_buf(struct brcmf_sdio_card *card, u32 addr, uint fn,
uint bar0 = addr & ~SBSDIO_SB_OFT_ADDR_MASK; uint bar0 = addr & ~SBSDIO_SB_OFT_ADDR_MASK;
int err = 0; int err = 0;
ASSERT(card);
ASSERT(card->init_success);
BRCMF_SD_INFO(("%s:fun = %d, addr = 0x%x, size = %d\n", BRCMF_SD_INFO(("%s:fun = %d, addr = 0x%x, size = %d\n",
__func__, fn, addr, nbytes)); __func__, fn, addr, nbytes));
/* Async not implemented yet */ /* Async not implemented yet */
ASSERT(!(flags & SDIO_REQ_ASYNC));
if (flags & SDIO_REQ_ASYNC) if (flags & SDIO_REQ_ASYNC)
return -ENOTSUPP; return -ENOTSUPP;
...@@ -473,14 +445,10 @@ brcmf_sdcard_send_buf(struct brcmf_sdio_card *card, u32 addr, uint fn, ...@@ -473,14 +445,10 @@ brcmf_sdcard_send_buf(struct brcmf_sdio_card *card, u32 addr, uint fn,
uint bar0 = addr & ~SBSDIO_SB_OFT_ADDR_MASK; uint bar0 = addr & ~SBSDIO_SB_OFT_ADDR_MASK;
int err = 0; int err = 0;
ASSERT(card);
ASSERT(card->init_success);
BRCMF_SD_INFO(("%s:fun = %d, addr = 0x%x, size = %d\n", BRCMF_SD_INFO(("%s:fun = %d, addr = 0x%x, size = %d\n",
__func__, fn, addr, nbytes)); __func__, fn, addr, nbytes));
/* Async not implemented yet */ /* Async not implemented yet */
ASSERT(!(flags & SDIO_REQ_ASYNC));
if (flags & SDIO_REQ_ASYNC) if (flags & SDIO_REQ_ASYNC)
return -ENOTSUPP; return -ENOTSUPP;
...@@ -506,10 +474,6 @@ brcmf_sdcard_send_buf(struct brcmf_sdio_card *card, u32 addr, uint fn, ...@@ -506,10 +474,6 @@ brcmf_sdcard_send_buf(struct brcmf_sdio_card *card, u32 addr, uint fn,
int brcmf_sdcard_rwdata(struct brcmf_sdio_card *card, uint rw, u32 addr, int brcmf_sdcard_rwdata(struct brcmf_sdio_card *card, uint rw, u32 addr,
u8 *buf, uint nbytes) u8 *buf, uint nbytes)
{ {
ASSERT(card);
ASSERT(card->init_success);
ASSERT((addr & SBSDIO_SBWINDOW_MASK) == 0);
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment