Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277800
b: refs/heads/master
c: d8f64a4
h: refs/heads/master
v: v3
  • Loading branch information
Franky Lin authored and John W. Linville committed Nov 9, 2011
1 parent 8d402b0 commit 3ba92e3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a97e4fc5ae4b00187b25a8216a61b2105efa9c60
refs/heads/master: d8f64a425b3a79e7d276e438ad7246c916a4b195
8 changes: 2 additions & 6 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -3138,7 +3138,6 @@ brcmf_sdbrcm_chip_resetcore(struct brcmf_sdio_dev *sdiodev, u32 corebase)
static int brcmf_sdbrcm_download_state(struct brcmf_bus *bus, bool enter)
{
uint retries;
u32 regdata;
int bcmerror = 0;

/* To enter download state, disable ARM and reset SOCRAM.
Expand All @@ -3159,11 +3158,8 @@ static int brcmf_sdbrcm_download_state(struct brcmf_bus *bus, bool enter)
(u8 *)&zeros, 4);
}
} else {
regdata = brcmf_sdcard_reg_read(bus->sdiodev,
CORE_SB(bus->ci->ramcorebase, sbtmstatelow), 4);
regdata &= (SBTML_RESET | SBTML_REJ_MASK |
(SICF_CLOCK_EN << SBTML_SICF_SHIFT));
if ((SICF_CLOCK_EN << SBTML_SICF_SHIFT) != regdata) {
if (!brcmf_sdio_chip_iscoreup(bus->sdiodev,
bus->ci->ramcorebase)) {
brcmf_dbg(ERROR, "SOCRAM core is down after reset?\n");
bcmerror = -EBADE;
goto fail;
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@
#define SBIDH_VC_MASK 0xffff0000 /* vendor code */
#define SBIDH_VC_SHIFT 16

bool
brcmf_sdio_chip_iscoreup(struct brcmf_sdio_dev *sdiodev,
u32 corebase)
{
u32 regdata;

regdata = brcmf_sdcard_reg_read(sdiodev,
CORE_SB(corebase, sbtmstatelow), 4);
regdata &= (SBTML_RESET | SBTML_REJ_MASK |
(SICF_CLOCK_EN << SBTML_SICF_SHIFT));
return ((SICF_CLOCK_EN << SBTML_SICF_SHIFT) == regdata);
}

void
brcmf_sdio_chip_coredisable(struct brcmf_sdio_dev *sdiodev, u32 corebase)
{
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ struct sbconfig {
u32 sbidhigh; /* identification */
};


extern bool brcmf_sdio_chip_iscoreup(struct brcmf_sdio_dev *sdiodev,
u32 corebase);
extern void brcmf_sdio_chip_coredisable(struct brcmf_sdio_dev *sdiodev,
u32 corebase);
extern int brcmf_sdio_chip_attach(struct brcmf_sdio_dev *sdiodev,
Expand Down

0 comments on commit 3ba92e3

Please sign in to comment.