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)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Mar 2022 17:44:58 +0000 (10:44 -0700)
commiteba8b2587017a48137679219a91e8658560d8ac4
tree646c8dbd1a0c49d3a3d4817ad62da7516256dc7a
parente13a16e7c24bd11a6510624fd9ed2e997c548de7
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