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>
This commit is contained in:
Peter Wang 2025-08-11 21:11:19 +08:00 committed by Martin K. Petersen
parent aa86602a48
commit f91c6c70d1

View File

@ -798,8 +798,14 @@ static int ufs_mtk_setup_clocks(struct ufs_hba *hba, bool on,
clk_pwr_off = true;
}
if (clk_pwr_off)
if (clk_pwr_off) {
ufs_mtk_pwr_ctrl(hba, false);
} else {
dev_warn(hba->dev, "Clock is not turned off, hba->ahit = 0x%x, AHIT = 0x%x\n",
hba->ahit,
ufshcd_readl(hba,
REG_AUTO_HIBERNATE_IDLE_TIMER));
}
ufs_mtk_mcq_disable_irq(hba);
} else if (on && status == POST_CHANGE) {
ufs_mtk_pwr_ctrl(hba, true);