brcmfmac: chip: Only disable D11 cores; handle an arbitrary number
authorHector Martin <marcan@marcan.st>
Mon, 20 Dec 2021 11:00:57 +0000 (20:00 +0900)
committerHector Martin <marcan@marcan.st>
Tue, 18 Jan 2022 11:22:10 +0000 (20:22 +0900)
commite3d1958924b8731cd97fa82c6dd98672875af334
tree851a0f7b5656af4df9ec15eb70bf3238bfc0d622
parent5c5912cfccc706ab4a8c7273d905969cd8ab661a
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>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c