bool oob_irq_registered;
};
-/* local copy of bcm sd handler */
-static struct brcmf_sdio_card *l_card;
-
const uint brcmf_sdio_msglevel = BRCMF_SD_ERROR_VAL;
static struct sdio_hc *sdhcinfo;
return NULL;
}
- /* save the handler locally */
- l_card = card;
-
card->sdioh = brcmf_sdioh_attach(cfghdl, irq);
if (!card->sdioh) {
brcmf_sdcard_detach(card);
kfree(card);
}
- l_card = NULL;
return 0;
}
s32 retry = 0;
u8 data = 0;
- if (!card)
- card = l_card;
-
do {
if (retry) /* wait for 1 ms till bus get settled down */
udelay(1000);
int status;
s32 retry = 0;
- if (!card)
- card = l_card;
-
do {
if (retry) /* wait for 1 ms till bus get settled down */
udelay(1000);
int status;
u32 data = 0;
- if (!card)
- card = l_card;
-
status = brcmf_sdioh_request_word(card->sdioh, SDIOH_CMD_TYPE_NORMAL,
SDIOH_READ, fnc_num, addr, &data, 4);
{
int status;
- if (!card)
- card = l_card;
-
status =
brcmf_sdioh_request_word(card->sdioh, SDIOH_CMD_TYPE_NORMAL,
SDIOH_WRITE, fnc_num, addr, &data, 4);
bool ascii = func & ~0xf;
func &= 0x7;
- if (!card)
- card = l_card;
-
status = brcmf_sdioh_cis_read(card->sdioh, func, cis, length);
if (ascii) {
BRCMF_SD_INFO(("%s:fun = 1, addr = 0x%x, ", __func__, addr));
- if (!card)
- card = l_card;
-
if (bar0 != card->sbwad) {
if (brcmf_sdcard_set_sbaddr_window(card, bar0))
return 0xFFFFFFFF;
BRCMF_SD_INFO(("%s:fun = 1, addr = 0x%x, uint%ddata = 0x%x\n",
__func__, addr, size * 8, data));
- if (!card)
- card = l_card;
-
if (bar0 != card->sbwad) {
err = brcmf_sdcard_set_sbaddr_window(card, bar0);
if (err)
u32 brcmf_sdcard_cur_sbwad(struct brcmf_sdio_card *card)
{
- if (!card)
- card = l_card;
-
return card->sbwad;
}
{
*retryvar = 0;
do {
- *regvar = brcmf_sdcard_reg_read(NULL,
+ *regvar = brcmf_sdcard_reg_read(bus->card,
bus->ci->buscorebase + reg_offset, sizeof(u32));
} while (brcmf_sdcard_regfail(bus->card) &&
(++(*retryvar) <= retry_limit));
{
*retryvar = 0;
do {
- brcmf_sdcard_reg_write(NULL, bus->ci->buscorebase + reg_offset,
+ brcmf_sdcard_reg_write(bus->card,
+ bus->ci->buscorebase + reg_offset,
sizeof(u32), regval);
} while (brcmf_sdcard_regfail(bus->card) &&
(++(*retryvar) <= retry_limit));
/* Set core control so an SDIO reset does a backplane reset */
reg_addr = bus->ci->buscorebase +
offsetof(struct sdpcmd_regs, corecontrol);
- reg_val = brcmf_sdcard_reg_read(NULL, reg_addr, sizeof(u32));
- brcmf_sdcard_reg_write(NULL, reg_addr, sizeof(u32),
+ reg_val = brcmf_sdcard_reg_read(bus->card, reg_addr, sizeof(u32));
+ brcmf_sdcard_reg_write(bus->card, reg_addr, sizeof(u32),
reg_val | CC_BPRESEN);
brcmu_pktq_init(&bus->txq, (PRIOMASK + 1), TXQLEN);