Lines Matching +full:mt8195 +full:- +full:audio
1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
7 // Hardware interface for mt8195 DSP clock
11 #include "mt8195.h"
12 #include "mt8195-clk.h"
14 #include "../../sof-audio.h"
27 struct device *dev = sdev->dev; in mt8195_adsp_init_clock()
28 struct adsp_priv *priv = sdev->pdata->hw_pdata; in mt8195_adsp_init_clock()
31 priv->clk = devm_kcalloc(dev, ADSP_CLK_MAX, sizeof(*priv->clk), GFP_KERNEL); in mt8195_adsp_init_clock()
33 if (!priv->clk) in mt8195_adsp_init_clock()
34 return -ENOMEM; in mt8195_adsp_init_clock()
37 priv->clk[i] = devm_clk_get(dev, adsp_clks[i]); in mt8195_adsp_init_clock()
38 if (IS_ERR(priv->clk[i])) in mt8195_adsp_init_clock()
39 return PTR_ERR(priv->clk[i]); in mt8195_adsp_init_clock()
47 struct device *dev = sdev->dev; in adsp_enable_all_clock()
48 struct adsp_priv *priv = sdev->pdata->hw_pdata; in adsp_enable_all_clock()
51 ret = clk_prepare_enable(priv->clk[CLK_TOP_MAINPLL_D7_D2]); in adsp_enable_all_clock()
58 ret = clk_prepare_enable(priv->clk[CLK_TOP_ADSP]); in adsp_enable_all_clock()
65 ret = clk_prepare_enable(priv->clk[CLK_TOP_AUDIO_LOCAL_BUS]); in adsp_enable_all_clock()
72 ret = clk_prepare_enable(priv->clk[CLK_SCP_ADSP_AUDIODSP]); in adsp_enable_all_clock()
79 ret = clk_prepare_enable(priv->clk[CLK_TOP_AUDIO_H]); in adsp_enable_all_clock()
89 clk_disable_unprepare(priv->clk[CLK_SCP_ADSP_AUDIODSP]); in adsp_enable_all_clock()
91 clk_disable_unprepare(priv->clk[CLK_TOP_AUDIO_LOCAL_BUS]); in adsp_enable_all_clock()
93 clk_disable_unprepare(priv->clk[CLK_TOP_ADSP]); in adsp_enable_all_clock()
95 clk_disable_unprepare(priv->clk[CLK_TOP_MAINPLL_D7_D2]); in adsp_enable_all_clock()
102 struct adsp_priv *priv = sdev->pdata->hw_pdata; in adsp_disable_all_clock()
104 clk_disable_unprepare(priv->clk[CLK_TOP_AUDIO_H]); in adsp_disable_all_clock()
105 clk_disable_unprepare(priv->clk[CLK_SCP_ADSP_AUDIODSP]); in adsp_disable_all_clock()
106 clk_disable_unprepare(priv->clk[CLK_TOP_AUDIO_LOCAL_BUS]); in adsp_disable_all_clock()
107 clk_disable_unprepare(priv->clk[CLK_TOP_ADSP]); in adsp_disable_all_clock()
108 clk_disable_unprepare(priv->clk[CLK_TOP_MAINPLL_D7_D2]); in adsp_disable_all_clock()
113 struct device *dev = sdev->dev; in adsp_default_clk_init()
114 struct adsp_priv *priv = sdev->pdata->hw_pdata; in adsp_default_clk_init()
120 ret = clk_set_parent(priv->clk[CLK_TOP_ADSP], in adsp_default_clk_init()
121 priv->clk[CLK_TOP_CLK26M]); in adsp_default_clk_init()
127 ret = clk_set_parent(priv->clk[CLK_TOP_AUDIO_LOCAL_BUS], in adsp_default_clk_init()
128 priv->clk[CLK_TOP_MAINPLL_D7_D2]); in adsp_default_clk_init()
134 ret = clk_set_parent(priv->clk[CLK_TOP_AUDIO_H], in adsp_default_clk_init()
135 priv->clk[CLK_TOP_CLK26M]); in adsp_default_clk_init()