ASoC: q6afe-clocks: fix reprobing of the driver
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sat, 27 Mar 2021 09:28:57 +0000 (12:28 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 30 Mar 2021 11:42:52 +0000 (12:42 +0100)
commit96fadf7e8ff49fdb74754801228942b67c3eeebd
tree7271e92219a82792d3ee3ea2658b7e98da626fc6
parentc7721e94279887f9dd8f4be303f2054bb5477c9e
ASoC: q6afe-clocks: fix reprobing of the driver

Q6afe-clocks driver can get reprobed. For example if the APR services
are restarted after the firmware crash. However currently Q6afe-clocks
driver will oops because hw.init will get cleared during first _probe
call. Rewrite the driver to fill the clock data at runtime rather than
using big static array of clocks.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Fixes: 520a1c396d19 ("ASoC: q6afe-clocks: add q6afe clock controller")
Link: https://lore.kernel.org/r/20210327092857.3073879-1-dmitry.baryshkov@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/q6afe-clocks.c
sound/soc/qcom/qdsp6/q6afe.c
sound/soc/qcom/qdsp6/q6afe.h