From: JaeHun Jung Date: Tue, 12 Jun 2018 03:52:34 +0000 (+0900) Subject: [COMMON] scsi: ufs: Remove comment at pm_qos X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cb34d82370a26fbd7d01c008c0ba92f9575cff47;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] scsi: ufs: Remove comment at pm_qos Add pm_qos code for min lock. Change-Id: Ie9ba65c70df7802480abfd1b0d37b6bfb9468073 Signed-off-by: JaeHun Jung --- diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index 2548f9c5e30f..94737d5fa5c1 100644 --- a/drivers/scsi/ufs/ufs-exynos.c +++ b/drivers/scsi/ufs/ufs-exynos.c @@ -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; diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 4a6c934734e3..4bfe2e64c31d 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -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;