summaryrefslogtreecommitdiff
path: root/soc
diff options
context:
space:
mode:
authorqctecmdr <qctecmdr@localhost>2020-04-20 03:33:41 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2020-04-20 03:33:41 -0700
commitbc30eea9c6da66912b9f2f2eb8c88b875d0246fb (patch)
treecfac57835de7429d386d1efce5675c43f2a38fc2 /soc
parent0f652c84c4c15050f6b0a7ee8a585914d695c9e7 (diff)
parent687f98214dd8276c6d2a7b79e739a3ea5428762b (diff)
downloadmsm-extra-bc30eea9c6da66912b9f2f2eb8c88b875d0246fb.tar.gz
Merge "soc: swr-mstr: Add node to disable clk switch for rx master"
Diffstat (limited to 'soc')
-rw-r--r--soc/swr-mstr-ctrl.c13
-rw-r--r--soc/swr-mstr-ctrl.h1
2 files changed, 11 insertions, 3 deletions
diff --git a/soc/swr-mstr-ctrl.c b/soc/swr-mstr-ctrl.c
index db81ffc9..6358437f 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);
}
@@ -2648,6 +2648,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);
@@ -2669,6 +2670,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;