wifi: brcmfmac: chip: Only disable D11 cores; handle an arbitrary number
authorHector Martin <marcan@marcan.st>
Tue, 14 Feb 2023 09:24:14 +0000 (18:24 +0900)
committerKalle Valo <kvalo@kernel.org>
Mon, 27 Feb 2023 14:59:34 +0000 (16:59 +0200)
commit3c7c07ca7ab144ef25402858078b27806322b752
treef7cc232248343524c6a10a3680938f99bcec1715
parentec52d77d077529f198fd874c550a26b9cc86a331
wifi: 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>
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230214092423.15175-1-marcan@marcan.st
drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c