aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/imx/imx-common.h
diff options
context:
space:
mode:
authorDaniel Baluta <[email protected]>2021-11-19 09:43:15 +0000
committerMark Brown <[email protected]>2021-11-22 15:40:08 +0000
commit8253aa4700b37cef1ca3bbda0d986349357608d3 (patch)
tree43544bdee554bf2de9baa5d3b0e216a5b8075b0a /sound/soc/sof/imx/imx-common.h
parentASoC: SOF: Add support for Mediatek MT8195 (diff)
downloadkernel-8253aa4700b37cef1ca3bbda0d986349357608d3.tar.gz
kernel-8253aa4700b37cef1ca3bbda0d986349357608d3.zip
ASoC: SOF: imx: Add code to manage DSP related clocks
We need at least 3 clocks in order to power up and access DSP core registers found on i.MX8QM, i.MX8QXP and i.MX8MP platforms. Add code to request these clocks and enable them at probe. Next patches will add PM support which will only activate clocks when DSP is used. DSP clocks are already documented in Documentation/devicetree/bindings/dsp/fsl,dsp.yaml We choose to add: * imx8_parse_clocks * imx8_enable_clocks * imx8_disable_clocks wrappers because in the future DSP will need to take care about the clocks of other related Audio IPs (e.g SAI, ESAI). Signed-off-by: Daniel Baluta <[email protected]> Reviewed-by: Paul Olaru <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'sound/soc/sof/imx/imx-common.h')
-rw-r--r--sound/soc/sof/imx/imx-common.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/sof/imx/imx-common.h b/sound/soc/sof/imx/imx-common.h
index 1cc7d6704182..ec4b3a5c7496 100644
--- a/sound/soc/sof/imx/imx-common.h
+++ b/sound/soc/sof/imx/imx-common.h
@@ -3,6 +3,8 @@
#ifndef __IMX_COMMON_H__
#define __IMX_COMMON_H__
+#include <linux/clk.h>
+
#define EXCEPT_MAX_HDR_SIZE 0x400
#define IMX8_STACK_DUMP_SIZE 32
@@ -13,4 +15,13 @@ void imx8_get_registers(struct snd_sof_dev *sdev,
void imx8_dump(struct snd_sof_dev *sdev, u32 flags);
+struct imx_clocks {
+ struct clk_bulk_data *dsp_clks;
+ int num_dsp_clks;
+};
+
+int imx8_parse_clocks(struct snd_sof_dev *sdev, struct imx_clocks *clks);
+int imx8_enable_clocks(struct snd_sof_dev *sdev, struct imx_clocks *clks);
+void imx8_disable_clocks(struct snd_sof_dev *sdev, struct imx_clocks *clks);
+
#endif