[COMMON] scsi: ufs: Remove comment at pm_qos
authorJaeHun Jung <jh0801.jung@samsung.com>
Tue, 12 Jun 2018 03:52:34 +0000 (12:52 +0900)
committerJaehun Jung <jh0801.jung@samsung.com>
Wed, 20 Jun 2018 00:18:17 +0000 (09:18 +0900)
Add pm_qos code for min lock.

Change-Id: Ie9ba65c70df7802480abfd1b0d37b6bfb9468073
Signed-off-by: JaeHun Jung <jh0801.jung@samsung.com>
drivers/scsi/ufs/ufs-exynos.c
drivers/scsi/ufs/ufshcd.c

index 2548f9c5e30f639ceacfcf35eb934a4531e4d3fa..94737d5fa5c1ff24a133933dff384b8d37563c57 100644 (file)
@@ -730,8 +730,8 @@ static int exynos_ufs_pre_setup_clocks(struct ufs_hba *hba, bool on)
                /* HWAGC disable */
                exynos_ufs_set_hwacg_control(ufs, false);
        } else {
-               //pm_qos_update_request(&ufs->pm_qos_int, 0);
-//             pm_qos_update_request(&ufs->pm_qos_fsys0, 0);
+               pm_qos_update_request(&ufs->pm_qos_int, 0);
+               pm_qos_update_request(&ufs->pm_qos_fsys0, 0);
 
                /*
                 * BG/SQ off
@@ -754,8 +754,8 @@ static int exynos_ufs_setup_clocks(struct ufs_hba *hba, bool on)
                 */
                ret = ufs_pre_h8_exit(ufs);
 
-               //pm_qos_update_request(&ufs->pm_qos_int, ufs->pm_qos_int_value);
-//             pm_qos_update_request(&ufs->pm_qos_fsys0, ufs->pm_qos_fsys0_value);
+               pm_qos_update_request(&ufs->pm_qos_int, ufs->pm_qos_int_value);
+               pm_qos_update_request(&ufs->pm_qos_fsys0, ufs->pm_qos_fsys0_value);
 
        } else {
                /*
@@ -924,8 +924,8 @@ static int __exynos_ufs_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
 {
        struct exynos_ufs *ufs = to_exynos_ufs(hba);
 
-       //pm_qos_update_request(&ufs->pm_qos_int, 0);
-//     pm_qos_update_request(&ufs->pm_qos_fsys0, 0);
+       pm_qos_update_request(&ufs->pm_qos_int, 0);
+       pm_qos_update_request(&ufs->pm_qos_fsys0, 0);
 
        exynos_ufs_dev_reset_ctrl(ufs, false);
 
@@ -1301,8 +1301,8 @@ static int exynos_ufs_probe(struct platform_device *pdev)
        dev->platform_data = ufs;
        dev->dma_mask = &exynos_ufs_dma_mask;
 
-//     pm_qos_add_request(&ufs->pm_qos_int, PM_QOS_DEVICE_THROUGHPUT, 0);
-//     pm_qos_add_request(&ufs->pm_qos_fsys0, PM_QOS_FSYS0_THROUGHPUT, 0);
+       pm_qos_add_request(&ufs->pm_qos_int, PM_QOS_DEVICE_THROUGHPUT, 0);
+       pm_qos_add_request(&ufs->pm_qos_fsys0, PM_QOS_BUS_THROUGHPUT, 0);
        if (ufs->tcxo_ex_ctrl)
                spin_lock_init(&fsys0_tcxo_lock);
 
@@ -1317,8 +1317,8 @@ static int exynos_ufs_remove(struct platform_device *pdev)
 
        ufshcd_pltfrm_exit(pdev);
 
-//     pm_qos_remove_request(&ufs->pm_qos_fsys0);
-//     pm_qos_remove_request(&ufs->pm_qos_int);
+       pm_qos_remove_request(&ufs->pm_qos_fsys0);
+       pm_qos_remove_request(&ufs->pm_qos_int);
 
        ufs->misc_flags = EXYNOS_UFS_MISC_TOGGLE_LOG;
 
index 4a6c934734e39edceff6908bb2bc2cac19a2ec18..4bfe2e64c31df5122979059cb80664c597cf831c 100644 (file)
@@ -7990,15 +7990,15 @@ static int ufshcd_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
        if (ufshcd_is_shutdown_pm(pm_op))
                ufs_shutdown_state = 1;
 
-//     if ((req_dev_pwr_mode != hba->curr_dev_pwr_mode) &&
-//          ((ufshcd_is_runtime_pm(pm_op) && !hba->auto_bkops_enabled) ||
-//            !ufshcd_is_runtime_pm(pm_op))) {
+       if ((req_dev_pwr_mode != hba->curr_dev_pwr_mode) &&
+            ((ufshcd_is_runtime_pm(pm_op) && !hba->auto_bkops_enabled) ||
+              !ufshcd_is_runtime_pm(pm_op))) {
                /* ensure that bkops is disabled */
-//             ufshcd_disable_auto_bkops(hba);
-//             ret = ufshcd_set_dev_pwr_mode(hba, req_dev_pwr_mode);
-//             if (ret)
-//                     goto enable_gating;
-//     }
+               ufshcd_disable_auto_bkops(hba);
+               ret = ufshcd_set_dev_pwr_mode(hba, req_dev_pwr_mode);
+               if (ret)
+                       goto enable_gating;
+       }
 
        ret = ufshcd_link_state_transition(hba, req_link_state, 1);
        if (ret)
@@ -8023,11 +8023,11 @@ disable_clks:
        udelay(50);
 
        if (gating_allowed) {
-//             if (!ufshcd_is_link_active(hba))
-//                     ufshcd_setup_clocks(hba, false);
-///            else
-//                     /* If link is active, device ref_clk can't be switched off */
-///                    __ufshcd_setup_clocks(hba, false, true);
+               if (!ufshcd_is_link_active(hba))
+                       ufshcd_setup_clocks(hba, false);
+               else
+                       /* If link is active, device ref_clk can't be switched off */
+                       __ufshcd_setup_clocks(hba, false, true);
        }
 
        hba->clk_gating.state = CLKS_OFF;