Skip to content

Commit 2bd5d69

Browse files
committed
brcmfmac: chip: Only disable D11 cores; handle an arbitrary number
At least on BCM4387, the D11 cores are held in reset on cold startup and firmware expects to release reset itself. Just assert reset here and let firmware deassert it. Premature deassertion results in the firmware failing to initialize properly some of the time, with strange AXI bus errors. Also, BCM4387 has 3 cores, up from 2. The logic for handling that is in brcmf_chip_ai_resetcore(), but since we aren't using that any more, just handle it here. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent 9587fcd commit 2bd5d69

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

  • drivers/net/wireless/broadcom/brcm80211/brcmfmac

drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,15 +1292,18 @@ static bool brcmf_chip_cm3_set_active(struct brcmf_chip_priv *chip)
12921292
static inline void
12931293
brcmf_chip_cr4_set_passive(struct brcmf_chip_priv *chip)
12941294
{
1295+
int i;
12951296
struct brcmf_core *core;
12961297

12971298
brcmf_chip_disable_arm(chip, BCMA_CORE_ARM_CR4);
12981299

1299-
core = brcmf_chip_get_core(&chip->pub, BCMA_CORE_80211);
1300-
brcmf_chip_resetcore(core, D11_BCMA_IOCTL_PHYRESET |
1301-
D11_BCMA_IOCTL_PHYCLOCKEN,
1302-
D11_BCMA_IOCTL_PHYCLOCKEN,
1303-
D11_BCMA_IOCTL_PHYCLOCKEN);
1300+
/* Disable the cores only and let the firmware enable them.
1301+
* Releasing reset ourselves breaks BCM4387 in weird ways.
1302+
*/
1303+
for (i = 0; (core = brcmf_chip_get_d11core(&chip->pub, i)); i++)
1304+
brcmf_chip_coredisable(core, D11_BCMA_IOCTL_PHYRESET |
1305+
D11_BCMA_IOCTL_PHYCLOCKEN,
1306+
D11_BCMA_IOCTL_PHYCLOCKEN);
13041307
}
13051308

13061309
static bool brcmf_chip_cr4_set_active(struct brcmf_chip_priv *chip, u32 rstvec)

0 commit comments

Comments
 (0)