Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4fc0b84 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "bolero: tx-macro: Fix link status not connected issue due to clk not enabled"

parents 910c1c1c 18342de1
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2690,6 +2690,7 @@ static int tx_macro_tx_va_mclk_enable(struct tx_macro_priv *tx_priv,
			}
			bolero_clk_rsc_fs_gen_request(tx_priv->dev,
						  true);
			mutex_lock(&tx_priv->mclk_lock);
			if (tx_priv->tx_mclk_users == 0) {
				regmap_update_bits(regmap,
					BOLERO_CDC_TX_TOP_CSR_FREQ_MCLK,
@@ -2702,6 +2703,7 @@ static int tx_macro_tx_va_mclk_enable(struct tx_macro_priv *tx_priv,
					0x01, 0x01);
			}
			tx_priv->tx_mclk_users++;
			mutex_unlock(&tx_priv->mclk_lock);
		}
		if (tx_priv->swr_clk_users == 0) {
			dev_dbg(tx_priv->dev, "%s: reset_swr: %d\n",
@@ -2746,10 +2748,12 @@ static int tx_macro_tx_va_mclk_enable(struct tx_macro_priv *tx_priv,
		if (clk_type == TX_MCLK)
			tx_macro_mclk_enable(tx_priv, 0);
		if (clk_type == VA_MCLK) {
			mutex_lock(&tx_priv->mclk_lock);
			if (tx_priv->tx_mclk_users <= 0) {
				dev_err(tx_priv->dev, "%s: clock already disabled\n",
						__func__);
				tx_priv->tx_mclk_users = 0;
				mutex_unlock(&tx_priv->mclk_lock);
				goto tx_clk;
			}
			tx_priv->tx_mclk_users--;
@@ -2761,7 +2765,7 @@ static int tx_macro_tx_va_mclk_enable(struct tx_macro_priv *tx_priv,
					BOLERO_CDC_TX_CLK_RST_CTRL_MCLK_CONTROL,
					0x01, 0x00);
			}

			mutex_unlock(&tx_priv->mclk_lock);
			bolero_clk_rsc_fs_gen_request(tx_priv->dev,
						false);
			ret = bolero_clk_rsc_request_clock(tx_priv->dev,