brcmfmac: firmware: Allow per-board firmware binaries
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 11 Jul 2021 23:16:59 +0000 (01:16 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Sun, 1 Aug 2021 10:26:59 +0000 (13:26 +0300)
commit5ff013914c62c493c206d70554cfb1d311ea481a
tree2e1c1f38db81dcbdee859f13602145984408d7bc
parentb4f8e2d9b5f8ccc4c46bcab203e6d4fa0f6a7251
brcmfmac: firmware: Allow per-board firmware binaries

After some crashes in the 3D engine (!) on the Samsung GT-I8530
it turns out that the main firmware file can be device dependent,
something that was previously only handled for the NVRAM
parameter file.

Rewrite the code a bit so we can a per-board suffixed firmware
binary as well, if this does not exist we fall back to the
canonical firmware name.

Example: a 4330 device with the OF board compatible is
"samsung,gavini". We will first try
"brcmfmac4330-sdio.samsung,gavini.bin" then "brcmfmac4330-sdio.bin"
if that does not work.

Cc: phone-devel@vger.kernel.org
Cc: newbyte@disroot.org
Cc: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210711231659.255479-1-linus.walleij@linaro.org
drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c