codecs: Enable clock voting logs to debug AHB/NOC issues

Enable clock voting logs to debug stability issues.

Change-Id: Ie1f995ab004778a81ea42baad15ea36858407e9a
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
This commit is contained in:
Aditya Bavanari
2019-09-16 18:27:51 -07:00
committed by Gerrit - the friendly Code Review server
parent d155d7f509
commit 236ff485d2
12 changed files with 180 additions and 20 deletions

View File

@@ -71,6 +71,8 @@ static int audio_ext_clk_prepare(struct clk_hw *hw)
if ((clk_priv->clk_src >= AUDIO_EXT_CLK_LPASS) &&
(clk_priv->clk_src < AUDIO_EXT_CLK_LPASS_MAX)) {
clk_priv->clk_cfg.enable = 1;
trace_printk("%s: vote for %d clock\n",
__func__, clk_priv->clk_src);
ret = afe_set_lpass_clk_cfg(IDX_RSVD_3, &clk_priv->clk_cfg);
if (ret < 0) {
pr_err_ratelimited("%s afe_set_digital_codec_core_clock failed\n",
@@ -113,6 +115,8 @@ static void audio_ext_clk_unprepare(struct clk_hw *hw)
if ((clk_priv->clk_src >= AUDIO_EXT_CLK_LPASS) &&
(clk_priv->clk_src < AUDIO_EXT_CLK_LPASS_MAX)) {
clk_priv->clk_cfg.enable = 0;
trace_printk("%s: unvote for %d clock\n",
__func__, clk_priv->clk_src);
ret = afe_set_lpass_clk_cfg(IDX_RSVD_3, &clk_priv->clk_cfg);
if (ret < 0)
pr_err_ratelimited("%s: afe_set_lpass_clk_cfg failed, ret = %d\n",
@@ -147,6 +151,8 @@ static int lpass_hw_vote_prepare(struct clk_hw *hw)
int ret;
if (clk_priv->clk_src == AUDIO_EXT_CLK_LPASS_CORE_HW_VOTE) {
trace_printk("%s: vote for %d clock\n",
__func__, clk_priv->clk_src);
ret = afe_vote_lpass_core_hw(AFE_LPASS_CORE_HW_MACRO_BLOCK,
"LPASS_HW_MACRO",
&clk_priv->lpass_core_hwvote_client_handle);
@@ -158,6 +164,8 @@ static int lpass_hw_vote_prepare(struct clk_hw *hw)
}
if (clk_priv->clk_src == AUDIO_EXT_CLK_LPASS_AUDIO_HW_VOTE) {
trace_printk("%s: vote for %d clock\n",
__func__, clk_priv->clk_src);
ret = afe_vote_lpass_core_hw(AFE_LPASS_CORE_HW_DCODEC_BLOCK,
"LPASS_HW_DCODEC",
&clk_priv->lpass_audio_hwvote_client_handle);
@@ -177,6 +185,8 @@ static void lpass_hw_vote_unprepare(struct clk_hw *hw)
int ret = 0;
if (clk_priv->clk_src == AUDIO_EXT_CLK_LPASS_CORE_HW_VOTE) {
trace_printk("%s: unvote for %d clock\n",
__func__, clk_priv->clk_src);
ret = afe_unvote_lpass_core_hw(
AFE_LPASS_CORE_HW_MACRO_BLOCK,
clk_priv->lpass_core_hwvote_client_handle);
@@ -187,6 +197,8 @@ static void lpass_hw_vote_unprepare(struct clk_hw *hw)
}
if (clk_priv->clk_src == AUDIO_EXT_CLK_LPASS_AUDIO_HW_VOTE) {
trace_printk("%s: unvote for %d clock\n",
__func__, clk_priv->clk_src);
ret = afe_unvote_lpass_core_hw(
AFE_LPASS_CORE_HW_DCODEC_BLOCK,
clk_priv->lpass_audio_hwvote_client_handle);