Skip to content

Commit 02b47c2

Browse files
Ram Prakash Guptanitinrawat123
authored andcommitted
FROMLIST: mmc: sdhci-msm: Set ice clk rate
Set ice clk rate from sdhci msm platform driver, needed for target which are having legacy ice support, and need sdhci msm platform driver to set rate. Link: https://lore.kernel.org/all/20260529081045.2877910-2-ram.gupta@oss.qualcomm.com/ Signed-off-by: Ram Prakash Gupta <ram.gupta@oss.qualcomm.com> Signed-off-by: Pradeep P V K <pradeep.pragallapati@oss.qualcomm.com>
1 parent b689623 commit 02b47c2

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

drivers/mmc/host/sdhci-msm.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ struct sdhci_msm_host {
286286
/* core, iface, cal and sleep clocks */
287287
struct clk_bulk_data bulk_clks[4];
288288
#ifdef CONFIG_MMC_CRYPTO
289+
struct clk *ice_clk; /* ICE clock */
289290
struct qcom_ice *ice;
290291
#endif
291292
unsigned long clk_rate;
@@ -2703,6 +2704,17 @@ static int sdhci_msm_probe(struct platform_device *pdev)
27032704
return ret;
27042705
}
27052706

2707+
#ifdef CONFIG_MMC_CRYPTO
2708+
/* Setup ICE clock */
2709+
msm_host->ice_clk = devm_clk_get(&pdev->dev, "ice");
2710+
if (!IS_ERR(msm_host->ice_clk)) {
2711+
/* Vote for max. clk rate for max. performance */
2712+
ret = clk_set_rate(msm_host->ice_clk, INT_MAX);
2713+
if (ret)
2714+
dev_err(&pdev->dev, "ice clk set rate failed (%d)\n", ret);
2715+
}
2716+
#endif
2717+
27062718
/* Setup main peripheral bus clock */
27072719
clk = devm_clk_get(&pdev->dev, "iface");
27082720
if (IS_ERR(clk)) {

0 commit comments

Comments
 (0)