soc: mediatek: mtk-svs: Check if SVS mode is available in the beginning
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tue, 21 Nov 2023 12:50:40 +0000 (13:50 +0100)
committerAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Mon, 11 Dec 2023 10:36:15 +0000 (11:36 +0100)
commitb74cac09c009bd797da0dedd84415c4c9f586201
tree921a12aaa107ba83a2f0367885e5ee18de5243d5
parentb77f0c305ad7edba8274641bcd7fc67995a561e6
soc: mediatek: mtk-svs: Check if SVS mode is available in the beginning

The svs_init01() and svs_init02() functions are already checking if the
INIT01 and INIT02 modes are available - but that's done in for loops and
for each SVS bank.

Give those a shortcut to get out early if no SVS bank features the
desired init mode: this is especially done to avoid some locking in
the svs_init01(), but also to avoid multiple for loops to check the
same, when no bank supports a specific mode.

Link: https://lore.kernel.org/r/20231121125044.78642-17-angelogioacchino.delregno@collabora.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
drivers/soc/mediatek/mtk-svs.c