Skip to content

Commit f91c6c7

Browse files
ptr324martinkpetersen
authored andcommitted
scsi: ufs: host: mediatek: Add debug information for Auto-Hibern8
Enhance the clock gating logic by adding debug information for the Auto-Hibern8 (AHIT) register. This additional logging aids in troubleshooting by providing insights into the AHIT configuration when the clock is not turned off as expected. Signed-off-by: Peter Wang <peter.wang@mediatek.com> Link: https://lore.kernel.org/r/20250811131423.3444014-4-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent aa86602 commit f91c6c7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/ufs/host/ufs-mediatek.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,14 @@ static int ufs_mtk_setup_clocks(struct ufs_hba *hba, bool on,
798798
clk_pwr_off = true;
799799
}
800800

801-
if (clk_pwr_off)
801+
if (clk_pwr_off) {
802802
ufs_mtk_pwr_ctrl(hba, false);
803+
} else {
804+
dev_warn(hba->dev, "Clock is not turned off, hba->ahit = 0x%x, AHIT = 0x%x\n",
805+
hba->ahit,
806+
ufshcd_readl(hba,
807+
REG_AUTO_HIBERNATE_IDLE_TIMER));
808+
}
803809
ufs_mtk_mcq_disable_irq(hba);
804810
} else if (on && status == POST_CHANGE) {
805811
ufs_mtk_pwr_ctrl(hba, true);

0 commit comments

Comments
 (0)