summaryrefslogtreecommitdiff
path: root/soc
diff options
context:
space:
mode:
authorlucaswei <lucaswei@google.com>2020-06-01 16:28:38 +0800
committerlucaswei <lucaswei@google.com>2020-06-09 14:35:12 +0800
commit51e7e037c111cf587d30caeab2fd9dc4aca26603 (patch)
treea1912de1e804719e509defb71b3b6d6583d2e232 /soc
parentc15d709a9ded85fc6b98827372e878fb18a9cbdd (diff)
parent0e0e99ffe3c4dfc74cdbb2b9ec2bdc9dee128776 (diff)
downloadmsm-extra-51e7e037c111cf587d30caeab2fd9dc4aca26603.tar.gz
Merge LA.UM.9.12.R2.10.00.00.685.011 via branch 'qcom-msm-4.19-7250-audio-drivers.lnx.4.0.r3' into android-msm-pixel-4.19
Conflicts: asoc/codecs/wcd-mbhc-adc.c asoc/msm-lsm-client.c config/litoauto.conf config/litoautoconf.h dsp/codecs/audio_alac.c dsp/codecs/audio_ape.c dsp/codecs/audio_g711alaw.c dsp/codecs/audio_g711mlaw.c dsp/q6afe.c dsp/q6asm.c dsp/usf.c Bug: 157858241 Signed-off-by: lucaswei <lucaswei@google.com> Change-Id: I8aa73fb62a60d33dcd98d67ce88523fb7e42d10b
Diffstat (limited to 'soc')
-rw-r--r--soc/pinctrl-lpi.c3
-rw-r--r--soc/swr-mstr-ctrl.c13
-rw-r--r--soc/swr-mstr-ctrl.h1
3 files changed, 14 insertions, 3 deletions
diff --git a/soc/pinctrl-lpi.c b/soc/pinctrl-lpi.c
index 0b0eef5a..3258b10f 100644
--- a/soc/pinctrl-lpi.c
+++ b/soc/pinctrl-lpi.c
@@ -15,6 +15,7 @@
#include <linux/types.h>
#include <linux/clk.h>
#include <linux/bitops.h>
+#include <linux/delay.h>
#include <soc/snd_event.h>
#include <dsp/digital-cdc-rsc-mgr.h>
#include <linux/pm_runtime.h>
@@ -489,6 +490,8 @@ static int lpi_notifier_service_cb(struct notifier_block *this,
/* Reset HW votes after SSR */
if (!lpi_dev_up) {
+ /* Add 100ms sleep to ensure AVS is up after SSR */
+ msleep(100);
if (state->lpass_core_hw_vote)
digital_cdc_rsc_mgr_hw_vote_reset(
state->lpass_core_hw_vote);
diff --git a/soc/swr-mstr-ctrl.c b/soc/swr-mstr-ctrl.c
index 69ea20d0..e77d2283 100644
--- a/soc/swr-mstr-ctrl.c
+++ b/soc/swr-mstr-ctrl.c
@@ -1341,9 +1341,9 @@ static void swrm_apply_port_config(struct swr_master *master)
dev_dbg(swrm->dev, "%s: enter bank: %d master_ports: %d\n",
__func__, bank, master->num_port);
-
- swrm_cmd_fifo_wr_cmd(swrm, 0x01, 0xF, 0x00,
- SWRS_SCP_HOST_CLK_DIV2_CTL_BANK(bank));
+ if (!swrm->disable_div2_clk_switch)
+ swrm_cmd_fifo_wr_cmd(swrm, 0x01, 0xF, 0x00,
+ SWRS_SCP_HOST_CLK_DIV2_CTL_BANK(bank));
swrm_copy_data_port_config(master, bank);
}
@@ -2647,6 +2647,7 @@ static int swrm_probe(struct platform_device *pdev)
swrm->state = SWR_MSTR_UP;
swrm->ipc_wakeup = false;
swrm->ipc_wakeup_triggered = false;
+ swrm->disable_div2_clk_switch = FALSE;
init_completion(&swrm->reset);
init_completion(&swrm->broadcast);
init_completion(&swrm->clk_off_complete);
@@ -2668,6 +2669,12 @@ static int swrm_probe(struct platform_device *pdev)
for (i = 0 ; i < SWR_MSTR_PORT_LEN; i++)
INIT_LIST_HEAD(&swrm->mport_cfg[i].port_req_list);
+ if (of_property_read_u32(pdev->dev.of_node,
+ "qcom,disable-div2-clk-switch",
+ &swrm->disable_div2_clk_switch)) {
+ swrm->disable_div2_clk_switch = FALSE;
+ }
+
/* Register LPASS core hw vote */
lpass_core_hw_vote = devm_clk_get(&pdev->dev, "lpass_core_hw_vote");
if (IS_ERR(lpass_core_hw_vote)) {
diff --git a/soc/swr-mstr-ctrl.h b/soc/swr-mstr-ctrl.h
index ce0b64d5..ec5bbd2f 100644
--- a/soc/swr-mstr-ctrl.h
+++ b/soc/swr-mstr-ctrl.h
@@ -180,6 +180,7 @@ struct swr_mstr_ctrl {
int hw_core_clk_en;
int aud_core_clk_en;
int clk_src;
+ u32 disable_div2_clk_switch;
#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_swrm_dent;
struct dentry *debugfs_peek;