Loading asoc/codecs/audio-ext-clk-up.c +13 −5 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. */ #include <linux/kernel.h> Loading @@ -14,6 +14,7 @@ #include <linux/pinctrl/consumer.h> #include <linux/platform_device.h> #include <dt-bindings/clock/qcom,audio-ext-clk.h> #include <linux/ratelimit.h> #include <dsp/q6afe-v2.h> #include "audio-ext-clk-up.h" Loading Loading @@ -67,6 +68,7 @@ static int audio_ext_clk_prepare(struct clk_hw *hw) struct audio_ext_clk_priv *clk_priv = to_audio_clk(hw); struct pinctrl_info *pnctrl_info = &clk_priv->audio_clk.pnctrl_info; int ret; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if ((clk_priv->clk_src >= AUDIO_EXT_CLK_LPASS) && (clk_priv->clk_src < AUDIO_EXT_CLK_LPASS_MAX)) { Loading @@ -75,6 +77,7 @@ static int audio_ext_clk_prepare(struct clk_hw *hw) __func__, clk_priv->clk_src); ret = afe_set_lpass_clk_cfg(IDX_RSVD_3, &clk_priv->clk_cfg); if (ret < 0) { if (__ratelimit(&rtl)) pr_err_ratelimited("%s afe_set_digital_codec_core_clock failed\n", __func__); return ret; Loading @@ -101,6 +104,7 @@ static void audio_ext_clk_unprepare(struct clk_hw *hw) struct audio_ext_clk_priv *clk_priv = to_audio_clk(hw); struct pinctrl_info *pnctrl_info = &clk_priv->audio_clk.pnctrl_info; int ret; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if (pnctrl_info->pinctrl) { ret = pinctrl_select_state(pnctrl_info->pinctrl, Loading @@ -118,10 +122,12 @@ static void audio_ext_clk_unprepare(struct clk_hw *hw) 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) if (ret < 0) { if (__ratelimit(&rtl)) pr_err_ratelimited("%s: afe_set_lpass_clk_cfg failed, ret = %d\n", __func__, ret); } } if (pnctrl_info->base) iowrite32(0, pnctrl_info->base); Loading Loading @@ -149,6 +155,7 @@ static int lpass_hw_vote_prepare(struct clk_hw *hw) { struct audio_ext_clk_priv *clk_priv = to_audio_clk(hw); int ret; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if (clk_priv->clk_src == AUDIO_EXT_CLK_LPASS_CORE_HW_VOTE) { trace_printk("%s: vote for %d clock\n", Loading @@ -170,6 +177,7 @@ static int lpass_hw_vote_prepare(struct clk_hw *hw) "LPASS_HW_DCODEC", &clk_priv->lpass_audio_hwvote_client_handle); if (ret < 0) { if (__ratelimit(&rtl)) pr_err("%s lpass audio hw vote failed %d\n", __func__, ret); return ret; Loading asoc/codecs/bolero/bolero-cdc.c +5 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include <linux/pm_runtime.h> #include <soc/swr-common.h> #include <dsp/digital-cdc-rsc-mgr.h> #include <linux/ratelimit.h> #include "bolero-cdc.h" #include "internal.h" #include "bolero-clk-rsc.h" Loading Loading @@ -1444,6 +1445,7 @@ int bolero_runtime_resume(struct device *dev) { struct bolero_priv *priv = dev_get_drvdata(dev->parent); int ret = 0; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); mutex_lock(&priv->vote_lock); if (priv->lpass_core_hw_vote == NULL) { Loading Loading @@ -1472,6 +1474,7 @@ int bolero_runtime_resume(struct device *dev) if (priv->core_audio_vote_count == 0) { ret = digital_cdc_rsc_mgr_hw_vote_enable(priv->lpass_audio_hw_vote); if (ret < 0) { if (__ratelimit(&rtl)) dev_err(dev, "%s:lpass audio hw enable failed\n", __func__); goto done; Loading asoc/codecs/bolero/bolero-clk-rsc.c +12 −5 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ #include <linux/kernel.h> #include <linux/clk.h> #include <linux/clk-provider.h> #include <linux/ratelimit.h> #include "bolero-cdc.h" #include "bolero-clk-rsc.h" Loading Loading @@ -193,12 +194,14 @@ static int bolero_clk_rsc_mux0_clk_request(struct bolero_clk_rsc *priv, bool enable) { int ret = 0; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if (enable) { /* Enable Requested Core clk */ if (priv->clk_cnt[clk_id] == 0) { ret = clk_prepare_enable(priv->clk[clk_id]); if (ret < 0) { if (__ratelimit(&rtl)) dev_err_ratelimited(priv->dev, "%s:clk_id %d enable failed\n", __func__, clk_id); goto done; Loading @@ -207,6 +210,7 @@ static int bolero_clk_rsc_mux0_clk_request(struct bolero_clk_rsc *priv, ret = clk_prepare_enable( priv->clk[clk_id + NPL_CLK_OFFSET]); if (ret < 0) { if (__ratelimit(&rtl)) dev_err_ratelimited(priv->dev, "%s:clk_id %d enable failed\n", __func__, clk_id + NPL_CLK_OFFSET); Loading Loading @@ -246,6 +250,7 @@ static int bolero_clk_rsc_mux1_clk_request(struct bolero_clk_rsc *priv, int ret = 0; int default_clk_id = priv->default_clk_id[clk_id]; u32 muxsel = 0; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); clk_muxsel = bolero_clk_rsc_get_clk_muxsel(priv, clk_id); if (!clk_muxsel) { Loading @@ -265,6 +270,7 @@ static int bolero_clk_rsc_mux1_clk_request(struct bolero_clk_rsc *priv, ret = clk_prepare_enable(priv->clk[clk_id]); if (ret < 0) { if (__ratelimit(&rtl)) dev_err_ratelimited(priv->dev, "%s:clk_id %d enable failed\n", __func__, clk_id); goto err_clk; Loading @@ -273,6 +279,7 @@ static int bolero_clk_rsc_mux1_clk_request(struct bolero_clk_rsc *priv, ret = clk_prepare_enable( priv->clk[clk_id + NPL_CLK_OFFSET]); if (ret < 0) { if (__ratelimit(&rtl)) dev_err_ratelimited(priv->dev, "%s:clk_id %d enable failed\n", __func__, clk_id + NPL_CLK_OFFSET); Loading dsp/q6afe.c +4 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include <dsp/q6audio-v2.h> #include <dsp/q6common.h> #include <dsp/q6core.h> #include <linux/ratelimit.h> #include <dsp/msm-audio-event-notify.h> #include <ipc/apr_tal.h> #include "adsp_err.h" Loading Loading @@ -9222,6 +9223,7 @@ int afe_set_lpass_clk_cfg(int index, struct afe_clk_set *cfg) { struct param_hdr_v3 param_hdr; int ret = 0; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if (!cfg) { pr_err("%s: clock cfg is NULL\n", __func__); Loading Loading @@ -9260,6 +9262,7 @@ int afe_set_lpass_clk_cfg(int index, struct afe_clk_set *cfg) ret = q6afe_svc_pack_and_set_param_in_band(index, param_hdr, (u8 *) cfg); if (ret < 0) { if (__ratelimit(&rtl)) pr_err_ratelimited("%s: AFE clk cfg failed with ret %d\n", __func__, ret); trace_printk("%s: AFE clk cfg failed with ret %d\n", Loading ipc/apr.c +4 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <linux/slab.h> #include <linux/ipc_logging.h> #include <linux/of_platform.h> #include <linux/ratelimit.h> #include <soc/qcom/subsystem_restart.h> #include <linux/qcom_scm.h> #include <soc/snd_event.h> Loading Loading @@ -370,6 +371,7 @@ int apr_send_pkt(void *handle, uint32_t *buf) uint16_t w_len; int rc; unsigned long flags; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if (!handle || !buf) { pr_err("APR: Wrong parameters for %s\n", Loading @@ -383,6 +385,7 @@ int apr_send_pkt(void *handle, uint32_t *buf) if ((svc->dest_id == APR_DEST_QDSP6) && (apr_get_q6_state() != APR_SUBSYS_LOADED)) { if (__ratelimit(&rtl)) pr_err_ratelimited("%s: Still dsp is not Up\n", __func__); return -ENETRESET; } else if ((svc->dest_id == APR_DEST_MODEM) && Loading Loading
asoc/codecs/audio-ext-clk-up.c +13 −5 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. */ #include <linux/kernel.h> Loading @@ -14,6 +14,7 @@ #include <linux/pinctrl/consumer.h> #include <linux/platform_device.h> #include <dt-bindings/clock/qcom,audio-ext-clk.h> #include <linux/ratelimit.h> #include <dsp/q6afe-v2.h> #include "audio-ext-clk-up.h" Loading Loading @@ -67,6 +68,7 @@ static int audio_ext_clk_prepare(struct clk_hw *hw) struct audio_ext_clk_priv *clk_priv = to_audio_clk(hw); struct pinctrl_info *pnctrl_info = &clk_priv->audio_clk.pnctrl_info; int ret; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if ((clk_priv->clk_src >= AUDIO_EXT_CLK_LPASS) && (clk_priv->clk_src < AUDIO_EXT_CLK_LPASS_MAX)) { Loading @@ -75,6 +77,7 @@ static int audio_ext_clk_prepare(struct clk_hw *hw) __func__, clk_priv->clk_src); ret = afe_set_lpass_clk_cfg(IDX_RSVD_3, &clk_priv->clk_cfg); if (ret < 0) { if (__ratelimit(&rtl)) pr_err_ratelimited("%s afe_set_digital_codec_core_clock failed\n", __func__); return ret; Loading @@ -101,6 +104,7 @@ static void audio_ext_clk_unprepare(struct clk_hw *hw) struct audio_ext_clk_priv *clk_priv = to_audio_clk(hw); struct pinctrl_info *pnctrl_info = &clk_priv->audio_clk.pnctrl_info; int ret; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if (pnctrl_info->pinctrl) { ret = pinctrl_select_state(pnctrl_info->pinctrl, Loading @@ -118,10 +122,12 @@ static void audio_ext_clk_unprepare(struct clk_hw *hw) 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) if (ret < 0) { if (__ratelimit(&rtl)) pr_err_ratelimited("%s: afe_set_lpass_clk_cfg failed, ret = %d\n", __func__, ret); } } if (pnctrl_info->base) iowrite32(0, pnctrl_info->base); Loading Loading @@ -149,6 +155,7 @@ static int lpass_hw_vote_prepare(struct clk_hw *hw) { struct audio_ext_clk_priv *clk_priv = to_audio_clk(hw); int ret; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if (clk_priv->clk_src == AUDIO_EXT_CLK_LPASS_CORE_HW_VOTE) { trace_printk("%s: vote for %d clock\n", Loading @@ -170,6 +177,7 @@ static int lpass_hw_vote_prepare(struct clk_hw *hw) "LPASS_HW_DCODEC", &clk_priv->lpass_audio_hwvote_client_handle); if (ret < 0) { if (__ratelimit(&rtl)) pr_err("%s lpass audio hw vote failed %d\n", __func__, ret); return ret; Loading
asoc/codecs/bolero/bolero-cdc.c +5 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include <linux/pm_runtime.h> #include <soc/swr-common.h> #include <dsp/digital-cdc-rsc-mgr.h> #include <linux/ratelimit.h> #include "bolero-cdc.h" #include "internal.h" #include "bolero-clk-rsc.h" Loading Loading @@ -1444,6 +1445,7 @@ int bolero_runtime_resume(struct device *dev) { struct bolero_priv *priv = dev_get_drvdata(dev->parent); int ret = 0; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); mutex_lock(&priv->vote_lock); if (priv->lpass_core_hw_vote == NULL) { Loading Loading @@ -1472,6 +1474,7 @@ int bolero_runtime_resume(struct device *dev) if (priv->core_audio_vote_count == 0) { ret = digital_cdc_rsc_mgr_hw_vote_enable(priv->lpass_audio_hw_vote); if (ret < 0) { if (__ratelimit(&rtl)) dev_err(dev, "%s:lpass audio hw enable failed\n", __func__); goto done; Loading
asoc/codecs/bolero/bolero-clk-rsc.c +12 −5 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ #include <linux/kernel.h> #include <linux/clk.h> #include <linux/clk-provider.h> #include <linux/ratelimit.h> #include "bolero-cdc.h" #include "bolero-clk-rsc.h" Loading Loading @@ -193,12 +194,14 @@ static int bolero_clk_rsc_mux0_clk_request(struct bolero_clk_rsc *priv, bool enable) { int ret = 0; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if (enable) { /* Enable Requested Core clk */ if (priv->clk_cnt[clk_id] == 0) { ret = clk_prepare_enable(priv->clk[clk_id]); if (ret < 0) { if (__ratelimit(&rtl)) dev_err_ratelimited(priv->dev, "%s:clk_id %d enable failed\n", __func__, clk_id); goto done; Loading @@ -207,6 +210,7 @@ static int bolero_clk_rsc_mux0_clk_request(struct bolero_clk_rsc *priv, ret = clk_prepare_enable( priv->clk[clk_id + NPL_CLK_OFFSET]); if (ret < 0) { if (__ratelimit(&rtl)) dev_err_ratelimited(priv->dev, "%s:clk_id %d enable failed\n", __func__, clk_id + NPL_CLK_OFFSET); Loading Loading @@ -246,6 +250,7 @@ static int bolero_clk_rsc_mux1_clk_request(struct bolero_clk_rsc *priv, int ret = 0; int default_clk_id = priv->default_clk_id[clk_id]; u32 muxsel = 0; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); clk_muxsel = bolero_clk_rsc_get_clk_muxsel(priv, clk_id); if (!clk_muxsel) { Loading @@ -265,6 +270,7 @@ static int bolero_clk_rsc_mux1_clk_request(struct bolero_clk_rsc *priv, ret = clk_prepare_enable(priv->clk[clk_id]); if (ret < 0) { if (__ratelimit(&rtl)) dev_err_ratelimited(priv->dev, "%s:clk_id %d enable failed\n", __func__, clk_id); goto err_clk; Loading @@ -273,6 +279,7 @@ static int bolero_clk_rsc_mux1_clk_request(struct bolero_clk_rsc *priv, ret = clk_prepare_enable( priv->clk[clk_id + NPL_CLK_OFFSET]); if (ret < 0) { if (__ratelimit(&rtl)) dev_err_ratelimited(priv->dev, "%s:clk_id %d enable failed\n", __func__, clk_id + NPL_CLK_OFFSET); Loading
dsp/q6afe.c +4 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include <dsp/q6audio-v2.h> #include <dsp/q6common.h> #include <dsp/q6core.h> #include <linux/ratelimit.h> #include <dsp/msm-audio-event-notify.h> #include <ipc/apr_tal.h> #include "adsp_err.h" Loading Loading @@ -9222,6 +9223,7 @@ int afe_set_lpass_clk_cfg(int index, struct afe_clk_set *cfg) { struct param_hdr_v3 param_hdr; int ret = 0; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if (!cfg) { pr_err("%s: clock cfg is NULL\n", __func__); Loading Loading @@ -9260,6 +9262,7 @@ int afe_set_lpass_clk_cfg(int index, struct afe_clk_set *cfg) ret = q6afe_svc_pack_and_set_param_in_band(index, param_hdr, (u8 *) cfg); if (ret < 0) { if (__ratelimit(&rtl)) pr_err_ratelimited("%s: AFE clk cfg failed with ret %d\n", __func__, ret); trace_printk("%s: AFE clk cfg failed with ret %d\n", Loading
ipc/apr.c +4 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <linux/slab.h> #include <linux/ipc_logging.h> #include <linux/of_platform.h> #include <linux/ratelimit.h> #include <soc/qcom/subsystem_restart.h> #include <linux/qcom_scm.h> #include <soc/snd_event.h> Loading Loading @@ -370,6 +371,7 @@ int apr_send_pkt(void *handle, uint32_t *buf) uint16_t w_len; int rc; unsigned long flags; static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if (!handle || !buf) { pr_err("APR: Wrong parameters for %s\n", Loading @@ -383,6 +385,7 @@ int apr_send_pkt(void *handle, uint32_t *buf) if ((svc->dest_id == APR_DEST_QDSP6) && (apr_get_q6_state() != APR_SUBSYS_LOADED)) { if (__ratelimit(&rtl)) pr_err_ratelimited("%s: Still dsp is not Up\n", __func__); return -ENETRESET; } else if ((svc->dest_id == APR_DEST_MODEM) && Loading