Skip to content

Commit 1b7b09f

Browse files
Ram Prakash GuptaPradeep-pvk
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 e254dae commit 1b7b09f

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
@@ -275,6 +275,7 @@ struct sdhci_msm_host {
275275
/* core, iface, cal and sleep clocks */
276276
struct clk_bulk_data bulk_clks[4];
277277
#ifdef CONFIG_MMC_CRYPTO
278+
struct clk *ice_clk; /* ICE clock */
278279
struct qcom_ice *ice;
279280
#endif
280281
unsigned long clk_rate;
@@ -2594,6 +2595,17 @@ static int sdhci_msm_probe(struct platform_device *pdev)
25942595
return ret;
25952596
}
25962597

2598+
#ifdef CONFIG_MMC_CRYPTO
2599+
/* Setup ICE clock */
2600+
msm_host->ice_clk = devm_clk_get(&pdev->dev, "ice");
2601+
if (!IS_ERR(msm_host->ice_clk)) {
2602+
/* Vote for max. clk rate for max. performance */
2603+
ret = clk_set_rate(msm_host->ice_clk, INT_MAX);
2604+
if (ret)
2605+
dev_err(&pdev->dev, "ice clk set rate failed (%d)\n", ret);
2606+
}
2607+
#endif
2608+
25972609
/* Setup main peripheral bus clock */
25982610
clk = devm_clk_get(&pdev->dev, "iface");
25992611
if (IS_ERR(clk)) {

0 commit comments

Comments
 (0)