mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
UPSTREAM: scsi: ufs: ufs-mediatek: Fix wrong location for ref-clk delay
Fix the location of delay for ref-clk gating and ungating in
ufs_mtk_setup_ref_clk().
Link: https://lore.kernel.org/r/20211016005802.7729-4-stanley.chu@mediatek.com
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Bug: 234653003
(cherry picked from commit 25d542a853)
Change-Id: I30edb1105c25a2498a3c6e3ce8e9d334b2332dab
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Bart Van Assche
parent
70c82b57b7
commit
674711338f
@@ -247,9 +247,9 @@ static int ufs_mtk_setup_ref_clk(struct ufs_hba *hba, bool on)
|
||||
|
||||
if (on) {
|
||||
ufs_mtk_ref_clk_notify(on, res);
|
||||
ufshcd_delay_us(host->ref_clk_ungating_wait_us, 10);
|
||||
ufshcd_writel(hba, REFCLK_REQUEST, REG_UFS_REFCLK_CTRL);
|
||||
} else {
|
||||
ufshcd_delay_us(host->ref_clk_gating_wait_us, 10);
|
||||
ufshcd_writel(hba, REFCLK_RELEASE, REG_UFS_REFCLK_CTRL);
|
||||
}
|
||||
|
||||
@@ -274,10 +274,10 @@ static int ufs_mtk_setup_ref_clk(struct ufs_hba *hba, bool on)
|
||||
|
||||
out:
|
||||
host->ref_clk_enabled = on;
|
||||
if (!on) {
|
||||
ufshcd_delay_us(host->ref_clk_gating_wait_us, 10);
|
||||
if (on)
|
||||
ufshcd_delay_us(host->ref_clk_ungating_wait_us, 10);
|
||||
else
|
||||
ufs_mtk_ref_clk_notify(on, res);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user