Skip to contentSkip to conversation

mmc: sdhci-msm: detect if tassadar_dll is used by using core version

PATCH Applied Dmitry Baryshkov 4 participants 4 messages Nov 12, 2020 – Dec 29, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mmc: sdhci-msm: detect if tassadar_dll is used by using core version

Detect if tassadar_dll is required by using core version rather than just specifying it in the sdhci_msm_variant_info.

Cc Veerabhadrarao Badiganti <[email protected]>
---
 drivers/mmc/host/sdhci-msm.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
drivers/mmc/host/sdhci-msm.c +3 -10
index 3451eb325513..9c7927b03253 100644
@@ -248,7 +248,6 @@ struct sdhci_msm_variant_ops {
 struct sdhci_msm_variant_info {
 	bool mci_removed;
 	bool restore_dll_config;
-	bool uses_tassadar_dll;
 	const struct sdhci_msm_variant_ops *var_ops;
 	const struct sdhci_msm_offset *offset;
 };
@@ -2154,18 +2153,10 @@ static const struct sdhci_msm_variant_info sdm845_sdhci_var = {
 	.offset = &sdhci_msm_v5_offset,
 };
 
-static const struct sdhci_msm_variant_info sm8250_sdhci_var = {
-	.mci_removed = true,
-	.uses_tassadar_dll = true,
-	.var_ops = &v5_var_ops,
-	.offset = &sdhci_msm_v5_offset,
-};
-
 static const struct of_device_id sdhci_msm_dt_match[] = {
 	{.compatible = "qcom,sdhci-msm-v4", .data = &sdhci_msm_mci_var},
 	{.compatible = "qcom,sdhci-msm-v5", .data = &sdhci_msm_v5_var},
 	{.compatible = "qcom,sdm845-sdhci", .data = &sdm845_sdhci_var},
-	{.compatible = "qcom,sm8250-sdhci", .data = &sm8250_sdhci_var},
 	{.compatible = "qcom,sc7180-sdhci", .data = &sdm845_sdhci_var},
 	{},
 };
@@ -2249,7 +2240,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)
 	msm_host->restore_dll_config = var_info->restore_dll_config;
 	msm_host->var_ops = var_info->var_ops;
 	msm_host->offset = var_info->offset;
-	msm_host->uses_tassadar_dll = var_info->uses_tassadar_dll;
 
 	msm_offset = msm_host->offset;
 
@@ -2396,6 +2386,9 @@ static int sdhci_msm_probe(struct platform_device *pdev)
 	if (core_major == 1 && core_minor >= 0x49)
 		msm_host->updated_ddr_cfg = true;
 
+	if (core_major == 1 && core_minor >= 0x71)
+		msm_host->uses_tassadar_dll = true;
+
 	ret = sdhci_msm_register_vreg(msm_host);
 	if (ret)
 		goto clk_disable;
Signature · 1 line
2.28.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Dmitry Baryshkov

Detect if tassadar_dll is required by using core version rather than just specifying it in the sdhci_msm_variant_info.

Cc Veerabhadrarao Badiganti <[email protected]>

---

Quoted 52 lines
  drivers/mmc/host/sdhci-msm.c | 13 +++----------
  1 file changed, 3 insertions(+), 10 deletions(-)
drivers/mmc/host/sdhci-msm.c +3 -10
index 3451eb325513..9c7927b03253 100644
@@ -248,7 +248,6 @@ struct sdhci_msm_variant_ops {
  struct sdhci_msm_variant_info {
  	bool mci_removed;
  	bool restore_dll_config;
-	bool uses_tassadar_dll;
  	const struct sdhci_msm_variant_ops *var_ops;
  	const struct sdhci_msm_offset *offset;
  };
@@ -2154,18 +2153,10 @@ static const struct sdhci_msm_variant_info sdm845_sdhci_var = {
  	.offset = &sdhci_msm_v5_offset,
  };
 
-static const struct sdhci_msm_variant_info sm8250_sdhci_var = {
-	.mci_removed = true,
-	.uses_tassadar_dll = true,
-	.var_ops = &v5_var_ops,
-	.offset = &sdhci_msm_v5_offset,
-};
-
  static const struct of_device_id sdhci_msm_dt_match[] = {
  	{.compatible = "qcom,sdhci-msm-v4", .data = &sdhci_msm_mci_var},
  	{.compatible = "qcom,sdhci-msm-v5", .data = &sdhci_msm_v5_var},
  	{.compatible = "qcom,sdm845-sdhci", .data = &sdm845_sdhci_var},
-	{.compatible = "qcom,sm8250-sdhci", .data = &sm8250_sdhci_var},
  	{.compatible = "qcom,sc7180-sdhci", .data = &sdm845_sdhci_var},
  	{},
  };
@@ -2249,7 +2240,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)
  	msm_host->restore_dll_config = var_info->restore_dll_config;
  	msm_host->var_ops = var_info->var_ops;
  	msm_host->offset = var_info->offset;
-	msm_host->uses_tassadar_dll = var_info->uses_tassadar_dll;
 
  	msm_offset = msm_host->offset;
 
@@ -2396,6 +2386,9 @@ static int sdhci_msm_probe(struct platform_device *pdev)
  	if (core_major == 1 && core_minor >= 0x49)
  		msm_host->updated_ddr_cfg = true;
 
+	if (core_major == 1 && core_minor >= 0x71)
+		msm_host->uses_tassadar_dll = true;
+
  	ret = sdhci_msm_register_vreg(msm_host);
  	if (ret)
  		goto clk_disable;
#2 lore raw
In reply to Dmitry Baryshkov
Quoted 6 lines · Dmitry Baryshkov

Detect if tassadar_dll is required by using core version rather than just specifying it in the sdhci_msm_variant_info.

Cc Veerabhadrarao Badiganti <[email protected]>

Applied for next, thanks!

Kind regards
Uffe

Quoted 56 lines
---
 drivers/mmc/host/sdhci-msm.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
drivers/mmc/host/sdhci-msm.c +3 -11
index 3451eb325513..9c7927b03253 100644
@@ -248,7 +248,6 @@ struct sdhci_msm_variant_ops {
 struct sdhci_msm_variant_info {
        bool mci_removed;
        bool restore_dll_config;
-       bool uses_tassadar_dll;
        const struct sdhci_msm_variant_ops *var_ops;
        const struct sdhci_msm_offset *offset;
 };
@@ -2154,18 +2153,10 @@ static const struct sdhci_msm_variant_info sdm845_sdhci_var = {
        .offset = &sdhci_msm_v5_offset,
 };
 
-static const struct sdhci_msm_variant_info sm8250_sdhci_var = {
-       .mci_removed = true,
-       .uses_tassadar_dll = true,
-       .var_ops = &v5_var_ops,
-       .offset = &sdhci_msm_v5_offset,
-};
-
 static const struct of_device_id sdhci_msm_dt_match[] = {
        {.compatible = "qcom,sdhci-msm-v4", .data = &sdhci_msm_mci_var},
        {.compatible = "qcom,sdhci-msm-v5", .data = &sdhci_msm_v5_var},
        {.compatible = "qcom,sdm845-sdhci", .data = &sdm845_sdhci_var},
-       {.compatible = "qcom,sm8250-sdhci", .data = &sm8250_sdhci_var},
        {.compatible = "qcom,sc7180-sdhci", .data = &sdm845_sdhci_var},
        {},
 };
@@ -2249,7 +2240,6 @@ static int sdhci_msm_probe(struct platform_device *pdev)
        msm_host->restore_dll_config = var_info->restore_dll_config;
        msm_host->var_ops = var_info->var_ops;
        msm_host->offset = var_info->offset;
-       msm_host->uses_tassadar_dll = var_info->uses_tassadar_dll;
 
        msm_offset = msm_host->offset;
 
@@ -2396,6 +2386,9 @@ static int sdhci_msm_probe(struct platform_device *pdev)
        if (core_major == 1 && core_minor >= 0x49)
                msm_host->updated_ddr_cfg = true;
 
+       if (core_major == 1 && core_minor >= 0x71)
+               msm_host->uses_tassadar_dll = true;
+
        ret = sdhci_msm_register_vreg(msm_host);
        if (ret)
                goto clk_disable;
--

2.28.0

#3 lore raw
In reply to Dmitry Baryshkov
This patch was applied to qcom/linux.git (refs/heads/for-next):

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

Quoted 8 lines · On Thu, 12 Nov 2020 20:36:36 +0300 you wrote:

Detect if tassadar_dll is required by using core version rather than just specifying it in the sdhci_msm_variant_info.

Cc Veerabhadrarao Badiganti <[email protected]>
---
 drivers/mmc/host/sdhci-msm.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

Here is the summary with links:
- [v2] mmc: sdhci-msm: detect if tassadar_dll is used by using core version

    https://git.kernel.org/qcom/c/8ffbfe43e903

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html