diff options
author | Georgi Djakov <georgi.djakov@linaro.org> | 2017-12-11 13:13:04 +0200 |
---|---|---|
committer | Georgi Djakov <georgi.djakov@linaro.org> | 2018-12-04 15:12:08 +0200 |
commit | d1f8eef964f27fb6baa84194c6b6748c6640c8ef (patch) | |
tree | d9695d5a62f9b8a8107b448dc660e31e3cc1c20a | |
parent | 1acba25b2f6055fc66666e079ace4d119ba8fcf4 (diff) |
scsi: ufs-qcom: Use the interconnect API
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
-rw-r--r-- | drivers/scsi/ufs/Kconfig | 1 | ||||
-rw-r--r-- | drivers/scsi/ufs/ufs-qcom.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig index 2ddd426323e9..7dea8a6347b0 100644 --- a/drivers/scsi/ufs/Kconfig +++ b/drivers/scsi/ufs/Kconfig @@ -91,6 +91,7 @@ config SCSI_UFS_DWC_TC_PLATFORM config SCSI_UFS_QCOM tristate "QCOM specific hooks to UFS controller platform driver" depends on SCSI_UFSHCD_PLATFORM && ARCH_QCOM + depends on INTERCONNECT || !INTERCONNECT select PHY_QCOM_UFS help This selects the QCOM specific additions to UFSHCD platform driver. diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index 3aeadb14aae1..d5dfcafa263f 100644 --- a/drivers/scsi/ufs/ufs-qcom.c +++ b/drivers/scsi/ufs/ufs-qcom.c @@ -12,6 +12,7 @@ * */ +#include <linux/interconnect.h> #include <linux/time.h> #include <linux/of.h> #include <linux/platform_device.h> @@ -876,6 +877,7 @@ static int ufs_qcom_bus_register(struct ufs_qcom_host *host) } #endif /* CONFIG_MSM_BUS_SCALING */ + static void ufs_qcom_dev_ref_clk_ctrl(struct ufs_qcom_host *host, bool enable) { if (host->dev_ref_clk_ctrl_mmio && @@ -1650,6 +1652,17 @@ static int ufs_qcom_probe(struct platform_device *pdev) { int err; struct device *dev = &pdev->dev; + struct icc_path *path = of_icc_get(dev, "ddr"); + struct icc_path *path_cfg = of_icc_get(dev, "cfg"); + + if (IS_ERR(path)) + return PTR_ERR(path); + + if (IS_ERR(path_cfg)) + return PTR_ERR(path_cfg); + + icc_set(path, 4096000, 0); + icc_set(path_cfg, 1000, 0); /* Perform generic probe */ err = ufshcd_pltfrm_init(pdev, &ufs_hba_qcom_vops); |